# Storm-2372 conducts device code phishing campaign

Storm-2372 phished Microsoft Entra device-code flow via fake Teams meeting invites, capturing OAuth tokens to access victim accounts and harvest email.

- Payout: Real-world hack
- Severity: high
- Program: Microsoft
- Analysis by: Microsoft Entra ID
- Disclosed: 2025-02-14
- Write-up quality: 7/10
- Original: https://www.microsoft.com/en-us/security/blog/2025/02/13/storm-2372-conducts-device-code-phishing-campaign/
- Library page: https://bugbountylibrary.com/r/blog%3Amicrosoft-com-en-us-security-blog-2025-02-13-storm-2372-conducts-device-code-phishing-campaign
- Tags: area:cloud domain:cloud impact:ato impact:data-leak kind:incident platform:threat-intel sev:high tech:azure tech:oauth technique:recon vuln:account-takeover vuln:auth-bypass vuln:mfa-bypass

**Target:** Microsoft Entra ID device code authentication flow / Microsoft Graph
**Root cause:** Device code flow lets an attacker generate a legitimate code and have the victim enter it on the real sign-in page, so the attacker receives the resulting access and refresh tokens without any credential theft or code vulnerability.
**Steps:**
1. Attacker initiates a device code request against Microsoft Entra ID, obtaining a code.
2. Attacker embeds the code as the meeting ID in a fake Microsoft Teams meeting invitation sent via email (after rapport-building on WhatsApp/Signal/Teams).
3. Victim clicks the invite and is prompted to authenticate, entering the attacker's device code on the legitimate device login page.
4. Attacker receives the valid access and refresh tokens from the completed flow.
5. Attacker uses the token to access Microsoft Graph, keyword-search mailboxes (`username`, `password`, `admin`, `teamviewer`, `anydesk`, `credentials`, `secret`, `ministry`, `gov`) and exfiltrate emails.
6. Attacker sends further device-code phishing emails intra-organizationally from the compromised account to move laterally.
7. Update: attacker uses the Microsoft Authentication Broker client ID to get a refresh token, registers an actor-controlled device in Entra ID, and obtains a Primary Refresh Token (PRT).
**How found:** Microsoft Threat Intelligence observed anomalous token activity and device-code sign-ins tied to phishing lures impersonating messaging apps and Teams meeting invites, then traced the flow to attacker-generated device codes.
**Exploitation:** Attacker pre-generates a device code, delivers it as a fake Teams meeting ID, victim authenticates on the genuine page, attacker captures access/refresh tokens and uses them against Graph API for email search and exfiltration, then reuses the compromised session for internal phishing. Later variant registers a device via the broker client ID to obtain a PRT and access org resources, using regionally appropriate proxies to blend in.
**Escalation:** Token reuse for lateral phishing within the org; pivot to device registration service to obtain a Primary Refresh Token granting broader org resource access.
**Insight:** Device code flow is a token-theft primitive with no password or MFA prompt: any org allowing it lets an attacker mint a code and harvest tokens from a victim who types it into the real login page. Hunt for `microsoft.com/devicelogin` URL clicks followed within minutes by a 50199 error then success, and for close-in-time device registrations plus PRT issuance.

