What the demonstration did
Replaying Semperis's UnOAuthorized demonstration
- 1
Credential on a Microsoft app
Date not stated; reported to Microsoft January 11, 2024A user with the Application Administrator or Cloud Application Administrator role adds a secret or certificate to the Device Registration Service service principal, and the client credentials grant returns a Microsoft Graph token as that app.
- 2
Global Administrator
Date not statedWith the Device Registration Service token, a Microsoft Graph request adds a user to the Global Administrator role, although the scopes shown for the app are empty.
- 3
Other Microsoft apps
Date not statedSemperis reports that the same method allows deleting and permanently deleting users as Viva Engage, Global Administrators included, and creating users as Microsoft Rights Management Service; the post gives no detail of the requests.
- 4
Persistence options
Date not statedSemperis describes ways to keep access after reaching Global Administrator, such as a new app registration with privileged application permissions or credentials added to an existing privileged application; the post does not show them performed.
- 5
Disclosure and fix
January 11, 2024, to July 2024Microsoft closes the Device Registration Service case on March 4, 2024, adds controls on credentials on its service principals, and in July 2024 further reduces the ones that still accept a credential.
In a demonstration, a user with the Application Administrator or Cloud Application Administrator role added a credential to Microsoft's Device Registration Service service principal, signed in as it and added a user to Global Administrator; the same method let Viva Engage delete users and Microsoft Rights Management Service create users. Semperis does not know whether any organization was compromised this way.
Where Microsoft Entra controls fit
In this demonstration the chain ran from an application administrator role to Global Administrator, through an authorization Microsoft holds for its own applications that no tenant setting reached. The point you control is the credential. An app management policy with Block password addition refuses a new client secret on service principals, but Microsoft's documentation does not name its first-party service principals, and a certificate stays possible with a capped lifetime. Holding Application Administrator and Cloud Application Administrator as eligible assignments in Privileged Identity Management bounds who can add the credential at all. Microsoft has since restricted credentials on its service principals; check yours for keyCredentials and passwordCredentials, and search your audit log for Add service principal credentials.
Would the controls have stopped it?
In hindsight, no control would have stopped it. 4 controls would have limited how far it went. 4 steps have no cloud-provider control. The counts below are control assessments, not attack stages: several can address the same step. The same replay with the controls in place before the incident shows where each phase would have been refused or bounded.
- 0
- Prevented
- 4
- Contained
- 4
- Not covered
How it could have been prevented
The same replay with the controls in place. Green marks where a step is refused, blue where it is bounded, and red where no control reaches it. Open a row to read the control, why it acts, and its caveat.
Replaying Semperis's UnOAuthorized demonstration
1 · Credential on a Microsoft app
2 Contained1 Not covered2 · Global Administrator
1 Not covered3 · Other Microsoft apps
1 Contained1 Not covered4 · Persistence options
1 Contained3 on other clouds5 · Disclosure and fix
1 Not coveredKey facts
- Semperis opened cases with the Microsoft Security Response Center (MSRC) on January 11, 2024, for three Microsoft first-party applications: Device Registration Service, Viva Engage and Microsoft Rights Management Service
- The scopes shown for Device Registration Service were empty, yet its Microsoft Graph token added a user to the Global Administrator role; Semperis says the app could add and remove Global Administrators
- MSRC first rated the issues low severity on January 30, 2024, then reclassified the Device Registration Service case as important on March 4, 2024, and closed it together with the Rights Management Service case
- The Viva Engage case was rated low on March 4, 2024, reclassified as medium on April 1, 2024, and closed on April 19, 2024
- Microsoft further reduced the set of its service principals that still accept a credential in July 2024; signing in as Device Registration Service now returns an error from Microsoft Graph, per Semperis
- Semperis disclosed the research on August 7, 2024, the day of its Black Hat USA 2024 talk; it says it is unknown whether any organization was compromised this way, and news coverage on August 8, 2024, confirmed no exploitation
Sources
Every fact in this breakdown comes from the public reporting below. The replay is a model of that reporting, not a reconstruction of the environment it describes.
- 1.UnOAuthorized: Privilege Elevation Through Microsoft ApplicationsSemperis · Aug 7, 2024 · ResearchThe required role, the credential added to the first-party service principal, the client credentials sign-in, the Global Administrator assignment, the other affected apps, the persistence options, the MSRC timeline, the fix and the detection guidance
- 2.Semperis researcher to reveal technique to exploit Entra ID at Black Hat USA 2024Semperis · Jul 25, 2024 · NewsThe disclosure venue and the talk date
- 3.Azure AD privilege escalation - Taking over default application permissions as Application AdminDirk-jan Mollema (dirkjanm.io) · Sep 16, 2019 · ResearchBackground on the technique, the 2019 MSRC position, the July 2024 block on first-party service principals
- 4.Microsoft Entra ID VulnerabilityCyber Security News · Aug 8, 2024 · NewsCoverage of the disclosure, no confirmed exploitation
The estate in the replay follows the researchers' description of their own test environment. Verdicts describe what a control does when it is in place before the run. They are not an assessment of any company's security program.