LevelBlue Details Phishing Campaign Abusing Microsoft OAuth Device Code Flow

· Original article ↗

Summary

LevelBlue details a phishing campaign using a fake Adobe site, Mandrill redirects and Microsoft OAuth Device Code Flow to trick users into authorizing tokens, potentially enabling persistent access. It shares KQL detections and Conditional Access mitigations.

Key points

  • LevelBlue investigated a phishing campaign using a fake Adobe-themed site to persuade users to authorize a Microsoft Device Code Flow request.
  • Mailchimp’s Mandrill links concealed destination URLs in Base64-encoded parameters; a redirect endpoint at ppsrq[.]org/so/3dPniokM8/c accepted authenticated payloads.
  • The phishing page requested a device code, displayed the resulting user code, and polled authorization status through its server; the report says the server’s Microsoft requests were not visible to the user.
  • If a victim authorizes the request, the campaign could obtain access and refresh tokens, potentially enabling persistent delegated access to Microsoft Graph resources.
  • The report says the redirect domain belongs to a nonprofit and suspects its secret or server was compromised, allowing attackers to create a valid malicious URL.
  • LevelBlue recommends blocking Device Code Flow with Conditional Access where it is not needed, and provides KQL queries to hunt for device-code sign-ins and related URLs.
  • The report notes that device-code endpoint URL hunting may miss activity when there is no immediate redirect to Microsoft’s login page.

Article Details

Attack Vectors
  • Phishing emails used Mailchimp/Mandrill links with Base64-encoded parameters to conceal the final destination.
  • A fake Adobe-themed website displayed a Microsoft device code and prompted users to authorize it through the Device Code Flow.
  • The phishing site generated device codes through Microsoft services and polled for authorization status, obtaining tokens after a victim approved the request.
  • A redirection endpoint on ppsrq[.]org was used to route users to the phishing site; LevelBlue suspected the endpoint or its signing secret had been compromised.
  • Access and refresh tokens obtained through successful authorization could enable delegated access to organizational resources through Microsoft Graph.
Defensive Notes
  • Block Device Code Flow through Conditional Access Policies, or explicitly exclude only users and resources with a documented need for it.
  • Continuously audit permitted Device Code Flow usage and revoke access when it is no longer required.
  • Monitor sign-in logs for AuthenticationProtocol == "deviceCode" and OriginalTransferMethod == "deviceCodeFlow".
  • Hunt for device-login URLs in click and browser events, while treating matches as supporting evidence rather than conclusive detection.
  • Revoke established sign-in sessions when an account compromise is confirmed.

Indicators of compromise

TypeIndicatorContext
URLhxxps[:]//adobe[.]safest[.]org/Phishing destination on a fake Adobe-themed site used in the device-code authorization campaign.

MITRE ATT&CK

Vendors

Products

Related Articles