Skip to main content
KBY Technologies Logo

Device Code Phishing: Rogue Entra Devices in 305 Organisations Survive a Password Reset

Huntress found 468 rogue Entra ID device registrations in 305 organisations. A password reset does not remove them.

KBY News Desk7 min read
A developer's hand interacting with code on a laptop screen in a workspace setting.

Underlined words are defined in the KBY Lexicon. Tap or click one to see what it means.

Resetting a compromised user’s password does not end this attack. The security firm Huntress published research on Thursday 3 December on a device code phishing campaign. It has left rogue Windows devices registered in at 305 organisations. The device is the attacker’s way back in, and it keeps working after the password changes.

Huntress counted 468 rogue device registrations across 326 identities during November 2026. It describes the campaign as active. If your tenant allows the device code sign-in flow, check your device list first. Do it even if you have not seen an alert.

#What Huntress found

Huntress says the campaign has an unusual signature. Most of the rogue devices are named “MH-” followed by 16 uppercase hexadecimal characters, such as MH-51FB898341CEA47A. Every registration it found was joined to Entra ID and reported the same Windows build, 10.0.19041.928.

That build number is the clue. Huntress says it is the default hardcoded in ROADtools, a public toolkit for Entra ID that can register devices. It corresponds to Windows 10 version 2004, which left Microsoft servicing in 2021, so a patched, legitimate machine would not report it.

The same names turn up in unrelated tenants. Huntress says 46 of the “MH-” names were registered in more than one organisation. One name appeared in 24 organisations over ten days, and others reached several organisations within two hours.

The attacker also seems to keep office hours. Huntress says very few registrations happened at weekends. Huntress is tracking two further clusters of rogue registrations. They may or may not be the same actor, and it does not name a threat group.

#How a sign-in code becomes a permanent device

Device code phishing abuses a legitimate Microsoft sign-in flow. The victim is shown a short code and told to enter it on Microsoft’s real sign-in page. Completing that step hands the attacker an access token and a refresh token, with no password stolen at all.

Huntress says the attacker then redeems the token against the device registration service. The sign-ins come through the Microsoft Authentication Broker application, and the victim first sees an AADSTS50199 interrupt error. After that the activity moves to a new IP address and an automated “python-requests” user agent.

Registering a device matters because of what comes with it. A device registered to a compromised account receives a Primary Refresh Token, which gives single sign-on to the user’s apps. Huntress says Microsoft invalidates that token on a password change only when it was obtained with the password. Here it came from a phished token instead.

Our reading is that this is why the attack suits an attacker who wants to stay. A registered device can also satisfy a rule that asks for a known device. The attacker then looks like a normal user on a normal laptop.

Once inside, Huntress says the actor usually logged into Azure Active Directory and Microsoft Office, then often reached OneDrive, SharePoint or Exchange. That points to data theft as the aim, though Huntress does not say what was taken.

#Why blocking IP addresses will not help

Most of the successful sign-ins came from residential proxy networks, mostly broadband addresses in the US and the UK. Huntress names DataImpulse, Oxylabs, NodeMaven, IPRoyal and Shifter among the networks involved. It says no single address served more than two victims, so a blocklist of bad IPs will not stop this activity.

Huntress also saw scripted sign-ins from five datacentre addresses, which rotated every few days. Between them they signed in, or tried to, against 361 accounts in 337 organisations. It counted 1,186 failed sign-ins against 197 successful ones. We read that as an attacker working through a long target list and accepting a high failure rate.

The better handle is the device itself. Huntress says three things make the campaign easy to hunt for in the identity logs. They are the naming pattern, the build number and the lack of hardware identifiers.

#Where Microsoft Defender fits

Huntress found a gap in coverage worth knowing about. Of all the organisations with an “MH-” device, only 36 had Microsoft Defender connected to its monitoring. Those 36 held 47 of the victims, and Defender raised an incident on 25 of them.

Each incident was titled “User session compromised by device code phishing (attack disruption)” at high severity. Huntress says attack disruption means Microsoft automatically contained the account, for example by disabling it or revoking its sessions. In one case Defender raised the incident about five minutes after the device was registered.

