Device Code Phishing: 468 Rogue Entra Devices, 305 Orgs

By 10 min read
Device code phishing campaign registering rogue Windows devices in Microsoft Entra ID tenants

Changing a phished user’s password is the first thing most help desks do. In a campaign Huntress published on 3 December 2026, that step left the attacker fully logged in, because the attacker had already enrolled a Windows device of their own in the victim’s Microsoft tenant.

The campaign is a device code phishing operation that, during November 2026, registered 468 rogue devices for 326 Entra ID identities in 305 organizations, according to Huntress researchers Andrea Hatcher, Matt Poto and Andrew Schwartz. Each fake device receives a Primary Refresh Token that Huntress says survives a password reset, so cleanup must start with deleting the device. Huntress has not tied the campaign to any named actor, and BleepingComputer first reported the findings the same morning.

What is device code phishing?

Device code phishing is the abuse of the OAuth 2.0 device authorization grant, a sign-in method built for devices such as smart TVs and printers that cannot show a normal login page. The device displays a short code, and the user types it at a Microsoft web page on a phone or laptop to approve the sign-in.

In the attack, the criminal starts the flow, receives the code and sends it to the victim with a convincing reason to enter it. The victim signs in on the genuine Microsoft page, often including MFA, and the tokens are delivered to the attacker’s session. Nothing about the page itself looks fake, which is why the technique keeps working.

Why is this campaign different from ordinary token theft?

Stolen access tokens expire within hours. This campaign goes further: it uses the phished tokens to register a new device in Entra ID, Microsoft’s cloud identity service. A registered device can request a Primary Refresh Token (PRT), a long-lived credential that Windows uses for single sign-on to Microsoft 365 apps.

Four headline numbers from the device code phishing campaign Huntress tracked in November 2026.
One month of rogue registrations seen across Huntress-monitored tenants. Data: Huntress.

What did Huntress find?

Huntress tracked the activity through the tenants it monitors and published “M365 Device Code Phishing Campaign Leads to Hundreds of Rogue Entra ID Registrations” on 3 December 2026. The key figures:

Measure Value Source
Rogue device registrations, November 2026 468 Huntress
Identities affected 326 Huntress
Organizations affected 305 Huntress
Devices registered in the first two weeks of November 276 at 168 organizations BleepingComputer, citing Huntress
Distinct device names seen 46 BleepingComputer, citing Huntress
Most reused name MH-51FB898341CEA47A, 24 organizations over 10 days Huntress
Windows build reported 10.0.19041.928 Huntress

Huntress also says the operator appears to work on weekdays, which fits a human running a toolkit rather than a fully automated bot.

Five datacenter IPs, hundreds of accounts

The scripted sign-ins that followed each phish came from a small set of hosting addresses. Huntress lists five IPs, hosted by BK Customers, FREAKHOSTING LTD, Artnet Sp. z o.o. and Datacamp Limited, that touched 361 accounts in 337 organizations, with 1,186 failed and 197 successful sign-ins. Those counts include failed attempts, which is why they are higher than the number of confirmed registrations.

The first, interactive part of each session ran through residential proxy services. Huntress names DataImpulse, Oxylabs, NodeMaven, IPRoyal and Shifter, and says no single residential IP served more than two victims. That makes IP blocking on the victim side close to useless; the datacenter addresses are the better hunting lead.

How does the attack work, step by step?

Huntress reconstructed the chain from sign-in and audit logs. At a conceptual level it runs like this:

  1. The victim receives a lure and is asked to enter a device code at Microsoft’s sign-in page.
  2. The victim signs in. Huntress saw the first interactive sign-ins hit error AADSTS50199, a confirmation prompt, while signing in to the Microsoft Authentication Broker app, from a residential proxy.
  3. The attacker receives access and refresh tokens for the Microsoft Authentication Broker client.
  4. The session pivots: the next, non-interactive sign-in comes from a new IP, geolocated to Poland, with the user agent python-requests/2.32.5.
  5. The attacker redeems the token against the Entra device registration service and enrols a fake Windows device, usually named MH- plus 16 hex characters.
  6. The device obtains a Primary Refresh Token.
  7. With that token the attacker signs in to Entra ID and Office, then moves to OneDrive, SharePoint or Exchange, according to BleepingComputer’s summary of the report.
Seven-step device code phishing chain ending in a rogue Entra ID device with a refresh token.
The rogue device, not the stolen password, is what keeps the attacker inside. Data: Huntress, BleepingComputer.

Why the Microsoft Authentication Broker matters

