Source: CQURE Academy
Author: Asia
URL: https://cqureacademy.com/blog/cqure-hacks-82-microsoft-entra-id-conditional-access-bypass-via-user-agent-policy-gap/
ONE SENTENCE SUMMARY:
A User-Agent–based Conditional Access gap enabled Xbox token issuance without MFA, leading to Graph access, secret discovery, and full tenant compromise.
MAIN POINTS:
- Conditional Access trusted device platforms based solely on client-controlled User-Agent strings.
- Policies blocked Windows, Linux, and iPhone, but overlooked Xbox Series X.
- Xbox User-Agent allowed Microsoft Graph token acquisition without triggering MFA.
- Obtained access token enabled direct Graph API access despite portal restrictions.
- GraphRunner enumerated users, groups, and roles through Microsoft Graph.
- Portal blocking proved ineffective because underlying APIs remained accessible.
- Custom scripting searched directory objects for exposed credentials and secrets.
- A clear-text password was found stored in a group description attribute.
- Exposed credentials belonged to a break-glass Global Administrator account.
- Chaining policy gaps with poor secret storage resulted in full tenant compromise.
TAKEAWAYS:
- Expand Conditional Access coverage to include Graph/API token acquisition flows.
- Avoid security decisions based on manipulable client signals like User-Agent.
- Enforce MFA consistently across all sensitive access paths, not just portals.
- Prevent secrets from being stored in readable directory attributes and descriptions.
- Assume attackers will chain minor misconfigurations into high-impact compromises.