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.
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.
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
- Enumerate registered AppIds and identify the EntAppSvc service with multiple applications.
- Confirm that the Everyone SID has launch and activation permissions for the DCOM application.
- Inspect the exposed IEnterpriseModernAppManager interface and its methods.
- Call the ProvisionApplication method with an XML string specifying a package URI.
- Create and sign an MSIX package that installs a privileged service.
- 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.