# M365 Device Code Phishing Campaign Drives Hundreds of Rogue Entra ID Device Registrations (PRT Persistence)

> Huntress reports an active device code phishing campaign (NDA lures impersonating Microsoft and Adobe) that captures tokens via the Microsoft Authentication Broker and redeems them against the Device Registration Service to register rogue Entra ID devices holding Primary Refresh Tokens. In November 2026 Huntress observed 468 rogue device registrations across 326 identities in 305 organizations; access survives password resets and no actor attribution is made.

- **Author:** Threadlinqs Team
- **Published:** 2026-12-03T14:13:02Z
- **Last updated:** 2026-12-03T14:13:02Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-7394
- **Card image:** https://intel.threadlinqs.com/og/threat/TL-2026-7394.png
- **ID:** TL-2026-7394
- **Severity:** HIGH
- **Category:** PHISHING
- **Status:** ACTIVE
- **Detections:** 9 (1 shown free below) · **IOCs:** 12 (3 shown free below)

## Description

Huntress documented an active campaign abusing the OAuth device code flow in Microsoft 365. Victims receive a phishing email impersonating Microsoft and Adobe that presents a supposedly protected Non-Disclosure Agreement from a named sender. The victim is led to approve a device code sign-in, which hands access and refresh tokens to the attacker through the Microsoft Authentication Broker application. The victim's first interactive sign-ins show error AADSTS50199 (a CMSI interrupt). Victim sign-ins for the phishing step came from residential proxy IPs, mostly in the US and UK, from providers including DataImpulse, Oxylabs, NodeMaven, IPRoyal and Shifter; no single IP served more than two victims.

The attacker then redeems the token from a new IP (in Poland) using python-requests against the Device Registration Service and registers a rogue Windows device, typically using the public ROADtools toolkit with its default build 10.0.19041.928 (Windows 10 2004, out of servicing). The device carries no hardware identifiers and yields a Primary Refresh Token (PRT), which is used to sign in to Azure AD and Microsoft Office and reach OneDrive, SharePoint and Exchange. Because the PRT is bound to the rogue device, access survives password resets; deleting the device and revoking sessions is the reliable way to cut it off.

In November 2026 Huntress counted 468 rogue device registrations across 326 identities in 305 organizations, mostly on weekdays; 46 MH- device names appeared in more than one organization. Huntress separates the activity into three operations. Operation A uses device names matching ^MH-[0-9A-F]{16}$ (a deliberate departure from the ROADtools default DESKTOP-+8 naming, with some DESKTOP-+8 devices linked at moderate confidence), the ROADtools default build, python-requests/2.32.5 and residential proxies. Operation B names devices username+domain+8 hex, then DESKTOP-+6, uses ROADtools build 10.0.19041.928 then 10.0.19045.2006, headless Chrome on Linux and python-requests/2.34.2, hit the same 13 accounts, and registered a second device within 28 minutes of the first. Operation C (low confidence) uses Device-+8 hex and GraphSpy-Device names, GraphSpy-style tooling, build 10.0.26100 and datacenter IPs, with no shared infrastructure with A or B.

Operation A scripted sign-ins came from five rotating datacenter IPs (BK Customers, FREAKHOSTING LTD, Artnet Sp. z o.o., Datacamp Limited) that touched 361 accounts in 337 organizations with 1,186 failed and 197 successful sign-ins; two of the BK Customers IPs came from blocks assigned to the same hosting customer within the same second on October 7. The lease on those two blocks ended on the morning of November 9 and the Artnet IP went into use less than two hours later; the Datacamp IP was still in use at publication. Of the affected organizations, only 36 had Defender connected to Huntress (47 victims); Defender raised incidents on 25, titled 'User session compromised by device code phishing (attack disruption)', with alerts such as 'Suspicious Entra device join or registration'. In one example the device was registered at 02:39:15 UTC and the Defender incident was raised about five minutes later.

Huntress makes no attribution. The chain resembles Microsoft's February 2025 Storm-2372 reporting (device code phishing against the Authentication Broker followed by device registration for a PRT), and Unit 42 has documented ROADtools registrations with the same build, but because ROADtools and GraphSpy are public, Huntress does not link the campaign to Storm-2372. No CVE is involved; this is abuse of legitimate authentication flows.

## MITRE ATT&CK

- T1583 Acquire Infrastructure
- T1588.002 Obtain Capabilities: Tool
- T1566 Phishing
- T1078.004 Valid Accounts: Cloud Accounts
- T1528 Steal Application Access Token
- T1078.004 Valid Accounts: Cloud Accounts
- T1550.001 Use Alternate Authentication Material: Application Access Token
- T1098.005 Account Manipulation: Device Registration
- T1090.002 Proxy: External Proxy
- T1684.001 Social Engineering: Impersonation

