# Crafty Microsoft Teams Booking Flow Disguises Device Code Phishing

Spear-phishing lure disguised as a Teams meeting-booking flow tricked a construction employee into entering a device code, granting attackers Microsoft 365 tokens.

- Payout: Real-world hack
- Severity: high
- Program: Microsoft
- Analysis by: Huntress
- Disclosed: 2026-11-12
- Write-up quality: 7/10
- Original: https://www.huntress.com/blog/crafty-microsoft-teams-booking-flow-disguises-device-code-phishing
- Library page: https://bugbountylibrary.com/r/blog%3Ahuntress-com-blog-crafty-microsoft-teams-booking-flow-disguises-device-code-phishing
- Tags: area:cloud domain:cloud impact:ato impact:internal-access kind:incident platform:threat-intel sev:high tech:azure tech:oauth technique:chained technique:js-analysis vuln:account-takeover vuln:auth-bypass vuln:mfa-bypass

**Target:** Microsoft device code authorization flow / microsoft.com/devicelogin
**Root cause:** Attackers initiate a legitimate OAuth device-code sign-in and socially engineer the victim into entering the resulting user_code on Microsoft's real device-login page, authorizing the attacker's session and yielding access tokens.
**Steps:**
1. Victim receives spear-phishing email from typosquatted domain impersonating a real SVP, with a Microsoft Safe Links-wrapped Google short link `share[.]google/?q=UltJkMsVWI5V9GJM1`
2. Link redirects server-side through `www[.]google[.]com/share[.]google?q=...` to a typosquatted Teams meeting-booking lure page
3. Victim selects date/time/duration; on Continue the page resolves visitor country and sends `POST hxxps[:]//gpimmlgration[.]com/static-export/api/device/start` with headers `X-Antibot-Token`, `X-Auth-Mode: cookie`, `X-WinHello: 1`, `X-Automatic-Target-Country: 1`, `X-Visitor-Country`, `Idempotency-Key: web-<uuid>`
4. Backend starts a Microsoft device-code sign-in and returns a user_code, displayed as a 'Booking Reference'
5. Victim clicks Copy/Confirm Meeting; code is copied to clipboard and a popup opens Microsoft's real device-login page
6. Victim enters the code and completes MFA, approving the attacker's pending device sign-in
7. Backend reports success, page shows 'Verification complete' and redirects to a real Calendly booking page
8. Attacker obtains tokens via Cmsi:Cmsi login to Microsoft Authentication Broker, routed through a residential proxy
**How found:** Huntress SOC observed the attack in telemetry; analysts decrypted the AES-256-GCM phishing kit (key/IV embedded in page, WebCrypto decryption) to reveal the device-code API calls, window.open/fetch hooks, and fallback logic, then traced the Cmsi:Cmsi login through a residential proxy.
**Exploitation:** Attacker initiates device-code flow server-side, wraps it in a convincing Teams booking UI with countdown pressure, clipboard-copies the code, and drives the victim to Microsoft's genuine devicelogin page. On success the attacker captures the session token via Cmsi:Cmsi to Microsoft Authentication Broker, relayed through a residential callback proxy (New Orleans home IP) to blend with consumer traffic; the compromised M365 account had no MFA enrolled and was accessed from an unmanaged device.
**Escalation:** Kit includes a WinHello stage (fake Microsoft popup via mirror_url) and a token-mode fallback that restarts device-code flow on AADSTS50076/interaction_required to re-prompt MFA, keeping the victim engaged until tokens are obtained.
**Insight:** Device-code phishing can be hidden inside any multi-step UI that plausibly asks users to copy a code; check for pages that make no network calls until a late 'Continue' click then POST to a device/start endpoint, and look for AES-GCM blobs decrypted via WebCrypto to evade static scanners.

## Proof of concept (copied exactly from the original report)

**Device code start request with antibot headers**

```
POST hxxps[:]//gpimmlgration[.]com/static-export/api/device/start
X-Antibot-Token: REDACTED | X-Auth-Mode: cookie | X-WinHello: 1
X-Automatic-Target-Country: 1 | X-Visitor-Country: XX | Idempotency-Key: web-<uuid>
```

