M365 Device Code Phishing Campaign Leads to Hundreds of Rogue Entra ID Registrations

Key Takeaways

  • Huntress is tracking an active device code phishing campaign resulting in hundreds of rogue device registrations in Microsoft 365 environments using a recognizable naming pattern: MH- followed by 16 uppercase hex characters. In November 2026, we observed 468 rogue device registrations tied to this campaign, across 326 identities in 305 organizations.

  • After stealing session tokens via device code phishing, the threat actor appears to be leveraging the ROADtools public toolkit to register devices in victims' Entra ID environments. Once inside a compromised environment, the threat actor usually logged into Azure Active Directory and Microsoft Office, often pivoting to access resources such as OneDrive, SharePoint, or Exchange.

  • Password resets alone do not remove the threat actor's access–the rogue device must be deleted from the M365 environment manually. 

  • We are simultaneously tracking two other clusters of rogue device registrations that may or may not be attributed to the same threat actor.

Background

Huntress is tracking an active device code phishing campaign wherein the threat actor registers their own Windows devices to compromise victims' Microsoft 365 environments. Throughout November 2026, we observed 468 registrations across 326 identities in 305 organizations. The threat actor appears to work weekdays; very few registrations occurred during  the weekends. Most devices follow the same naming pattern beginning with MH-, and report the same Windows build, which makes the campaign easy to hunt for.

device registrations in the first two weeks

Figure 1: The number of rogue device registrations, identities compromised, and organizations affected in the first two weeks of the campaign we tracked.

How we discovered the campaign

Huntress Managed ITDR collects Microsoft 365 and Entra ID audit logs for our partners' tenants, including every device registration and the device details that come with it: name, reported Windows build, join type, and hardware identifiers. Huntress Managed EDR also ingests Microsoft Defender XDR incidents through its Microsoft Defender integration.

The campaign surfaced where those two sources meet; Defender flagged accounts for device code phishing and suspicious device registration, and on the same accounts the Entra audit logs showed a new device that reported a tool's default Windows build and carried no hardware identifiers. Pivoting on those device details across every tenant we monitor turned single alerts into a pattern: the same MH- naming scheme, the same build, and in some cases the exact same device name, across hundreds of organizations.

What the devices look like

Most device names begin with  MH- followed by 16 uppercase hex characters, such as MH-51FB898341CEA47A. Every registration we found was joined to Entra ID and reported Windows build 10.0.19041.928.

That build is the default hardcoded in ROADtools, a public toolkit for Entra ID that can register devices.  10.0.19041.928 corresponds to Windows 10 version 2004, which left Microsoft servicing in 2021. A legitimate, patched Windows machine would not report this build. 

MH- registrations

The same device names show up in unrelated organizations. 46 names beginning with MH- were registered in more than one organization. Some names stay in use for more than a week, while others hit several organizations within two hours. We don't know how the names are generated or why some get reused.  

Below is a list of MH- device names registered in more than one organization. 

Device name

Organizations

Days in use

MH-51FB898341CEA47A

24

10

MH-AD72DAD766A59028

18

3

MH-4AE06D5094ABCAD7

17

7

MH-F80EA97CA5FB3E90

14

2

MH-0355F2C9C8243D00

6

1

MH-0A25978CCAE9BF67

6

9

MH-88FC3793D7573345

6

8

MH-711B0E99A370D9AE

6

2

MH-565CE7A7663C3537

6

7

MH-5A7AEAE27625C08C

5

2

From device code phishing to persistent M365 access

A device registered to a compromised account gets a Primary Refresh Token (PRT). That token enables single sign-on to the user's Microsoft 365 apps and keeps working after a password reset. Microsoft invalidates a PRT on a password change only when the token was obtained with the password, and here it comes from a phished token instead. A PRT can also satisfy Conditional Access Policies that require a registered device. A password reset alone doesn't remove the access; the device has to be deleted.

how rogue devices are registered

Figure 2: How a phished account registers a rogue device that keeps access after a password reset.

In the vast majority of the compromised accounts, we saw a successful sign-in from a residential proxy IP flagged for callback proxy activity. These sign-ins are indicative of device code phishing, where the victim is tricked into approving a sign-in code that hands the threat actor a token. The sign-ins in this campaign came via the Microsoft Authentication Broker application, mostly from residential and business broadband in the US and UK. Many of the IPs used belong to commercial residential proxy networks, including DataImpulse, Oxylabs, NodeMaven, IPRoyal and Shifter.  No IP address served more than two victims, so IP blocklists won't stop this activity. 