The choice of client is deliberate. In February 2025 Microsoft reported that Storm-2372 had switched to the Microsoft Authentication Broker client ID in its device code phishing, because the refresh token it returns can be exchanged for a token to the device registration service. That is the exact door this campaign walks through.

Why does the rogue device survive a password reset?

Huntress explains that Microsoft revokes a PRT on a password change only when the token was originally obtained with the password. A PRT minted through an approved device code never involved the password, so it keeps working. Huntress adds that the registered device can also satisfy a Conditional Access rule that demands a registered device, turning a security control into a free pass.

What is ROADtools and why is it in this story?

ROADtools is an open-source Entra ID research toolkit widely used by penetration testers to enumerate tenants and register test devices. Huntress says every registration in this campaign reported Windows build 10.0.19041.928, the default value hardcoded in ROADtools, and that DESKTOP- style names, ROADtools’ default naming convention, also appeared. Huntress suspects ROADtools was abused. That does not make the tool malicious; it means defenders should know its fingerprints.

How does this compare with earlier device code phishing?

Device code phishing is not new, but each wave has added something. The table below sets this campaign against the earlier cases its sources mention.

Campaign When Scale reported Notable trait Attribution
Storm-2372 (Microsoft) Reported February 2025 Not given as an org count Switched to the Authentication Broker client to register devices Microsoft: suspected Russian nation-state actor, per Huntress
March 2026 wave (Huntress) Began 2 March 2026 344 organizations in five countries Abused Railway.com hosting Later linked to the EvilTokens phishing-as-a-service kit, per Huntress
November 2026 MH- cluster (Huntress) November 2026 468 devices, 305 organizations Mass rogue device registration with ROADtools fingerprints None

BleepingComputer also notes that phishing-as-a-service kits such as Tycoon2FA, Greatness and Kali365 now include device code flows. Huntress does not say which kit, if any, the November operator used.

Timeline of public device code phishing reports from February 2025 to December 2026.
The same technique, reported three times in under two years, each time at larger scale. Data: Microsoft, Huntress.

If you have read our breakdown of BluePhishing and the consent click that created 250 agent identities, the pattern will feel familiar: the victim never types a password into a fake site, yet the attacker walks away with durable access to the tenant.

Who is affected and how do you check your exposure?

Any Microsoft 365 tenant where users can complete a device code sign-in and register devices is exposed. That is the default for many organizations. Huntress estimated in June 2026 that about a quarter of organizations paying for Conditional Access had not configured it, which leaves this path open even where the licence to close it exists.

To check quickly whether you are already affected, answer three questions:

  • Has anyone in the tenant signed in with the device code flow in the last 60 days, and was it expected?
  • Are there registered devices with names starting MH- or DESKTOP-, or reporting build 10.0.19041.928?
  • Did any device registration follow, within minutes, a sign-in from python-requests or another scripting client?

How do you detect a rogue device registration?

Detection relies on two Entra log sources: the audit log, which records device registrations, and the sign-in logs, which record how each session authenticated.

Audit log hunting

  • Device names matching MH- followed by 16 uppercase hex characters, the DESKTOP- default, or other generic names. Wiz has noted attackers moving from DESKTOP-XXXXXXXX towards generic names such as “Work PC”, so do not rely on one pattern.
  • Operating system build 10.0.19041.928, Windows 10 version 2004, which has been out of servicing for years and should be rare on real endpoints.
  • Registrations with missing hardware identifiers, and several registrations for the same user minutes apart.

Sign-in log hunting

  • Sign-ins that used the device code authentication flow, especially to the Microsoft Authentication Broker.
  • A session that switches from a normal browser user agent to python-requests, httpx or Node-based clients right before a registration.
  • Sign-ins from the five hosting addresses Huntress published, and from residential proxy ranges that do not match the user’s normal location.

Microsoft Defender helped where it was present, but not everywhere. Of the organizations with an MH- device, only 36 had Defender connected to Huntress. Those 36 held 47 victims, and Defender raised incidents for 25 of them.

Bar chart showing Defender raised incidents for 25 of 47 victims in monitored tenants.
Even with Defender connected, about half the victims produced no incident. Data: Huntress.

MITRE ATT&CK techniques

Brandefense’s summary of the Huntress report maps the activity to these techniques:

Technique ID
Phishing T1566
Valid Accounts: Cloud Accounts T1078.004
Obtain Capabilities: Tool T1588.002
Account Manipulation: Device Registration T1098.005

For the full indicator list, including all device names and IPs, use the Huntress report linked in the sources rather than a copy.

