• Events & Webinars
  • Resources
    • Blog
    • Case Studies
    • News
    • Newsletter
    • Infographics
    • Papers
    • Posters
    • Video
  • Careers
    • Careers at HBS
    • Open Positions
    • Student Opportunities
  • About HBS
    • About Us
    • Leadership
    • Locations
    • Partners
    • Green Initiatives
  • Events & Webinars
  • Resources
    • Blog
    • Case Studies
    • News
    • Newsletter
    • Infographics
    • Papers
    • Posters
    • Video
  • Careers
    • Careers at HBS
    • Open Positions
    • Student Opportunities
  • About HBS
    • About Us
    • Leadership
    • Locations
    • Partners
    • Green Initiatives
HBS logo
HBS Logo
  • Infrastructure
    • CLOUD

      • Cloud Solutions
      • Public Cloud
      • Hybrid Cloud
      • Infrastructure as a Service
      • Cloud Security Solutions
      • Backup, Replication and Disaster Recovery
      • HBS Cloud Hosting Services

      DATA CENTER

      • Data Center Solutions
      • Traditional Data Center
      • Hyperconverged
      • Colocation
      • Directory Services
      • Cloud Email and Calendar Solutions

      NETWORK AND ACCESS

      • Network Infrastructure
      • Enterprise Mobility
      • Wireless Solutions
      • SD-WAN
      • Structured Cabling
      • Staff Augmentation
  • Managed Services
    • MANAGED ONE

      • Managed One Overview
      • Managed Backup and Disaster Recovery
      • Managed Email and Collaboration Security
      • Managed Firewall

       

      • Managed HaaS and SaaS
      • Managed IT Help Desk
      • Managed Network and Server Monitoring

      HBS + PARTNER SOLUTIONS

      • HBS Secure with Verkada
      • HBS Collaborate with Webex
      • Managed XDR
      HBS Managed One Megamenu Graphic
  • Modern Workplace
    • MICROSOFT

      • Microsoft Licensing Management
      • Microsoft Modern Workplace
      • Microsoft Fabric
      • Microsoft Funding Opportunities

       

      • Dynamics 365 Business Central
      • Dynamics 365
      • Dynamics GP

      COLLABORATION

      • Audio Visual
      • Unified Communication Solutions
      • HBS Collaborate with Webex
  • Professional Services
    • ADVISORY

      • Virtual CISO
      • Virtual CIO
      • Project Management
      • IT Business Consulting

      ENGINEERING SERVICES

      • Staff Augmentation

      AI & ANALYTICS

      • Artificial Intelligence
      • AI Advance
      • AI Predict
      • AI Assist
      • Data Management and Analytics
      • Microsoft Fabric

      APPLICATION INNOVATION

      • Website Development
      • Application Development

      DOCUMENT MANAGEMENT

      • Document Management Services
      • Document and Check Scanners
  • Security
    • CYBERSECURITY

      • Managed XDR
      • Penetration Testing
      • Vulnerability Scanning
      • Email Security Services
      • Digital Forensics and Incident Response
      • Backup, Replication and Disaster Recovery
      • Firewalls
      • Cloud Security Solutions

       

      • Virtual CISO
      • Virtual Security Team
      • Virtual Security Engineer
      • Cybersecurity Risk Assessment
      • Governance and Compliance
      • SOC 2
      • CMMC
      • Managed Security Awareness Training

      PHYSICAL SECURITY

      • Security Solutions
      • HBS Secure with Verkada
      Cybersecurity Risk Assessment Megamenu Graphic
  • Search
Contact Us
Blog

Device Code Phishing Explained—And How to Protect Against It

  • Kristen Hubbard, HBS Practice Manager - Penetration Testing
  • Updated: March 10, 2026
  • Read Time: 4 mins
What Is Device Code Phishing

In this article...

  • What is device code phishing?
  • How device code authentication works
  • How attackers exploit the process
  • Real-world example: Storm-2372
  • How to protect your users and environment

Cyber crime—by and large—is subtle. One of the latest tactics, device code phishing, uses real login pages and real authentication codes to sneak into your accounts. Here’s how it works—and how to stop it.

What Is Device Code Phishing?

Device code phishing is a fairly new kind of social engineering attack that tricks users into approving unauthorized access to their accounts—on a real login page, using a real code. The scary part? There’s no fake site or suspicious link to flag. It’s all legitimate—except the intent.

This method made headlines earlier this year when Microsoft revealed a phishing campaign by a nation-state threat actor, Storm-2372, targeting Microsoft 365 users through this technique.

What Is a Device Code?

device code flow
Courtesy of Microsoft

You’ve probably used one—without knowing the name.

Device code authentication is a secure, user-friendly way to log in on devices where typing credentials is a pain—like TVs, printers, gaming consoles, etc.

Instead of entering a full username and password on the device, you go to a secure website (like microsoft.com/devicelogin) on a separate device and enter a short code. The device then initiates the authentication flow, such as entering your username, password, and MFA. This binds the original device to your identity.

Simple. Convenient. Trusted.

That trust is exactly what attackers are exploiting.

How Device Code Phishing Works

