Skip to content
RCE Write-up Advanced

MS Enterprise app management service RCE. CVE-2022-35841

The Enterprise App Management Service exposed a DCOM interface that allowed any authenticated user to provision and install MSIX packages, which could contain a privileged service, leading to local privilege escalation and, under certain conditions, remote code execution as SYSTEM.

Ceri Coburn Follow

Published on pentestpartners.com

A remote command execution and local privilege escalation vulnerability has been fixed by Microsoft as part of September’s patch Tuesday.

PTP Admin, on pentestpartners.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the DCOM interface for the Enterprise App Management Service granted launch and activation permissions to Everyone and did not properly validate the caller's authorization before provisioning an application package.

What the attacker needed

Authenticated user on the target machine; For remote: member of Distributed COM Users or Performance…; A code signing certificate to sign the MSIX package

The fix

Microsoft fixed the vulnerability in the September 2022 Patch Tuesday update.

How it was found

  1. Enumerate registered AppIds and identify the EntAppSvc service with multiple applications.
  2. Confirm that the Everyone SID has launch and activation permissions for the DCOM application.
  3. Inspect the exposed IEnterpriseModernAppManager interface and its methods.
  4. Call the ProvisionApplication method with an XML string specifying a package URI.
  5. Create and sign an MSIX package that installs a privileged service.
  6. Invoke ProvisionApplication with the crafted MSIX to install and start the service.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This report describes a flaw in a Windows service that manages app installations. The service allowed any user to ask it to install a specially crafted app package, and because the service runs with high privileges, that app could run code as the system itself. This means a normal user could take full control of the machine.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by Ceri Coburn

View all

1 more disclosed report, best first.

More from Microsoft

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.