Nineteen days of finance threads, password notes, and OTP mail began with a short code an employee typed on Microsoft's real sign-in page. According to QMasters DFIR, Microsoft 365 device-code phishing persuaded that user to complete MFA for an attacker-started OAuth device flow, so tokens landed with the attacker without a stolen password. Roughly 1,600 messages and shared files sat in the exposure window, then supplier lookalike domains and forged-invoice fraud followed from the same mailbox. Blocking device-code sign-in, for example with Conditional Access, is what closes the grant that made that first session possible. MFA 2.0 cannot prevent device-code phishing.
What QMasters reconstructed from the cloud trail
QMasters describes an anonymized incident-response case disclosed on 14 November 2026. The most likely initial access was device-code phishing: the attacker started a Microsoft device-code OAuth flow, coached the employee to enter the user code on Microsoft's genuine sign-in experience, and waited while the employee completed MFA. The authorization server then issued tokens to the party that opened the device-code session. That party was not the employee.
Within minutes of first token issuance, an unrecognized Windows device was registered to the account. Investigators later counted 963 device-code flow logins from that device against the single identity. Across the 19-day compromise window the session reached about 1,600 messages and shared files, including finance material, password notes, and OTP messages. On day 9 the attacker opened a real supplier invoice thread, saved documents to OneDrive, and prepared lookalike-domain payment fraud. Discovery arrived externally on the morning of day 20, when the supplier forwarded suspicious correspondence.
After the first password reset and refresh-token revocation, the attacker kept working for roughly an hour or more on the still-valid access token and the registered-device foothold. QMasters states that revocation ends refresh tokens while an already-issued access token can keep working for up to about an hour, and that a registered device is a separate foothold that must be disabled or deleted on its own. During that residual window the attacker read internal warnings, sent outbound phishing and sharing invitations toward well over a hundred addresses, and created hiding inbox rules. A second revocation, account block, device deletion, and removal of an unverified publisher app finally cut the path.
Password notes in the compromised mailbox named shared-mailbox, ERP, and social credentials across related companies, and most likely exposed a Google Workspace shared-mailbox super-admin password that stayed unchanged for up to about 18 days. QMasters found no evidence that password was used. Available CrowdStrike telemetry showed no endpoint malware indicators for the window investigators could review. The documented story is cloud identity and token issuance, not a confirmed workstation implant. The full attack timeline and business-email-compromise sequence sit on the companion analysis at legacymfa.sucks.
Why a finished MFA prompt still issued attacker tokens
Device-code OAuth exists so a client that cannot finish a full interactive login can still receive tokens after a human authenticates elsewhere. The attacker starts the flow and receives a user code. The employee opens Microsoft's real page, pastes that code, and satisfies whatever prompt the tenant requires. Familiar branding and a completed second factor feel like a normal self-login. The grant still binds to the waiting client that began the device-code session.
That is the transferable step. The employee never typed a password for the attacker to steal. No reverse-proxy kit had to harvest a session cookie mid-flight. The ceremony itself authorized an unbound remote principal. QMasters puts the mechanism in plain language: device-code phishing approves a login for the attacker without the password ever being stolen, and the victim's own MFA does not stop it. Exact factor type beyond prompt completion is not named in the write-up. The outcome does not depend on guessing SMS versus push. Any factor the user can complete on the real page still finishes the attacker's grant when the flow is allowed.
| Stage | What moved | Login MFA effect |
|---|---|---|
| First device-code grant | Access and refresh tokens to attacker client | Prompt completed; tokens still issued |
| Minutes later | Unrecognized Windows device registered | Foothold separate from password |
| Days 1-19 | ~1,600 messages and shared files | Already-issued session, not a new login |
| After first reset | Access token still valid ~1 hour | Refresh revoke alone is incomplete |
Persistence after that first grant is eviction work. The registered Windows device kept answering device-code traffic. Lingering access-token lifetime outlived the first refresh-token kill. Mailbox and file access rode tokens that already existed. Plaintext password notes in Sent Items turned one cloud session into offline credential exposure for related systems. None of those later stages are fixed by asking the employee to approve one more prompt at the original ceremony.
Conditional Access policies that block the device-code flow, aggressive sign-in monitoring for device-code volume, and immediate deletion of strange registered devices are practical Entra controls for tenants that still allow the grant. They are not the same as removing transferable authorization from the identity model. High device-code counts from hardware the user does not own should page responders the same day, not after a supplier notices a forged invoice.
What closes the device-code grant
Phishing-proof device-bound MFA binds the factor to hardware already enrolled to the account and to the origin the user sees. There is no short code, OTP, SMS secret, email link, or push approval that a coach can walk someone through on a hostile page so a phished login can be reused. That is why origin-bound signatures refuse an AiTM relay. They cannot refuse a device-code approval, because the origin is genuine and the tenant still allows the grant.
On this path, prevention, not detection means refusing the grant in Conditional Access, because detection only starts after tokens exist. Prevention sits upstream of revoke playbooks. Once tokens and a registered device already exist, responders still delete the device, revoke refresh and access material, kill inbox rules, and rotate every secret found in mail. Login cryptography does not rewind nineteen days of reading.
Passkeys and FIDO2 are origin-bound at the login the user sees. The private key stays in device hardware and signs an origin-bound challenge, so a spoofed host cannot replay that ceremony. Device-code phishing does not need a spoofed host. The employee is already on Microsoft's genuine page. A passkey assertion on that real origin can still satisfy the human half of a device-code grant if the tenant still allows the waiting client to receive tokens afterward. Hardening only the visible login therefore leaves a gap this exact pattern exploits.
The attacker registered an unrecognized Windows device minutes after first token issuance and kept using it. That foothold outlived the first password reset until the device was deleted. Containment has to include those devices, not only the first access token.
With MFA 2.0 as the only sign-in and enrollment method, a stolen session token is only that login. Once the token expires it cannot be reused, and the attacker cannot add a device.
One Microsoft 365 mailbox still concentrated invoice truth, OTP messages, and password notes that pointed at a related company's Google Workspace super-admin shared mailbox. Stopping the unbound grant keeps that concentration from opening in the first place. Cleaning secrets that were already stored in clear text remains hygiene after the fact.
Key takeaways for defenders
- Block or tightly Conditional-Access-restrict device-code flow wherever users do not truly need it for headless clients.
- Alert on bursts of device-code sign-ins and on new registered devices within minutes of first token use.
- Treat password reset plus refresh-token revoke as incomplete until access tokens die and registered devices are deleted.
- Hunt mailboxes for password notes and shared-mailbox secrets as soon as a session is suspect; rotate anything named there, including cross-company admin passwords.
- Block or limit device-code sign-in wherever users do not need it. MFA 2.0 cannot prevent device-code phishing.
Device-code phishing thrives where a finished MFA prompt is mistaken for proof the right principal received the session. Blocking the device-code grant is what stops the short code on the real Microsoft page from becoming a remote key handoff. Eviction discipline still matters when something older is already inside; it should not be the primary plan for the next grant attempt.
FAQ
Would passkeys alone have stopped this Microsoft 365 device-code BEC?
Passkeys alone would not reliably have stopped the QMasters Microsoft 365 device-code BEC path. Passkeys bind to the origin the user sees, yet device-code phishing uses Microsoft's genuine sign-in page, so an origin-bound assertion can still complete the human half of the grant while tokens issue to the attacker's waiting client. Closing this case needs a block on device-code sign-in, for example with Conditional Access, not only a stronger factor on the real page. MFA 2.0 cannot prevent device-code phishing.
What stops device-code phishing after MFA prompts succeed?
Blocking or turning off device-code sign-in, for example with Conditional Access, is what closes Microsoft 365 device-code phishing after MFA prompts succeed. In the QMasters pattern the employee finished MFA on the real Microsoft page and still authorized the attacker, because the tenant still allowed the grant. Phishing-proof MFA 2.0 cannot prevent device-code phishing; it does not refuse a device-code approval on Microsoft's genuine page. Registered-device abuse and lingering access tokens after a completed grant remain separate eviction tasks.
What should responders still do if device-code tokens already issued?
If device-code tokens already issued in a case like the QMasters IR, responders must revoke refresh and access material, delete or disable attacker-registered devices, remove malicious inbox rules and sharing links, and rotate every credential found in mail. QMasters showed the attacker continued for roughly an hour after the first reset through a live access token and the Windows device foothold, then launched outbound phishing. Login MFA cannot unwind sessions that already exist; full eviction can.
Why did registering a new Windows device matter so much after the first token?
Registering a new Windows device mattered in the QMasters device-code case because it became a foothold independent of the user's password and of refresh-token revocation. Investigators saw 963 device-code flow logins from that unrecognized device, and the attacker kept working after the first reset until the device was deleted. Containment has to include that device, not only the first access token.
Should enterprises disable Microsoft device-code flow entirely?
Enterprises should disable or strictly Conditional-Access-limit Microsoft device-code flow when users do not have a documented need for it, because the QMasters BEC shows how a coached code on the real sign-in page issues tokens after MFA. Where headless clients truly require the grant, pair tight allowlists with monitoring for device-code volume and instant review of new registered devices. Architecture that never accepts unbound remote grants remains stronger than detection alone on a flow that is still enabled tenant-wide.