Here's how one of the intrusions Huntress analyzed looks in the logs. Defenders can use this sequence as a guide for their own hunts; the easiest way to hunt is by following the suspicious session ID.

  • The victim was presented with a phishing lure that took them through the device code authentication flow, handing access and refresh tokens to the threat actor (see Figure 2 above).

    • The first two interactive sign-ins in our logs show the victim receiving a CMSI interrupt error code (AADSTS50199) confirming they are trying to sign into the Microsoft Authentication Broker application. Though the activity appears to come from a normal-looking location, it originates from a residential or callback proxy.

  • The threat actor immediately redeemed that token, targeting the device registration service.

    • The non-interactive logs show the sign-in move to a new IP address, new location (Poland) and an automated user-agent (python-requests), setting the stage for malicious device registration.

  • Once the rogue device was registered, the threat actor immediately leveraged that new primary refresh token and logged into Azure Active Directory and Microsoft Office, accessing additional resources such as OneDrive, SharePoint, or Exchange.

Sign-in logs of the malicious activity

Figure 3: Sign-in logs of the malicious activity

Malicious device registration from Entra Audit logs

Figure 4: Malicious device registration from Entra Audit logs

One backend behind the campaign

Alongside those sign-ins, the threat actor also signs in to victims' accounts using a malicious Python script. These sign-ins identify themselves as python-requests/2.32.5, a common Python library, and come from datacenter IPs. In the most recent stretch, the threat actor used one IP at a time and switched every few days.

Datacenter IPs used for scripted sign-ins, in order of first use.

Order

IP

Hosting

Days in use

Accounts

Orgs

1

181.214.147.42

BK Customers

16

51

49

2

92.62.251.249

FREAKHOSTING LTD

8

95

89

3

37.252.11.196

Artnet Sp. z o.o.

4

79

73

4

146.103.38.149

BK Customers

5

81

78

5

193.109.193.166

Datacamp Limited

Ongoing

60

54

The threat actor appears to have created a schedule for rotating out IPs and hosting providers. The first and fourth IPs listed above sit in two blocks of leased address space that were assigned to the same hosting customer in the same second, on October 7. Its lease ended on the morning of November 9, and the third IP went into use less than two hours later. We can't tell whether that hosting customer is the threat actor or a reseller acting for them.

The last three IPs in the table above registered devices that began with both MH- and DESKTOP-. DESKTOP- plus eight characters is ROADtool's default naming convention. On 13 occasions, the same IP worked on victims from both sets within the same 10 minutes. We assess that the MH- devices and at least some of the DESKTOP- devices were registered by the same threat actor.

Together, the five IPs signed in, or tried to, against 361 accounts in 337 organizations. Most of those attempts failed: 1,186 failed sign-ins against 197 successful ones. 38 of the successful login sessions had an additional DESKTOP- device registered and 71 had other suspicious sign-in activity.

Two sources, one intrusion

We tracked the campaign in multiple independent sources: Microsoft 365 Entra logs, Microsoft 365 Audit Logs and Microsoft Defender incidents.

The identity logs recorded every registration, including the device name, build, and owning account, which is how we tied the campaign together across organizations.

Defender raised its own incident on 25 of the 326 compromised identities we discovered. On one account, Entra recorded the device registration, and about five minutes later Defender raised an incident titled "User session compromised by device code phishing" and automatically contained the account.

Defender alert timeline

Figure 5: One account's timeline. The device was registered at 02:39:15 UTC and Defender raised an incident at 02:44:19 UTC.

Each source answers a different question: Defender tells that you Microsoft considers the account compromised. The M365 identity logs tell you which device to delete, which is the only way to cut off the threat actor's access.

What Microsoft Defender saw

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.

Orgs with Defender connected

MH- victims in those orgs

Victims with a Defender incident

36

47

25

All incidents carried the same title, "User session compromised by device code phishing (attack disruption)", at high severity. The incidents were built by Microsoft Defender XDR, which correlates alerts across Microsoft's security products. "Attack disruption" means Microsoft automatically contained the account, for example by disabling it or revoking its sessions. As of this writing, Microsoft has not classified any of the incidents.

Every incident included the alert "Suspicious Entra device join or registration," Microsoft's detection of the same rogue device registration we saw in the audit logs. Five also included "Possible use of a stolen session cookie." Some incidents added alerts from Defender for Office 365 and Entra ID Protection.

Alert inside the Defender incident

Microsoft product

Suspicious Entra device join or registration

Defender XDR

Possible use of a stolen session cookie

Defender XDR

Suspicious Entra device join or registration using an uncommon user agent

Defender XDR

Email messages removed after delivery

Defender for Office 365

Azure AD threat intelligence

Entra ID Protection

Defender and the identity logs agree on what happened; Defender confirmed the compromise and contained the account where it was deployed. The identity logs enumerated the victims, including accounts in organizations without Defender connected, and identified the exact device to delete.

The same playbook, other names

MH- is one of several device naming patterns we saw on compromised accounts in November. Each pattern pairs with the ROADtools build, and none of the devices carried hardware identifiers.  