In a device code phishing attack, the bad actor initiates the device login flow themselves—using a legitimate service. They get a real device code from a real service like Microsoft.

Then, they send that code to you via a phishing email or chat, asking you to go to the real Microsoft login site and type it in. Maybe they say it’s part of a Teams invite or an urgent security update.

If you do it? You just authenticated their device with your account. Now they’re inside, with your access—and possibly your role and privileges. No password stolen. No MFA prompt bypassed. Just a legitimate device, now recognized as yours.

And unless device code authentication is revoked or expires, the attacker could remain logged in—undetected—for days or weeks.

Real-World Device Code Phishing Example: Storm-2372

Storm-2372 Phishing Lure example
Courtesy of Microsoft

Microsoft linked this technique to a threat actor they call Storm-2372—believed to be a Russian state-sponsored group. Their campaign targeted government, defense, and IT service providers using fake Teams messages to launch the attack.

The link? Real
The device code? Real
The phishing message? Highly convincing

Once access was granted, Storm-2372 moved laterally, collected sensitive information, and escalated privileges—all under the radar.

Why Device Code Phishing Is So Dangerous

Most phishing education teaches users to look for fake websites, strange domains, and suspicious requests. But with device code phishing:

The site is real (like microsoft.com)
The code is real
The phishing message feels routine

That’s why device code phishing can bypass traditional defenses and user instincts.

How to Fight Against Device Code Phishing

Security Awareness Training Device Code Phishing

1. Educate Your Users
Teach employees that they should initiate any login process involving device codes. If a device code arrives unexpectedly—especially via email or chat—it’s a red flag.

Ask:

  • Did I start a login flow?
  • Am I expecting to enter a code?
  • Does the request feel out of context?

If not—don’t enter the code.

2. Use Conditional Access (Microsoft Entra)
Disable device code flow entirely for your organization if it’s not necessary. Microsoft Entra admins can do this through Conditional Access policies.

Consideration: This improves security but may impact user convenience. Weigh the tradeoffs based on risk.

3. Implement Location and IP-Based Restrictions
Geo-fencing and IP allow-lists can help ensure device code authentication only works from approved regions or networks.

4. Audit and Revoke Suspicious Sessions
Use tools like Microsoft Entra ID sign-in logs to monitor unusual sign-ins. If a device is compromised, revoke the session immediately.

5. Go Beyond MFA
Consider phishing-resistant authentication methods like certificate-based authentication or FIDO2 security keys. They’re harder to socially engineer.

Final Thoughts on Device Code Phishing

final thoughts on device code phishing

Device codes are meant to make life easier. But that convenience can open the door to stealthy, long-term compromise—especially in environments using Microsoft 365.

Attackers like Storm-2372 are betting on user trust. Your defense? Awareness, proactive policy settings, and identity monitoring.
Train your people. Tighten your controls. And never enter a device code unless you initiated it.

Need help reviewing your authentication strategy or Microsoft Entra policies?

We’ll help you stay ahead of evolving threats—without slowing you down.

Device Code Phishing FAQs

What is device code phishing?

Device code phishing is a social engineering attack where hackers trick users into entering a legitimate device code (previously obtained by the attacker) into a real login page, thereby authorizing the attacker’s device.

How does device code authentication work?
It lets users log into a service on one device by entering a short code into a different device. Once entered, the original device is “trusted” without requiring full login credentials.
Why is device code phishing so hard to detect?
Because it uses legitimate login URLs and real device codes. There’s no fake website—just a real user being tricked into approving a malicious login.
Can I disable device code flow in Microsoft environments?

Yes. Microsoft Entra (formerly Azure AD) allows admins to block device code authentication using Conditional Access policies. Microsoft has been slowly rolling this out to all tenants.

Who is Storm-2372?
Storm-2372 is a threat actor believed to be linked to Russian state-sponsored operations. They’ve used device code phishing to target Microsoft 365 users in critical industries.

Related Content

Man Presenting to a Room

Security Awareness, Training, and Education – A Learning Continuum

In the realm of information technology (IT) and information security, the distinction between “security awareness” and “training” is crucial. Learn why.

Learn More »
E-mail phishing victim on laptop

How a Hacker Conned an Accountant with $400,000 Phishing Attack

See how the hacker got away with a small fortune for nearly a week—and how good incident response and digital forensics work got most of it back.

Explore More »
Managed Security Awareness Training

Managed Security Awareness Training

Boost cybersecurity with Managed Security Awareness Training from HBS: Empower employees to combat phishing and enhance defense. Transform risk into strength.

Read More »
  • Authentication, Cybersecurity, Phishing, Security Awareness
Blog

Connect:

[email protected]  |  800.236.7914

HBS logo

HQ | 1700 Stephen Street
Little Chute, WI 54140
Locations

HBS Remote Support | Service & Technical Support | E-Bill Portal
Standard Terms & Conditions | Cookie Policy | Privacy Policy | Onboarding Form | End User Agreements | E-Bill FAQ | Site Map
Any purchase is governed by the HBS Standard Terms and Conditions.
©2026 Heartland Business Systems. All rights reserved.

Halo from HBS
This chat may be recorded as described in our Privacy Policy.