Device-code phishing in 305 Entra tenants: why a password reset does not kick the attacker out
Huntress found a phishing campaign that registered 468 fake Windows devices in 305 Microsoft Entra tenants in November. Each fake device gets a long-lived sign-in token that a password reset does not cancel. This page explains the trick in plain words and lists what to check in your own tenant.
Read the original first: https://www.huntress.com/blog/device-code-phishing-m365-registrations
In one minute
- Huntress saw a phishing campaign all through November 2026. It hit 305 organizations and 326 accounts, and registered 468 rogue devices.
- The lure was a fake Adobe-protected NDA. It asked people to approve a sign-in code, which handed the attacker tokens for the account.
- The attacker then registered a fake Windows device in Entra ID. That device got a Primary Refresh Token (PRT), a long-lived sign-in token.
- Huntress says a PRT made this way survives a password reset. Only deleting the rogue device removes the access.
- The fake devices are easy to spot: names like MH- plus 16 hex characters, an old Windows build (10.0.19041.928) and no hardware IDs.
- Blocking device code sign-in with Conditional Access needs Entra ID P1 or higher. Tenants without it can still limit who may register devices.
How the trick works
Device code sign-in is a Microsoft sign-in method made for things without a keyboard, like a TV. The device shows a short code, and you type it into a Microsoft page on another screen. Whoever started the request gets the sign-in.
In this campaign, the attacker starts the request and sends the code to the victim inside a fake Adobe-protected NDA email. When the victim types the code and approves, the attacker gets access and refresh tokens for the Microsoft Authentication Broker app.
Huntress says the attacker then uses those tokens right away with Microsoft's Device Registration Service. The logs show a new IP address in Poland and the python-requests user agent, which is a script, not a browser.
The script registers a fake Windows device. Huntress says it matches the default settings of ROADtools, a public toolkit for testing Entra ID: Windows build 10.0.19041.928 and no hardware IDs.
A registered device can get a Primary Refresh Token. The attacker used it to sign in to Office and reach OneDrive, SharePoint or Exchange.
Why a password reset is not enough
This is the part that matters most for anyone cleaning up.
Huntress says Microsoft cancels a PRT on a password change only when the token was first obtained with the password. In this attack the victim never typed a password into anything the attacker ran. The token came from the approved code, so the reset leaves it alone.
The PRT can also pass Conditional Access rules that require a registered device, because the fake device is registered.
So the clean-up step that works is deleting the rogue device in Entra ID. Then revoke the user's sessions and reset the credentials.
The numbers Huntress shared
- 468 rogue device registrations with MH- names, across 326 accounts in 305 organizations.
- 46 of the MH- names were registered in more than one organization.
- 5 datacenter IP addresses ran scripted sign-ins for 361 accounts in 337 organizations: 1,186 failed and 197 worked. The attacker used one IP at a time and moved every few days.
- 36 organizations with Microsoft Defender connected held 47 MH- victims. Defender raised incidents on 25 of them.
Huntress splits the activity into three operations by tools and devices. It rates the main one high confidence. It notes the method looks like Storm-2372, a group Microsoft wrote about in February 2025, but says that overlap does not prove who is behind it.
Check your tenant
These are the markers Huntress published. We did not run them against a live tenant.
Device name pattern: ^MH-[0-9A-F]{16}$
OS build, no hardware IDs: 10.0.19041.928 (also 10.0.19045.2006, 10.0.19045.0, 10.0.26100)
Other default names: DESKTOP- plus 8 characters, GraphSpy-Device
User agents: python-requests/2.32.5, Dsreg/10.0 (Windows 10.0.19041.928)
Sign-in IPs: 181.214.147[.]42, 92.62.251[.]249, 37.252.11[.]196,
146.103.38[.]149, 193.109.193[.]166- In the Entra audit logs, look for device registrations that match the names or builds above.
- In the sign-in logs (interactive and non-interactive), look for device code sign-ins, and for a user agent that changes from a normal browser to a script.
- For any hit: delete the device, revoke the user's sessions, reset credentials, and check the account's MFA methods and inbox rules for anything new.
Which fix needs which license
Huntress sorts its advice by Entra license. Here it is in one list:
- Any tenant: limit who can register or join devices, cap the number of devices per user, and require MFA to register a device. Turn on Security Defaults if you have no Entra ID P1.
- Entra ID P1 and up: Conditional Access rules that block device code sign-in, require managed and compliant devices, require MFA and limit where people can sign in from.
- Entra ID P2: add risk-based Conditional Access.
Our reading: blocking device code sign-in stops this lure at the first step, but it is the P1 tier. A tenant without P1 still has a cheap fix: stop regular users from registering devices at all.
Who is affected
| Case | Status |
|---|---|
| Microsoft 365 and Entra ID tenants that allow device code sign-in | Exposed to this lure. |
| Accounts that approved a code | Attacker may hold a PRT through a rogue device; a password reset alone does not remove it, per Huntress. |
| Tenants with Conditional Access blocking device code sign-in (P1 and up) | Huntress names this as a main fix. |
| Tenants with Microsoft Defender connected | Defender raised incidents on 25 of 47 MH- victims Huntress saw. |
What to do
- Search Entra audit logs for devices named MH- plus 16 hex characters, or on build 10.0.19041.928 with no hardware IDs.
- Search sign-in logs for device code sign-ins and the 5 IP addresses Huntress listed.
- For any hit, delete the device first, then revoke sessions and reset credentials.
- Check MFA methods and inbox rules on any affected account.
- Block device code sign-in with Conditional Access if you have Entra ID P1, and limit who can register devices either way.
What is still unknown
- Who is behind it. Huntress sees overlap with Storm-2372 but says it does not confirm that.
- How the MH- names are made, and why some show up in more than one organization.
- How big the campaign is outside November and outside the tenants Huntress watches.
- How the lure emails were sent, beyond the fake Adobe NDA theme.
Sources
- Huntress: M365 Device Code Phishing Campaign Leads to Hundreds of Rogue Entra ID Registrations (Dec. 3, 2026) - the original report
- BleepingComputer: Device-code phishing campaign plants rogue devices in 305 Entra tenants