gbhackers.com·16 september 2026

GhostCode Abuses Microsoft Entra Device Enrollment to Maintain Access After Token Revocation

Image for the article: GhostCode Abuses Microsoft Entra Device Enrollment to Maintain Access After Token Revocation
Image via gbhackers.com

A new phishing kit called GhostCode abuses Microsoft Entra device enrollment to maintain access after token revocation. The campaign uses business-email social engineering, impersonating organizations like BJ’s Wholesale Club, and employs a password-protected HTML attachment with three layers of evasion. eSentire linked the campaign to over 30 lookalike domains impersonating U.S. businesses. GhostCode exploits the OAuth 2.0 device authorization grant, allowing attackers to register multiple Entra devices and obtain Primary Refresh Tokens, which persist even after token revocation.