## Free detection (Splunk SPL, Microsoft KQL, Sigma)

**TL-2026-7394 Entra ID Device Code Sign-in from Scripted Client or Known Campaign IP** (`TL-2026-7394-SPL-001`)

Detects OAuth device code flow sign-ins in Entra ID where the client is a programmatic user agent (python-requests, python-httpx, node-fetch, axios, undici, HeadlessChrome, node) or the source IP is one of the five Operation A scripted-redemption IPs from the Huntress M365 device code phishing campaign (181.214.147.42, 92.62.251.249, 37.252.11.196, 146.103.38.149, 193.109.193.166). The attacker redeems the victim-approved device code with python-requests (2.32.5 / 2.34.2) from datacenter hosting (BK Customers, FREAKHOSTING, Artnet, Datacamp), handing them access and refresh tokens via the Microsoft Authentication Broker. Aggregated per source IP so multi-account fan-out is visible.

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1528, T1078.004, T1566
- **Data sources:** Splunk index=azure sourcetype=azure:monitor:aad (SignInLogs, NonInteractiveUserSignInLogs), Microsoft Entra ID SigninLogs, Microsoft Entra ID AADNonInteractiveUserSignInLogs
- **Severity:** high
- **Confidence:** high

### Splunk SPL

```spl
index=azure sourcetype="azure:monitor:aad" (category=SignInLogs OR category=NonInteractiveUserSignInLogs) earliest=-24h properties.originalTransferMethod=deviceCodeFlow
| eval src_ip='properties.ipAddress', ua='properties.userAgent', user='properties.userPrincipalName', app='properties.appDisplayName', err='properties.status.errorCode'
| eval ioc_ip=if(match(src_ip,"^(181[.]214[.]147[.]42|92[.]62[.]251[.]249|37[.]252[.]11[.]196|146[.]103[.]38[.]149|193[.]109[.]193[.]166)$"),1,0), scripted_ua=if(match(ua,"(?i)^(python-requests|python-httpx|node-fetch|axios|undici)|^node$|HeadlessChrome"),1,0)
| where ioc_ip=1 OR scripted_ua=1
| stats count AS events, dc(user) AS users, values(user) AS user_list, values(ua) AS user_agents, values(app) AS apps, values(err) AS error_codes, min(_time) AS first_seen, max(_time) AS last_seen BY src_ip
| convert ctime(first_seen) ctime(last_seen)
```

### Microsoft KQL

```kql
union isfuzzy=true SigninLogs, AADNonInteractiveUserSignInLogs
| where TimeGenerated > ago(24h)
| where OriginalTransferMethod =~ 'deviceCodeFlow'
| where IPAddress in ('181.214.147.42', '92.62.251.249', '37.252.11.196', '146.103.38.149', '193.109.193.166') or UserAgent matches regex @'(?i)^(python-requests|python-httpx|node-fetch|axios|undici)|^node$|HeadlessChrome'
| project TimeGenerated, UserPrincipalName, IPAddress, UserAgent, AppDisplayName, AppId, ResultType, ResultDescription, Location, AutonomousSystemNumber, CorrelationId
| order by TimeGenerated desc
```

### Sigma

```yaml
title: Entra ID Device Code Sign-in from Scripted Client or TL-2026-7394 Infrastructure
id: 7f3c1a52-8d4e-4b1a-9c6e-2a5d0e7b4c11
status: experimental
description: Detects device code flow sign-ins using programmatic user agents or originating from the datacenter IPs used to redeem phished device codes in the Huntress M365 device code phishing campaign.
references:
  - https://www.huntress.com/blog/device-code-phishing-m365-registrations
  - https://www.microsoft.com/en-us/security/blog/2025/02/13/storm-2372-conducts-device-code-phishing-campaign/
author: Threadlinqs Team
date: 2026-12-03
tags:
  - attack.credential-access
  - attack.t1528
  - attack.initial-access
  - attack.t1078.004
  - attack.t1566
logsource:
  product: azure
  service: signinlogs
detection:
  selection_flow:
    OriginalTransferMethod: deviceCodeFlow
  selection_ip:
    IPAddress:
      - '181.214.147.42'
      - '92.62.251.249'
      - '37.252.11.196'
      - '146.103.38.149'
      - '193.109.193.166'
  selection_ua:
    UserAgent|startswith:
      - 'python-requests/'
      - 'python-httpx/'
      - 'node-fetch/'
      - 'axios/'
      - 'undici'
  selection_ua_headless:
    UserAgent|contains: 'HeadlessChrome'
  condition: selection_flow and (selection_ip or 1 of selection_ua*)
falsepositives:
  - Legitimate automation or CLI tooling that intentionally uses device code flow
  - Developers using Azure CLI or PowerShell on headless hosts
level: high

```

