eSentire identified GhostCode, an active device-code phishing kit that impersonates businesses through contact-form messages and uses an NDA lure to steal Microsoft account authorization. Password-protected, heavily obfuscated HTML attachments decrypt phishing redirects in the victim’s browser, reducing detection by email scanners and sandboxes. The victim is directed to Microsoft’s legitimate device-code sign-in page, completes MFA, and unknowingly authorizes an attacker-controlled OAuth session.
The abuse targets Microsoft’s OAuth 2.0 device authorization grant, a legitimate workflow intended for input-constrained devices that issues a device and user code and can return access and refresh tokens after browser-based authentication. In an observed GhostCode intrusion, operators used stolen tokens and victim-geolocated residential proxies to register three Entra devices, obtain a Primary Refresh Token, access Microsoft Graph, and establish persistence within 78 seconds. Organizations should restrict device-code authentication with Conditional Access and investigate Entra events where device-code authentication is followed by python-requests activity or rapid device registrations.

Get the infrastructure and lures behind it.
5 events from the most recent confirmed update back to the earliest known activity.
A phishing campaign dubbed GhostCode used contact-form outreach, business impersonation, and an NDA-signing pretext to send password-protected HTML attachments that directed victims into Microsoft's device authorization flow.
Operators registered more than 30 domains impersonating U.S. distributors, manufacturers, warehousing firms, and other businesses, including the BJ's Wholesale Club lookalike bjssourcing[.]com.
eSentire revoked the compromised token grant, reset the victim's credentials, and disabled all three Entra devices enrolled by the attackers.
Within 78 seconds of device-code authentication, the operators made nine successful API calls, registered three Entra devices, and obtained a Primary Refresh Token at 17:26:24Z, 32 seconds after authentication. They then accessed Microsoft Graph and used python-requests/2.34.2 for subsequent API activity.
In an observed intrusion, a victim completed Microsoft sign-in and MFA using an attacker-supplied device code, allowing the operators to poll for and obtain authentication tokens. Five seconds after device-code authentication, the attackers began using the stolen token through victim-geolocated rotating residential proxies.
Vulnerabilities, threat actors, malware, products, organizations, breaches, and observables Mallory has linked to this story. Indicator values are masked here and available in full in the app.
Indicator values are masked on this page. View all 18 in Mallory Domains, IPs, hashes, and URLs are exportable to your SIEM.
Get the infrastructure, lures, and IOCs behind this campaign, ready to push into your email and identity stack.
2 references tracked. Mallory keeps watching after this page renders.
Map indicators from this story to your assets and identify affected systems in minutes.
Every observed campaign, victim, and pivot linked to actors named in this story.
Malware, exploits, and IOCs connected to the activity described here.
YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Get matching new stories delivered to your team as they break — not the next morning.
Ask questions about this story and take action on the answers.