The limit is what the tenant licenses and connects. Defender contained the account where it was deployed, but that is not the same as removing the device. Huntress says the identity logs tell you which device to delete. Deleting it is the only way to cut off the attacker’s access.

#What to check this week

Start with the device list, because that is where the attacker’s foothold sits. These steps follow Huntress’s advice and Microsoft’s guidance, in the order we would take them.

  1. Open the Entra admin center and search the device list for names starting “MH-” and “DESKTOP-“. Check any device that reports Windows build 10.0.19041.928 and has no hardware identifiers.
  2. Delete every rogue device you find. Then revoke the owning user’s sessions and reset their credentials, in that order.
  3. Look back at the sign-in logs for the owning account. Huntress points to sign-ins through the Microsoft Authentication Broker and an AADSTS50199 error as the start of the pattern.
  4. Review which users have signed in with the device code flow. If nobody needs it, block it.

Following along? Tap a step’s number to tick it off.

The block is a Conditional Access policy. Microsoft recommends getting as close as possible to a unilateral block on device code flow. Allow it only for documented cases, such as legacy tooling that cannot be updated. Target all users and all resources, set the authentication flow condition to device code flow, and choose block access.

Microsoft also advises excluding your emergency access accounts and setting the policy to report-only first. Check the report before you switch it on. Our config trap on Conditional Access report-only mode explains what that mode can silently skip. Do not assume a clean report means the policy works.

#Our view: the password reset habit is the weak point

We think the lesson is about habit more than tooling. Most incident playbooks say reset the password and move on. For a phished token that registered a device, that step leaves the attacker’s door open. Any playbook for a suspected Microsoft 365 account takeover should add “check for and delete registered devices” before it closes.

Our reading of the Defender numbers is that many organisations lack the second pair of eyes. Only 25 of the 47 victims in Defender-connected tenants triggered an incident. That is a roughly even split, and it says nothing about the tenants with no Defender at all. Treat the identity logs as your primary source of truth.

We expect copycats. The tools are public, and the Huntress write-up describes how to tell the devices apart, which also tells other actors which names to change. A rename is cheap. That is why we would hunt on the build number and missing hardware identifiers as well as the name. It is also why blocking the flow beats hunting for it.

What would prove us wrong is simple. If Microsoft changes how a Primary Refresh Token behaves after a password reset, the persistence trick gets harder. The same goes if it turns off device code sign-in for most tenants by default. Neither has been announced. Huntress says Microsoft had not classified any of the Defender incidents when it wrote.

#What is still unknown

Several things are not settled. Huntress does not name the actor. It does not say what data was taken, or how many of the 305 organisations lost data. It also says it does not know how the “MH-” names are generated or why some are reused.

The headline numbers vary in the press. Some outlets round the figure to “more than 400” devices, while Huntress’s own count is 468 registrations. We use Huntress’s figures here because it ran the research. BleepingComputer has also reported the campaign and the 305-organisation count.

If you run a Microsoft 365 tenant for a small business, the practical answer is short. Delete any device you do not recognise, and block the device code flow unless you can name who needs it.

Evidence trail

Sources and verification

Primary documentation and external technical references used in this article.

  1. 01Huntress: M365 Device Code Phishing Campaign Leads to Hundreds of Rogue Entra ID Registrationshuntress.com
  2. 02Microsoft Learn: Block authentication flows with Conditional Access policylearn.microsoft.com
  3. 03BleepingComputer: Device-code phishing campaign plants rogue devices in 305 Entra tenantsbleepingcomputer.com

About this page

Credited to

Dates

Published

Corrections

No corrections are listed for this page. Some review sweeps corrected pages without naming each one; those are in the corrections log.

Found this useful? Follow KBY for more like it.

Reader Interaction

Comments

Add a thoughtful note on Device Code Phishing: Rogue Entra Devices in 305 Organisations Survive a Password Reset. Comments are checked for spam and held for moderation before appearing.

Loading comments...

Get new fixes by email.

For IT teams: new runbooks, configuration traps and fixes, and the Microsoft and Apple deadlines coming up, about twice a week.