How do you remove the attacker and prevent it?

Order matters here. Huntress and BleepingComputer both stress that a rogue device left in place keeps a working PRT even after the password changes.

  1. Delete the rogue device in Entra ID first. This is the step that actually ends the attacker’s persistent access.
  2. Revoke all of the user’s sessions and refresh tokens. Do this after the device is gone so the attacker cannot mint new tokens from it.
  3. Reset the user’s credentials and review their MFA methods for anything the attacker added.
  4. Check the mailbox and files the user can reach: inbox rules, forwarding, OAuth app consents and recent OneDrive or SharePoint downloads.
  5. Block device code flow with Conditional Access for every user and app that does not need it. Microsoft’s own guidance, as reported by BleepingComputer, is to block it wherever it is not required.
  6. Require MFA to register or join devices, limit who may register devices, and lower the per-user device quota.
  7. If you lack Conditional Access licences, enable Security Defaults, and train staff to enter a device code only for a sign-in they started themselves.

Huntress’s June 2026 guidance adds a caveat: blocking device code flow can interfere with some legitimate device registration scenarios, so test the policy on a pilot group before you roll it out to everyone. It also suggests disabling device writeback where it is not needed.

For a related lesson in how stolen cloud credentials spread through many tenants at once, see our analysis of Key Eater and the stolen Entra app secrets that hit 27 organisations.

What is still unknown?

The public reporting leaves several gaps:

  • Who runs it. Huntress names no actor, and no other vendor has claimed the cluster yet. Brandefense notes that a similar technique to Storm-2372 does not establish attribution.
  • The lure. The coverage focuses on what happened after the phish; how victims were persuaded to enter the code is described only briefly.
  • The kit. It is unclear whether a phishing-as-a-service kit is behind the volume, or one operator with ROADtools.
  • True scale. All figures come from tenants Huntress protects. Organizations outside that view are not counted.
  • Data taken. The sources describe access to OneDrive, SharePoint and Exchange but give no volume of stolen data.
  • Microsoft’s view. Neither BleepingComputer nor Brandefense carried a Microsoft comment.

The bottom line

This device code phishing campaign turned one approved code into a registered device and a token that outlives a password reset, at 305 organizations in a single month. If you respond to a phished Microsoft 365 account, delete its unknown devices before anything else. Then block device code sign-in for everyone who does not need it, because that one policy closes the door the whole chain depends on.

Sources

This article is written for defenders and authorised security testers. Only test systems you own or have written permission to assess.

Frequently asked questions

What is device code phishing?

Device code phishing abuses the OAuth device authorization flow, which lets a device without a keyboard sign in by showing a short code that the user types on another device. The attacker starts the flow, sends the code to the victim, and receives the victim's tokens when the victim signs in on Microsoft's real page.

Why does a password reset not stop device code phishing?

In this campaign the attacker registers a device in Entra ID and gets a Primary Refresh Token for it. Huntress says that token was obtained through the phished device code, not the password, so changing the password does not cancel it. Only deleting the rogue device cuts that access.

How many organizations were hit by the November 2026 device code phishing campaign?

Huntress counted 468 rogue device registrations across 326 identities in 305 organizations during November 2026. Those are only the tenants Huntress monitors, so the real total may be higher.

What are the MH- devices in Entra ID?

MH- followed by 16 uppercase hexadecimal characters is the naming pattern Huntress saw on most rogue devices in this campaign, for example MH-51FB898341CEA47A. Some names were reused in up to 24 unrelated organizations over about 10 days.

Who is behind the device code phishing campaign?

Huntress has not attributed it to any named actor. The technique resembles what Microsoft reported for Storm-2372 in February 2025, but a shared technique does not prove the same operator.

How do I block device code phishing in Microsoft 365?

Create a Conditional Access policy that blocks the device code authentication flow for everyone who does not need it, require MFA to register or join devices, and limit who can register devices. Tenants without Conditional Access licences should at least enable Security Defaults.

How do I find rogue devices registered by device code phishing?

Search Entra ID audit logs for device registrations with names starting MH- or DESKTOP-, the build 10.0.19041.928, or missing hardware details, and check sign-in logs for a session that switches from a normal browser to python-requests shortly before a registration.

Is ROADtools malware?

No. ROADtools is an open-source toolkit for researching and testing Entra ID, widely used by penetration testers. Huntress suspects it was abused here because every rogue device reported the build number hardcoded in ROADtools.

Keep reading

device code phishingMicrosoft Entra IDPrimary Refresh TokenROADtoolsMicrosoft 365threat intelligence