EvilTokens Explained: How Device Code Phishing Hit 12,000 Inboxes Without Stealing a Password


The victim never types their password into a fake page. They type it into the real one, at microsoft.com/devicelogin. That’s why EvilTokens worked as well as it did.

Microsoft published a teardown of the kit on September 22, alongside a Digital Crimes Unit disruption of its infrastructure. The headline numbers: more than 12,000 inboxes compromised across more than 10,000 organizations since it appeared in February 2026. Most of the coverage leads with “AI-powered.” The AI is real, but it’s not the reason it worked. The reason is a legitimate login flow most organizations never needed and never turned off.

The flow it abuses

OAuth’s device authorization grant (RFC 8628) exists for things that can’t show a login page: smart TVs, printers, conference room devices. The device asks the identity provider for a short code, shows it to you, and you go to a URL on your phone or laptop, enter the code, and sign in. The device keeps polling until you finish, then receives tokens.

Microsoft names the weakness plainly: “the session initiating the request is not strongly bound to the user’s original context.” The device that asked for the code and the person who entered it don’t have to be in the same place. Or be on the same side.

The attack, step by step

From Microsoft’s writeup:

  1. Lure. An email with a high-pressure subject, for example “Action Required: Password Expiration,” or an invoice, RFP, shared file, or e-signature request.
  2. Live code. The phishing page runs a script that talks to Microsoft’s identity provider in real time and generates a genuine device code. It shows the code with a “Copy Code” button and a “Continue with Microsoft” button pointing at the real devicelogin page.
  3. Polling. The script watches the 15-minute code window, checking in with the attacker’s server every three to five seconds.
  4. The paste. The code often lands on the clipboard automatically. The victim pastes it into Microsoft’s real page. If they’re already signed in, Microsoft says “simply pasting the code and confirming the request instantly authenticates the threat actor’s session.” If not, they enter password and MFA, on the real site.
  5. Persistence. In some cases, within 10 minutes the attackers registered a new device to get a Primary Refresh Token for long-term access. Others waited hours before setting inbox rules or pulling email.

Password managers don’t help, because the domain is correct. MFA doesn’t help, because the victim completes it for the attacker.

Where the AI comes in

This is where “AI-powered” earns the label, but after the break-in, not during it:

  • Lures: personalized phishing emails “aligned to the target’s role.”
  • Mailbox triage: AI assistants sifted through compromised inboxes and filtered for “high-value targets,” specifically people in “financial, executive, or administrative roles.”
  • Follow-on fraud: phishing messages “engineered” from the real email content in the stolen mailbox. This is the business email compromise: a message about a real invoice, in a real thread, from a real colleague’s account.

The kit sold for $1,500 up front plus $500 a month, advertised on Telegram, with 44 email/landing page themes. Microsoft tracks the developer as Storm-2992. Victims were concentrated in the US, Canada, UK, Australia, India, and France.

The fix

Microsoft’s first recommendation is short: “Microsoft recommends blocking device code flow wherever possible.” In Entra ID that’s a Conditional Access policy on authentication flows. If you have Teams Rooms or similar devices that need it, scope an exception to those specific device accounts rather than leaving it open for everyone.

Other items from the list:

  • Phishing-resistant MFA (FIDO2 keys, passkeys).
  • Raise the advanced phishing threshold to 2 or 3, enable Safe Links and zero-hour auto purge.
  • On compromise, revoking sessions isn’t enough. Microsoft notes access tokens can stay valid “for up to an hour” after refresh tokens are revoked, and recommends temporarily disabling the account.
  • Alert on new inbox rules created after a device code sign-in.

The first item is the one most tenants can do today. If nobody in your org signs in from a TV, there’s no reason this flow should be on.

Sources