Two of these naming patterns, MH- and DESKTOP-, appear to fall under one operation. In the incidents we observed, the threat actor first registered a device named after the victim's username and email domain, then joined a second device named DESKTOP- followed by six characters (as opposed to ROADtools' default eight characters). In most of those accounts the second device followed within a minute, and in all within 28 minutes. That operation uses its own scripted sign-in IPs, separate from the MH- backend. On and more than half of the username-named devices, the sign-ins came from a headless Chrome browser on Linux, a sign of automation that is rare across the rest of our customer base.

accounts with two rogue devices registered

Figure 6: Accounts with both MH- and DESKTOP- named rogue devices and the time elapsed between registrations 

A third group works differently. Devices named Device- followed by eight hex characters, and devices named GraphSpy-Device after the public GraphSpy tool, both report build 10.0.26100. Most of these sign-ins came from datacenter IPs rather than residential proxies. We found no shared infrastructure between this group and the others.

Tooling & Attribution

The device names point to public tooling. ROADtools registers devices with build 10.0.19041.928 and, unless told otherwise, names them DESKTOP- followed by eight characters. Both defaults appear across these registrations. The MH- operator keeps the ROADtools build but replaces the default name. GraphSpy-Device is the default device name in GraphSpy, another public Entra ID toolkit.

ROADtools' default random names use uppercase letters and digits, not hex, so the MH- prefix plus 16 hex characters is a deliberate change by the threat actor. ROADtools also registers devices with the user agent Dsreg/10.0 (Windows 10.0.19041.928).

Based on the device names, builds, sign-in methods and shared infrastructure, we've grouped the activity into three operations.

Operation

Devices

Tooling

What links them

Confidence

A

MH- + 16 hex, and part of DESKTOP- + eight

ROADtools build; scripted sign-ins with python-requests/2.32.5

Device code phishing sign-ins from residential proxies; the same rotating datacenter IPs for scripted sign-ins, used on both device sets within the same 10 minutes

High for MH-; moderate for the DESKTOP- devices

B

Username + domain + eight hex, then DESKTOP- + six

ROADtools build on the first device; build 10.0.19045.2006 on the second; headless Chrome; python-requests/2.34.2

Both devices registered on the same 13 accounts, the second within 28 minutes; its own scripted sign-in IPs

High

C

Device- + eight hex, GraphSpy-Device

GraphSpy and similar tooling; build 10.0.26100

Device code sign-ins from datacenter IPs instead of residential proxies

Low; similar method only, no shared infrastructure

Although this general attack sequence isn't new, we have not tied any of these operations to a named threat actor. In February 2025, Microsoft documented Storm-2372 phishing device codes for the Microsoft Authentication Broker and then registering a device to get a Primary Refresh Token, the same chain we see here. Unit 42 has also documented ROADtools device registration with this build and the python-requests client. ROADtools and GraphSpy are public tools, so other operators can produce the same defaults. Because the DESKTOP- + eight pattern also appears outside Operation A, the overlap doesn't definitively tie this campaign to Storm-2372 or any other named actor.

What to do

Alerting

Have an identity threat detection and response tool capable of alerting you on anomalous login patterns and rogue device registration and contain the compromise

Hunt 

  • Sign-ins: Search Entra Sign-in logs (interactive and non-interactive) for suspicious device code authentications. Non-interactive logs will often show a pivot from a standard user-agent to a programmatic user-agent such as node or python-requests.

  • Search the Entra audit logs for device registrations where the device name matches MH- plus 16 hex characters, or the build is 10.0.19041.928, 10.0.19045.2006, 10.0.19045.0 or 10.0.26100 with no hardware identifiers.

  • Search sign-in logs for the IPs 181.214.147.42, 92.62.251.249, 37.252.11.196, 146.103.38.149, and 193.109.193.166.

  • Audit the compromised identity's registered devices and MFA methods. Remove any you do not recognize.

  • Audit for any suspicious inbox rules

If you find one: delete the device in Entra ID, revoke the user's sessions, and reset their credentials.

Prevention

  • Limit who can register or join devices and how many devices can be registered to a user

  • require MFA to register a device.

  • For organizations with licensing below Entra ID P1, enable Microsoft Security defaults if not enabled

  • For organizations with Entra ID P1 licensing and above: Enable complex conditional access policies including blocking device code authentication, requiring managed and compliant devices to authenticate, MFA requirements, and geolocation sign-ins. 

  • For those with Entra ID P2 licensing, enable risk based conditional access policies.

Indicators of Compromise (IOCs)

Indicator

Description

^MH-[0-9A-F]{16}$

Device name pattern

181.214.147.42

Hosting: BK Customers

92.62.251.249

Hosting: FREAKHOSTING LTD

37.252.11.196

Hosting: Artnet Sp. z o.o.

146.103.38.149

Hosting: BK Customers

193.109.193.166

