Device-Code Phishing Bypasses MFA to Plant Rogue Devices in 305 Entra Tenants
Written by AI from the linked story. Not reviewed by an editor. How this works
Attackers exploited the OAuth device code flow — a legitimate authentication mechanism intended for input-limited devices — to trick users into authorizing rogue device registrations within Microsoft Entra ID. Because the resulting access tokens persist independently of passwords, standard incident response actions like forcing a password reset failed to revoke attacker access. The campaign succeeded largely because users were unaware that device code authentication requests can be weaponized through social engineering. This matters because once a rogue device is enrolled and tokens are issued, attackers gain persistent, trusted access to high-value data stores like SharePoint, OneDrive, and Exchange without raising typical login alarms.
Tactical Insight
Immediate actions
- Audit all registered devices in Microsoft Entra ID and revoke tokens associated with unrecognized or suspicious device registrations.
- Restrict or disable the device code flow authentication grant in Conditional Access policies unless it is explicitly required for legitimate use cases.
- Force revocation of all active refresh tokens for affected accounts, not just password resets, using the `revokeSignInSessions` API.
Long-term improvements
- Implement Conditional Access policies that require compliant, Intune-managed devices before allowing resource access, blocking rogue device enrollments.
- Establish a device registration approval workflow so that new Entra ID device joins require administrator or automated compliance verification.
- Train users to recognize and report unsolicited device code authentication prompts, emphasizing that legitimate systems rarely push codes via email or chat.
Detection measures
- Alert on anomalous device registrations in Entra ID, particularly those from unexpected geographic locations or IP ranges.
- Monitor Microsoft 365 audit logs for unusual OAuth token grants, especially those using the device code flow from unfamiliar user agents.
- Correlate new device enrollments with subsequent bulk data access events on SharePoint, OneDrive, or Exchange to detect post-compromise exfiltration.