Device Code Phishing: MFA Bypass at Scale

The Hacker News · High sophistication
Last updated July 31, 2026

This article describes real-world “device code phishing” campaigns where victims are tricked into approving an OAuth device login, granting attackers access without stealing passwords. It highlights rapid criminal adoption via phishing-as-a-service kits and notes heavy targeting of Microsoft accounts today, with growing risk to other platforms that support device-code flows (e.g., Salesforce, GitHub, AWS).

How the attack works

Device code phishing abuses the OAuth 2.0 device authorization flow, a legitimate mechanism designed for signing into devices without a keyboard or browser. An attacker generates a device code and convinces a victim to enter that code on the real sign-in page of a provider such as Microsoft, then approve the request. Because the victim is often already signed into their account when they encounter the phishing page, the approval step feels routine rather than risky. Once approved, the attacker receives valid access tokens without ever needing the victim's password.

Why it succeeds against MFA and passkeys

This technique does not target the login step at all. It targets the authorization layer that comes after login, which means MFA, hardware security keys, and even passkeys do not stop it. The device code flow operates independently of how the user authenticated, so phishing-resistant credentials provide no protection once a victim is persuaded to click Allow. This is a meaningful shift from traditional credential phishing, where stronger authentication typically raises the bar for attackers.

Why traditional defenses miss it

Because victims are directed to enter codes and click approve on the legitimate provider's own domain, many standard controls, including email gateways, URL reputation checks, and network proxies, may not flag the approval action as malicious. The delivery channel can also vary widely: device code phishing pages have been distributed through email, messaging apps, social media, search engine results, and compromised websites, making channel-based filtering less reliable on its own.

Beyond Microsoft: a broader risk

While Microsoft accounts are the dominant target today, this is not limited to one vendor. Any service implementing device code flows, including Salesforce, GitHub, and AWS, can be targeted. This means the awareness problem extends across roles: sales operations and CRM admins approving a new integration, developers approving access for a tooling workflow, and IT staff handling device registration requests are all potential targets, not just general end users.

Building resistance

  • Train employees that approving an access request can be just as consequential as entering a password, especially when prompted to type a short code into a real sign-in page.
  • Treat unexpected device or app authorization prompts as suspicious, and verify unfamiliar requests through a known internal channel before clicking Allow or Approve.
  • Reinforce that MFA and passkeys do not eliminate this risk, so user judgment at the approval step remains essential.
  • Extend training beyond Microsoft-specific scenarios to cover other platforms your organization uses that support device code flows, such as developer or CRM tooling.

Key findings

  • Attackers abuse the OAuth 2.0 device authorization flow to get victims to approve access, effectively bypassing MFA/passkeys because it targets authorization after login.
  • The technique has moved quickly from research to nation-state use to commoditized phishing-as-a-service kits, with multiple kits (e.g., EvilTokens, Tycoon2FA, Kali365) enabling wide-scale campaigns.
  • Microsoft environments are the dominant target today, but any service implementing device code flows (e.g., Salesforce, GitHub, AWS) can be targeted.
  • Because victims enter codes on legitimate provider URLs, many traditional security controls (email gateways, URL reputation, network proxies) may not block the key approval step.

Who’s being targeted

  • Commonly targeted roles: All Employees, Executives, IT/Helpdesk, Security Team, Developers/Engineering, Sales Ops / CRM admins, Finance (due to BEC automation mentioned).
  • Affected industries: Cross-sector (any organization using Microsoft 365/OAuth device code), Software/SaaS users (e.g., Salesforce tenants), Technology/Developer-heavy organizations (GitHub/AWS device-code workflows).
  • Attack channels: email, website.
  • Impersonated: Microsoft sign-in / internal IT (device registration), Salesforce-related tool/app ('DataLoader').

Red flags to watch for

  • Unexpected request to approve a device/app you didn’t start
  • Pressure to act quickly / ‘action required’ language
  • Approval grants access even though you never initiated a new sign-in
  • New/unknown app requesting broad access to Salesforce
  • Authorization request is not tied to a normal login prompt
  • The request arrives unexpectedly (no prior tool onboarding)
Try Mirage

Mirage safely runs attacks like this one against your own team, so you find out what happens before a real adversary does.

Get a demo

Frequently asked questions

What is device code phishing?

It is an attack that abuses the OAuth 2.0 device authorization flow, tricking a victim into entering a code and approving access on a legitimate provider sign-in page, which grants the attacker access without needing the victim's password.

Does MFA or passkeys stop device code phishing?

No. Because the device code flow is separate from the authentication mechanism, MFA, hardware security keys, and passkeys do not prevent this technique from succeeding.

Is device code phishing only a Microsoft problem?

No. While Microsoft environments are the dominant target today, any platform that supports device code flows, including Salesforce, GitHub, and AWS, can be targeted.

Why do traditional security controls struggle to catch it?

Because the victim interacts with legitimate provider URLs, email gateways, URL reputation tools, and network proxies may not flag or block the key approval step.

Read the video transcript

You get an email: “Action required. To finish sign-in, enter this device code on the Microsoft device login page.” Looks legit, right? Here’s the trick: this is device code phishing. You copy a short code, paste it into the real Microsoft device sign-in page, pick your account, click Allow, and you just gave them access, even with MFA or passkeys. This isn’t just Microsoft. The same device code flow has been abused against Salesforce with a fake 'DataLoader' app, and can hit GitHub, AWS, anything that uses device codes. The aha: they’re not stealing your password, they’re tricking you into approving their app. So your move: if you’re ever asked to enter a device code or approve a new app you didn’t start, on Microsoft, Salesforce, GitHub, anything, stop and ping IT on Teams before you hit Allow.

Similar attacks