**Known false positives:**

- Sanctioned automation or developer tooling (Azure CLI, PowerShell, scripts) that legitimately uses device code flow with python or node clients
- Shared egress IPs or security scanners that reuse a scripted client against several accounts

**Tuning notes:** Adjust the index and sourcetype to your Microsoft Cloud Services add-on or Event Hub ingestion. Allow-list known automation service accounts and approved egress IPs. Refresh the IP list as the actor rotates hosting (BK Customers leases ended 2026-11-09). Where device code flow is not needed, block it with Conditional Access and treat any hit as high priority.

### 8 more detection rules (Splunk SPL, Microsoft KQL, Sigma), unlock with TL Creds

- TL-2026-7394 Device Code Flow Success Against Microsoft Authentication Broker (locked: unlock with TL Creds)
- TL-2026-7394 Multiple Entra ID Device Registrations by One Identity Within One Hour (locked: unlock with TL Creds)
- TL-2026-7394 Scripted Client Fan-out Across Multiple Entra ID Accounts from One IP (locked: unlock with TL Creds)
- TL-2026-7394 Entra ID Sign-in from Known Operation A Hosting Infrastructure (locked: unlock with TL Creds)
- TL-2026-7394 Entra ID Audit Event Referencing Known Rogue Device Names (locked: unlock with TL Creds)
- TL-2026-7394 Primary Refresh Token Sign-in from Scripted Client or Campaign IP (locked: unlock with TL Creds)
- TL-2026-7394 Rogue Entra ID Device Registration (MH- Names, GraphSpy, ROADtools Default Builds) (locked: unlock with TL Creds)
- TL-2026-7394 Sign-in Activity from Rogue Entra ID Device (MH- / GraphSpy-Device) (locked: unlock with TL Creds)

Sign up free to unlock the detection rules: https://threadlinqs.com/?modal=signup

## Sample indicators (3 of 12)

Defanged, TLP:CLEAR.

- IP address: `181.214.147[.]42`
- IP address: `92.62.251[.]249`
- IP address: `37.252.11[.]196`

Full set of 12 indicators unlocks with TL Creds: https://threadlinqs.com/tl-creds

## Sources

- [M365 Device Code Phishing Campaign Leads to Hundreds of Rogue Entra ID Registrations (Huntress)](https://www.huntress.com/blog/device-code-phishing-m365-registrations)
- [Storm-2372 conducts device code phishing campaign (Microsoft Security Blog)](https://www.microsoft.com/en-us/security/blog/2025/02/13/storm-2372-conducts-device-code-phishing-campaign/)
- [Unit 42: ROADtools and cloud attacks](https://unit42.paloaltonetworks.com/roadtools-cloud-attacks/)
- [Elastic: Entra ID Device Registration with ROADtools Default OS Build](https://www.elastic.co/docs/reference/security/prebuilt-rules/rules/integrations/azure/persistence_entra_id_roadtools_default_device_registration)
- [Elastic: Entra ID Device Registration Detected (ROADtools)](https://www.elastic.co/guide/en/security/8.19/entra-id-device-registration-detected-roadtools.html)
- [Cloud Security Alliance research note: OAuth device code phishing surge](https://labs.cloudsecurityalliance.org/research/csa-research-note-oauth-device-code-phishing-surge-20260405/)
- [ROADtools repository (dirkjanm)](https://github.com/dirkjanm/ROADtools)
- [ROADtools deviceauth.py (hardcoded default OS build)](https://github.com/dirkjanm/ROADtools/blob/792708365789be4e6f58db65c3f90701159fd0ea/roadlib/roadtools/roadlib/deviceauth.py#L408-L410)
- [GraphSpy (RedByte1337)](https://github.com/RedByte1337/GraphSpy)
- [Huntress: Device code phishing overview](https://www.huntress.com/cybersecurity-101/topic/device-code-phishing)
- [Huntress: Crafty Microsoft Teams booking flow disguises device code phishing](https://www.huntress.com/blog/crafty-microsoft-teams-booking-flow-disguises-device-code-phishing)

## Full data

The other 8 detection rules (Splunk SPL / Microsoft KQL / Sigma) unlock with TL Creds; a free account includes daily creds: https://threadlinqs.com/?modal=signup
Indicator values unlock with TL Creds, at a lower price on Red and Purple; AI agents can query rules and IOCs through the Threadlinqs MCP server (Purple and Gold in full, 2 calls a day on a free account): https://intel.threadlinqs.com/mcp

Canonical: https://intel.threadlinqs.com/threat/TL-2026-7394
