Rogue devices defeat M365 password resets
Attackers are registering their own devices in Microsoft Entra ID to keep access alive after a password reset.
Resetting a compromised user's password is the reflex most incident responders reach for first. A newly detailed phishing campaign against Microsoft 365 shows why that reflex is no longer sufficient: the intruders have already installed something that lets them walk back in afterward.
Huntress, the managed detection and response firm, said its researchers identified an active device code phishing campaign that registered rogue devices inside Microsoft Entra ID, the identity service behind Microsoft 365 and Azure. The firm counted more than 450 such devices across 305 organizations, with attackers registering devices to 326 different identities.
The core problem for defenders is that deleting the password does not delete the device. Until the rogue registration is manually removed from Entra ID, the researchers said, attackers can keep signing in through single sign-on.
How a valid sign-in gets hijacked
Device code phishing does not look like a classic credential harvest. The attacker does not need a fake login page, and the victim never types a password into an attacker-controlled form.
Instead, the attacker initiates a legitimate sign-in flow, then persuades the victim to approve a sign-in code on a genuine Microsoft authentication page. Once the victim approves it, the attacker receives access and session tokens.
In this campaign, the researchers said, those tokens were used immediately to register a rogue Windows device in the victim's Entra ID environment. A device registered to a compromised account receives a Primary Refresh Token (PRT), a long-lived credential that signs a user into Microsoft 365 apps without prompting again.
Because that credential originates in the approved session rather than in the password, changing the password does nothing to it.
The token that outlives the password
The persistence mechanism is the story. The researchers said a password reset by itself does not remove the attackers' access, because the rogue device and its token remain valid. The device can even satisfy Conditional Access rules that require a registered device — the same control organizations use to tighten access.
The threat actors appear to use a public toolkit, ROADtools, to register devices in Entra ID environments, Huntress said. ROADtools is an open-source framework for analyzing and interacting with Microsoft Entra ID that was initially designed for defenders.
Once inside a compromised environment, attackers typically log into Azure Active Directory and Microsoft Office, then pivot to resources such as OneDrive, SharePoint and Exchange.
What the intruders are after
The campaign began in November, according to the researchers, and its apparent target is data theft from OneDrive, SharePoint and Exchange.
Huntress published details of the activity in its own write-up of the campaign. Frank Dickson of Dickson Research, who reviewed the findings, described the mechanics bluntly.
“This device code campaign is super sneaky,” said Frank Dickson of Dickson Research. “The attacker gets in with the victim’s blessing and establishes persistence after a password reset.”
— Frank Dickson of Dickson Research
The practical value of that access is broad. Dickson said the combination of mailbox, files and a trusted identity is the foundation for business email compromise, giving an intruder the ability to read sensitive email, exfiltrate documents, impersonate employees and move deeper into the environment.
Why the lure still works
Dickson stressed that device code phishing is not a new technique. Microsoft documented a suspected Russia-aligned group phishing device codes and registering devices to obtain PRTs in February 2025, and in April 2026 described a phishing-as-a-service kit that generates the code the moment a victim clicks, defeating the 15-minute expiration that used to limit such lures.
The trick works because nothing is actually broken into. The device code flow exists so devices without a keyboard, such as smart TVs and printers, can sign in. The attacker starts a legitimate sign-in, then has the victim enter the approval code on a genuine Microsoft page. The victim performs the authentication; the attacker collects the token.
Threat actors disguise the approval request as routine business activity, such as opening a document or joining a meeting, said Ahmad Jowhar, senior research analyst at Infotech. That framing makes the request hard to recognize, and it shows how social engineering can get around traditional MFA.
Huntress was candid that it has not yet tied the activity to a named actor. Dickson credited the firm for publishing the naming pattern, the infrastructure and the exact log sequence defenders can monitor, and for being straightforward about that gap.
The cleanup order matters
For organizations that find rogue devices, Huntress advised deleting them from Entra ID immediately, revoking the affected users' sessions and resetting their credentials. Users should enter device codes only when they started the sign-in themselves, or when they know a trusted party initiated it.
The researchers also urged security teams to search both interactive and non-interactive Entra sign-in logs for suspicious device code authentications. They recommended auditing inbox rules and reviewing a compromised identity's registered devices and MFA methods, removing anything unrecognized.
Dickson said the cleanup is more than a delete command. Removing the device is necessary but only the start: kill the user's sessions, change the password, then look for whatever else the attacker planted, such as a new MFA method or an inbox rule.
Turning off a feature most users don't need
Jowhar advocated an identity-first approach: restrict or disable device code authentication through Entra Conditional Access policies wherever it is not operationally required. He also recommended phishing-resistant MFA such as FIDO2 security keys or passkeys, stronger device registration controls, and monitoring for suspicious sign-ins and unauthorized devices.
Incident response procedures, he added, must account for compromised tokens and persistent sessions, revoking active sessions and refresh tokens, removing rogue registrations and reviewing potentially compromised accounts and applications. Employee awareness training matters too, he said.
Dickson's advice was to turn off device code sign-ins for every user who does not need them. "In reality," he said, "most users do not."
Organizations with Entra ID P1 licensing or above can block device code sign-ins with Conditional Access and require managed, compliant devices rather than merely registered ones, he said. Companies should also limit who can register devices, cap how many each user can add, and require MFA to register one.
The fingerprints left behind
Despite the persistence, Dickson said the attacker "does leave fingerprints that are easy to find." That is the opening for defenders: the registered device, the log entries and the token trail all exist inside the tenant, waiting to be found.
But finding them requires looking at the right layer. A password reset addresses credentials. This campaign lives in device registrations, sessions and tokens — artifacts that survive the reset and keep working until someone removes them.
Why it matters
The uncomfortable implication for security teams is procedural. If a rogue device can outlast a password reset, then an incident response playbook that treats credential rotation as containment may leave an attacker in place, still holding a valid token and still able to reach mail and files.
This suggests organizations should treat device registrations and active sessions as part of the blast radius of any identity compromise, not as an afterthought. It also suggests the value of switching off authentication flows that most users never touch — the campaign depends on a legitimate feature doing exactly what it was designed to do.
For individual users, the lesson is narrower: approving a sign-in code is an act of authentication, and it deserves the same suspicion as a password prompt. The source of the request, not just the page it appears on, is what matters.
Sources
- CSO Online Original source
- ROADtools Also reporting
- initially designed Also reporting
Continue Reading
Woolworths breach hits 14 million
Woolworths says attackers may have reached names, birth dates, addresses and loyalty card numbers for 14 million Australians, while payment data stayed out of reach.
EAGERBEE's HiveMind Plugin Turns RATs Modular
Kaspersky reports a 52-command plugin tied to EAGERBEE, used against Russian and Belarusian targets in a cluster of linked Chinese malware families.
GitHub commit logs reveal spy campaign
An audit of two years of repository history shows 80,409 commands sent to victims in 23 countries through a backdoor built on GitHub.