Device code phishing registered 468 rogue Entra ID devices across 305 organizations
A device code phishing campaign registered 468 attacker-controlled Windows devices in the Microsoft Entra ID tenants of 305 organizations during November, according to findings from Huntress. The devices were associated with 326 user identities, giving the attackers a route to Microsoft cloud services that could persist beyond a password change.
The activity began with a lure presenting itself as a non-disclosure agreement protected by Adobe. Victims were prompted to approve a device sign-in code on a legitimate Microsoft page. Device code authentication is designed for equipment that cannot conveniently display a standard password sign-in, but an attacker can abuse the flow by generating the code and capturing the authentication tokens after a victim enters it.
Device registration extended access
After a victim approved a code, the attackers obtained access and refresh tokens associated with the Microsoft Authentication Broker app, Huntress said. An automated Python script redeemed the tokens from another IP address and registered a device in the victim organization’s Entra ID tenant. That registration provided a Primary Refresh Token, or PRT, which supports single sign-on to Microsoft services.
Huntress reported that a PRT obtained through this phishing chain remained usable after a password reset and could meet Conditional Access requirements that allow access only from registered devices. The attackers used the access to reach Office, OneDrive, SharePoint and Exchange. As a result, changing a password alone was not sufficient to remove the rogue device’s access: Huntress advised deleting the device from Entra ID as part of the response.
Each reported device had a name beginning with “MH-” followed by 16 uppercase hexadecimal characters. All were recorded with Windows build 10.0.19041.928, a value Huntress identified as the default build hardcoded in ROADtools, an open-source toolkit used for offensive and defensive Entra ID work. A ROADtools component can request tokens and register devices. Huntress said the actor appeared to be using the public toolkit, but did not attribute the campaign to a known threat actor.
Audit clues and campaign scope
Huntress also highlighted two characteristics administrators can check in Entra ID audit records: the reported Windows build is from a release that Microsoft stopped supporting in 2021, and the devices had no hardware identifiers. These details may help distinguish suspicious registrations from expected corporate devices, but should be assessed alongside an organization’s normal device inventory and enrollment patterns.
The naming pattern was not unique to individual tenants. Huntress found 46 “MH-” names in more than one organization; one appeared in 24 organizations over a 10-day period. The company said it did not know how the names were generated or why some were reused. Sign-ins were routed through residential proxy networks, mostly using US and UK broadband connections, with no single IP address used against more than two victims.
Separate scripted sign-ins came from datacenter IP addresses, with the infrastructure changing every few days. Huntress reported that five such addresses targeted 361 accounts across 337 organizations, generating 1,186 failed sign-ins and 197 successful ones. The most recently observed address was still active when Huntress published its findings.
Huntress grouped the activity into three related operations that used different device-naming patterns and tools. One operation resembled GraphSpy, an open-source tool for testing Microsoft 365 accounts that can capture tokens from device code sign-ins. The findings do not establish that the operators used the same tooling or belonged to the same known group. Microsoft documented a similar attack chain in February 2025 and linked it to Storm-2372.
Recommended response and controls
Organizations investigating a suspicious device registration should remove the device from Entra ID, revoke the affected user’s sessions and reset the account’s credentials, Huntress advised. Administrators should also review authentication and device-registration activity for related signs of access, including unfamiliar device names, absent hardware identifiers and the reported Windows build.
- Restrict which users can register or join devices, and set limits on the number of devices users may add.
- Require multifactor authentication for device registration.
- For organizations with Entra ID P1 licensing or higher, use Conditional Access policies to block device code authentication where it is not required.
Huntress noted a visibility gap in the affected environments: of the organizations with an “MH-” device, only 36 had Microsoft Defender connected to Huntress. Those organizations represented 47 victims, and Defender raised an incident for 25 of them. The figures underscore that monitoring coverage depends on which services an organization licenses and connects; identity audit logs and enrollment controls remain important parts of detecting unauthorized device registration.