Hosting: Datacamp Limited

python-requests/2.32.5,

python-requests/<version>,

python-httpx/<version>,

node,

node-fetch,

undici,

axios/<version>,

Mozilla/5.0 (Windows NT 10.0; Win64; x64; WebView/3.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.19044,

Mozilla/5.0 (Windows NT 10.0; Win64; x64),

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36,

Dsreg/10.0 (Windows <version>),

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/<version> Safari/537.36,

- Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<old version> Safari/537.36 [Edg/<old version>]

User-agent strings

MH-51FB898341CEA47A

Device name observed across 24 organizations.

MH-AD72DAD766A59028

Device name observed across 18 organizations.

MH-4AE06D5094ABCAD7

Device name observed across 17 organizations.

MH-F80EA97CA5FB3E90

Device name observed across 14 organizations.

MH-8588A5E037F15197 

Device name observed across 11 organizations.

MH-0355F2C9C8243D00

Device name observed across 6 organizations.

MH-0A25978CCAE9BF67

Device name observed across 6 organizations.

MH-88FC3793D7573345

Device name observed across 6 organizations.

MH-711B0E99A370D9AE

Device name observed across 6 organizations.

MH-565CE7A7663C3537

Device name observed across 6 organizations.

MH-5A7AEAE27625C08C

Device name observed across 5 organizations.

MH-9080E619FEE30740

Device name observed across 3 organizations.

MH-4875FDDA044C1170

Device name observed across 3 organizations.

MH-03516759F1A18C8A

Device name observed across 3 organizations.

MH-E35633E1CD0BCF6E

Device name observed across 3 organizations.

MH-9C2686409597FA15

Device name observed across 3 organizations.

MH-A3683B4F6172C4EF

Device name observed across 3 organizations.

MH-7B5D21B381407940

Device name observed across 3 organizations.

MH-B310BCD916422135

Device name observed across 3 organizations.

MH-5B545550D4428ECE

Device name observed across 2 organizations.

MH-200D84D6F12600F7

Device name observed across 2 organizations.

MH-6A37CCE723B02095

Device name observed across 2 organizations.

MH-EAB789529406F809

Device name observed across 2 organizations.

MH-414CBAFC7E1395DC

Device name observed across 2 organizations.

MH-94E1895B7BF8A4A9

Device name observed across 2 organizations.

MH-7356DD826FE9F93F

Device name observed across 2 organizations.

MH-8A7B73C33ABF9D42

Device name observed across 2 organizations.


MITRE ATT&CK Mapping

Tactic

Technique

Description

Resource Development

Acquire Infrastructure (T1583)

The attacker provisioned a rotating pool of five datacenter IP addresses to execute scripted sign-in operations, cycling infrastructure every few days and rapidly reassigning leases between address blocks.

Resource Development

Obtain Capabilities: Tool (T1588.002)

The attacker obtained the public Entra ID toolkit ROADtools to automate device registration, retaining its hardcoded Windows build (10.0.19041.928) while customizing device names to MH- followed by 16 hexadecimal characters.

Initial Access

Valid Accounts: Cloud Accounts (T1078.004)

The attacker authenticated to compromised Microsoft 365 accounts from datacenter infrastructure using an automated Python script (python-requests/2.32.5).

Initial Access

Phishing (T1566)

The attacker distributed device-code phishing lures disguised as an Adobe-protected Non-Disclosure Agreement to trick targets into authorizing the threat actor's authentication session.

Persistence

Account Manipulation: Device Registration (T1098.005)

The attacker enrolled rogue Entra ID-joined Windows devices (MH-<16 hex>) lacking hardware identifiers, securing persistent Primary Refresh Tokens that survived password resets.

Stealth

Valid Accounts: Cloud Accounts (T1078.004)

The attacker operated directly under the victims' compromised cloud identities, causing unauthorized device registrations to appear in Entra audit logs as legitimate user-initiated actions.

Stealth

Social Engineering: Impersonation (T1684.001)

The attacker impersonated Microsoft and Adobe branding alongside a named document sender to deceive victims into authenticating with their Microsoft credentials to access a supposedly protected file.

Credential Access

Steal Application Access Token (T1528)

The attacker captured Microsoft Authentication Broker access and refresh tokens via OAuth device-code authorization once victims approved the verification prompt, generating an initial CMSI interrupt.

Lateral Movement

Use Alternate Authentication Material: Application Access Token (T1550.001)

The attacker immediately redeemed stolen tokens via python-requests/2.32.5 against the Device Registration Service and leveraged the resulting Primary Refresh Token to access Azure Active Directory, OneDrive, SharePoint, and Exchange.

Command and Control

Proxy: External Proxy (T1090.002)

The attacker routed device-code authentication traffic through residential and callback proxy networks limiting each US and UK broadband exit IP to at most two victims.

You might also like