Hackers plant rogue devices in Microsoft Entra ID across 305 organizations
A device code phishing campaign registered 468 attacker-controlled Windows devices in the Microsoft Entra ID tenants of 305 organizations, according to Huntress.
The devices, registered in November, were tied to 326 user identities, and each carried a name made of the “MH-” prefix followed by 16 uppercase hexadecimal characters.

Source: Huntress
Device code phishing abuses a Microsoft sign-in method meant for devices that can’t easily handle a password prompt, such as smart TVs and printers. The victim enters a code on a legitimate Microsoft page and signs in, and the attacker who generated that code receives tokens that give access to the victim’s account.
One code, a device and a token that outlives the password
Huntress describes a lure posing as a non-disclosure agreement (NDA) protected by Adobe. Once the victim approves the code, the attacker receives access and refresh tokens linked to the Microsoft Authentication Broker app. An automated Python script then redeems those tokens from a different IP address and registers a new device in the organization’s Entra ID, Microsoft’s cloud identity service.
That registration hands the attacker a Primary Refresh Token (PRT), a credential used for single sign-on to Microsoft services. When obtained through phishing, the token keeps working after the victim’s password is changed, and it can satisfy Conditional Access policies that only let registered devices in. The attacker used it to get into Office, OneDrive, SharePoint and Exchange.
“A password reset alone doesn’t remove the access; the device has to be deleted,” the researchers wrote.
The sign-ins were routed through residential proxy networks, mostly from US and UK broadband connections, and no single IP address was used against more than two victims.
A toolkit default gives it away
Every rogue device reported Windows build 10.0.19041.928, the default build hardcoded in ROADtools, an open-source toolkit for Microsoft Entra ID. Its developer built it for both offensive and defensive security work, and one of its components can request tokens and register devices.
“The threat actor appears to be leveraging the ROADtools public toolkit to register devices,” the company said.
That build belongs to a Windows 10 release Microsoft stopped supporting in 2021, and the devices carried no hardware identifiers, two details Huntress recommends admins look for in their audit logs.
Forty-six of the MH- names turned up in more than one organization, and one of them appeared in 24 organizations over 10 days. Huntress says it doesn’t know how the names are generated or why some get reused.
The attacker also ran scripted sign-ins from datacenter IP addresses, switching to a new one every few days. Five such addresses targeted 361 accounts at 337 organizations, logging 1,186 failed sign-ins and 197 successful ones, and the most recent of them was still in use when the report went out.
“Microsoft Defender XDR only sees what a tenant licenses and connects. Of all the organizations with an MH- device, only 36 had Defender connected to Huntress. Those 36 organizations held 47 of the victims, and Defender raised an incident on 25 of them,” the Huntress team noted.
Huntress grouped the activity into three related operations that use different device naming patterns and tools, one of them resembling GraphSpy, an open-source tool for testing Microsoft 365 accounts that can capture tokens from device code sign-ins.
The company hasn’t tied any of them to a known threat actor. Microsoft documented a similar attack chain, linked to a group it tracks as Storm-2372, in February 2025.
Advice for admins
Organizations that find a rogue device should delete it in Entra ID, revoke the user’s sessions and reset the account’s credentials, Huntress advises. To prevent this, the company recommends limiting who can register or join devices and how many each user can add, and requiring MFA for device registration. Organizations with Entra ID P1 licensing or higher can block device code authentication through Conditional Access policies.