Skip to content
Back to Guavy Wire
Stocks

GhostCode Phishing Kit Abuses Device Codes to Take Over Microsoft 365 Accounts

Instruments
MSFT
Share

A new phishing kit called GhostCode has been identified by researchers at eSentire's threat response unit, which targets Microsoft 365 users by exploiting a weakness in the OAuth 2.0 device authorization grant flow.

The attackers pose as procurement officers and use social engineering to trick victims into handing over their access to their accounts. They then convince the victim to enter a code on Microsoft's authentication page, allowing them to obtain authentication tokens that can be used to register devices and establish persistence in the victim's Microsoft environment.

eSentire recorded nine successful API calls made by the attackers over a 78-second period, involving services such as Microsoft Intune Enrollment, Azure Active Directory, and Microsoft Graph. The attackers also obtained a Primary Refresh Token (PRT), which grants them SSO-equivalent access to the victim's entire M365 environment for up to 14 days.

To defend against attacks like this, eSentire recommends restricting Microsoft's device-code authentication flow through Conditional Access and monitoring the Device Registration Service for multiple device registrations from a single non-interactive session.

More on Stocks

Disclaimer: Guavy is a data and market intelligence provider, not an investment adviser. The information, signals, and market analysis provided by the Guavy API and related services are for informational purposes only and are not intended as financial advice, investment recommendations, or an endorsement of any particular trading strategy. Trading in volatile markets, including cryptocurrency, carries significant risk and may not be suitable for all investors. Past performance is not indicative of future results. Users should consult with a qualified financial professional before making any investment decisions. Guavy makes no guarantee of trading profits or financial returns.

Market sentiment intelligence for apps, funds & agents

Location

729 55 Ave SW
Calgary AB T2V 0G4
Canada

© 2026 Guavy Inc