
Identity & Phishing
https://hmmnm.com/device-code-phishing-2026-attackers-bypass-mfa/

Multi-factor authentication was supposed to be the silver bullet. In 2026, attackers stopped trying to break it — they made the victim complete it for them. Device code phishing detections spiked 37x, and the technique is now a criminal commodity.
Quick Answer
Device code phishing abuses the OAuth 2.0 device authorization grant (RFC 8628). The victim authenticates legitimately — real password, real MFA, real provider domain. But the resulting access and refresh tokens go to the attacker’s polling client. Detections spiked 37x in H1 2026. More than 18 kits now sell on underground markets from $50, and every major AiTM platform has integrated the technique. Immediate defenses: disable the device code flow where it is unused, govern OAuth consent (admin consent for high-privilege apps), enable token protection and continuous access evaluation, and alert when the sign-in protocol is DeviceCode.
The attack needs no intercepted SMS codes, no adversary-in-the-middle proxy, and no stolen session cookies. It is called device code phishing. It exploits the OAuth 2.0 device authorization grant — the flow used legitimately by CLI tools, IoT devices, smart TVs, and kiosks. The trick: get the user to hand an authenticated session directly to the attacker.
Push Security and other researchers have tracked the explosion: a 37x spike in detections in the first half of 2026. At least 18 dedicated kits sell on underground markets, some priced as low as $50. The technique was once espionage-grade, used by nation-state actors (Chinese APT groups documented by Microsoft MSTIC). Today it is a criminal commodity, and every major adversary-in-the-middle vendor has integrated it.
RFC 8628 was designed for devices with limited input capability. The legitimate flow:
Legitimate users include AWS CLI, GitHub device flow, Azure CLI, and Google Cloud SDK. The problem: an attacker can initiate this flow and socially engineer the victim into completing it on the attacker’s behalf — without ever touching a password or MFA device.
The attacker registers (or reuses) an OAuth application with the target identity provider — Microsoft Entra ID, Google, GitHub, or AWS — and requests a device code scoped to high-privilege permissions like mail.read, files.readwrite.all, or Directory.ReadWrite.All.
The lure delivers a real verification URL and code: “Your organization requires a security verification. Visit microsoft.com/devicelogin and enter code XXXX-XXXX.” The page is genuine — it is the legitimate page. There is no lookalike domain, so URL inspection and email gateways have nothing to flag.
The victim enters the code, logs in, completes MFA, and approves a consent prompt that looks routine. Every signal on their side checks out. Conditional access policies pass, because the authentication genuinely is the user’s.
The attacker’s polling client receives the access token — and usually a refresh token that survives password changes. The result: session hijacking that looks identical to a legitimate login in audit logs.
| Traditional Control | Why It Doesn’t Help |
|---|---|
| MFA / push approval | The victim completes the real MFA challenge themselves |
| Credential monitoring | No password is ever captured |
| URL / domain reputation | The flow uses the provider’s genuine domain |
| Phishing page detection | There is no fake page to detect |
| Conditional access (location/device) | Authentication comes from the victim’s normal device and location |
The attack does not bypass MFA. It uses MFA as part of the attack. One gap remains for defenders: the token is consumed from infrastructure different from where the login happened, and the flow itself is visible in sign-in logs.
The pattern echoes what we tracked in the week-two June intelligence report: token theft has become the preferred path past MFA everywhere, from VS Code one-click GitHub token theft to OAuth device flows.
What to watch in identity provider audit logs:
DeviceCode; alert on flows from unexpected locations, user agents, or off-hours windowsMany organizations never use it. In Microsoft Entra ID, disable or restrict device code flow via Conditional Access policies targeting specific applications or requiring compliant devices; Google offers equivalent controls.
Require admin consent for high-privilege applications. Block consent to unverified publishers. Audit granted consents on a schedule and revoke anything unnecessary. Treat OAuth consent governance with the same urgency as credential protection.
Enable token protection (proof-of-possession) where available. Entra ID can bind tokens to the device that requested them. Stolen tokens then become unusable on attacker infrastructure, even when the authentication was legitimate.
CAE revokes sessions when risk signals change instead of waiting for token expiry. That directly shrinks the value of a stolen refresh token. It is the same identity-centric hardening we recommend for zero-trust architectures and non-human agent identities.
FIDO2/passkeys raise the bar, though they do not fully stop consent-based attacks. Update awareness training with device-code specifics. Teach the warning signs: unexpected code-entry requests, artificial urgency (“this code expires in 15 minutes”), and codes requested outside normal IT channels. Show users how to read a consent prompt before approving.
Red-team tooling for validating resilience:
Run purple-team exercises that simulate device code phishing end to end. Verify your DeviceCode sign-in alerts actually fire. The practice pairs well with our red-teaming playbook and AI agent attack-surface analysis.
It does not bypass MFA — it recruits it. The victim completes a fully legitimate authentication (password plus MFA) on the real provider’s domain. But the tokens from that flow go to the attacker’s polling client. Nothing is intercepted and nothing is faked. That is why traditional anti-phishing controls see nothing.
An OAuth 2.0 extension for devices with limited input: CLI tools, smart TVs, IoT. The device displays a short code. The user enters it at a verification URL on another device. The device then receives tokens once the user authenticates. Device code phishing inverts this. The attacker’s “device” starts the flow, and the victim supplies the authentication.
Detections are up 37x year-over-year in H1 2026, with 18+ attack kits available — some from $50 — and every major adversary-in-the-middle platform integrating the technique. Google’s June 2026 lawsuit against the Outsider Enterprise phishing operation and the FBI’s disruption of the same network mark its arrival as mainstream criminal infrastructure.
Filter sign-in logs for the authentication protocol “DeviceCode”. Alert on unusual source locations, off-hours flows, bursts in short windows, and tokens consumed far from where the login happened. Pair this with consent-grant auditing and app-registration monitoring for high-privilege scopes.
{“@context”:”https://schema.org”,”@type”:”FAQPage”,”mainEntity”:[{“@type”:”Question”,”name”:”How does device code phishing bypass MFA?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”It doesn’t bypass MFA — it recruits it. The victim completes a fully legitimate authentication on the real provider’s domain, but the resulting access and refresh tokens are issued to the attacker’s polling client. Nothing is intercepted or faked, so traditional anti-phishing controls see nothing.”}},{“@type”:”Question”,”name”:”What is the device authorization grant (RFC 8628)?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”An OAuth 2.0 extension for devices with limited input — CLI tools, smart TVs, and IoT. The device shows a short code, the user enters it at a verification URL, and the device receives tokens once the user authenticates. Device code phishing inverts this by having the attacker’s client initiate the flow and the victim supply the authentication.”}},{“@type”:”Question”,”name”:”How big is the 2026 device code phishing spike?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”Detections rose 37x year-over-year in H1 2026, with 18+ attack kits — some priced from $50 — and every major adversary-in-the-middle platform integrating the technique. Google’s lawsuit against Outsider Enterprise and the FBI’s disruption of the operation mark its mainstream arrival.”}},{“@type”:”Question”,”name”:”How do I detect device code phishing in Entra ID?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”Filter sign-in logs for authentication protocol DeviceCode and alert on unusual source locations, off-hours flows, flow bursts, and tokens consumed from geographies different from the authentication event. Pair with consent-grant auditing and app-registration monitoring for high-privilege scopes.”}}]}
The closing operational note: device-code phishing is defeated by teaching users the one asymmetry that matters — legitimate device-code flows always start from a device the user controls, so a code that arrives by email or chat asking to be entered elsewhere is definitionally hostile. Conditional-access policies blocking legacy authentication flows, and identity-platform logging that flags token issuance for unfamiliar devices from unfamiliar locations, complete the control stack. The technique is simple; so is the defense — but only for organizations that deployed both the policy and the training before the campaign rather than after.