How Device Code Phishing Abuses OAuth to Steal Microsoft 365 Sessions

· Original article ↗

Summary

Device code phishing tricks users into approving attacker-generated login codes, giving attackers OAuth tokens that can bypass MFA. The article explains recent campaigns and outlines Conditional Access, device-registration monitoring, and other mitigations.

Key points

  • Attackers generate device codes and use phishing lures to get victims to authorize them, handing attackers valid OAuth tokens.
  • Stolen tokens can let attackers bypass MFA and exploit a legitimate sign-in flow that may not trigger familiar phishing warnings.
  • Storm-2372 used device code phishing in February 2025 after building rapport with targets through messaging platforms.
  • Huntress detected a campaign beginning March 2, 2026, targeting 344 organizations across six countries; it was later attributed to the EvilTokens phishing-as-a-service platform.
  • The campaign used Railway.com as token-harvesting infrastructure and personalized lures delivered through multi-hop redirects.
  • Recommended defenses include blocking device code flow with Conditional Access where feasible, monitoring new device registrations and suspicious token exchanges, and assessing operational exceptions such as Device Registration Service needs.

Article Details

Topic
Device code phishing attacks, including their OAuth token-theft mechanics, observed campaigns, and defensive mitigations.

People

Threat Actors

Vendors

Products

Tools

Countries

Industries

Related Articles