Group-IB described MadApe as a phishing kit that steers people into signing in through Microsoft Device Code authentication. If the user completes authorization and access controls permit it, the attacker-controlled client may receive tokens. For Microsoft 365 administrators, that makes the sign-in context and related account activity crucial to investigating a suspicious event.

How MadApe uses Microsoft Device Code sign-in

A five-step flow traces a business-themed PDF through two possible intermediary routes to Microsoft sign-in and a conditional token outcome.

Microsoft Device Code authentication lets a person enter a code on Microsoft’s legitimate device sign-in portal to authorize a sign-in. In the flow Group-IB described, a phishing page supplies the code and directs the victim to that real portal. The kit does not collect the victim’s password on its phishing page.

After the victim enters the code and authenticates, the kit’s backend polls Microsoft’s token endpoint. If authorization completes and applicable access controls permit token issuance, the attacker-controlled client may receive an access token and, where supported and requested, a refresh token. Group-IB also says a successful sign-in may satisfy an MFA requirement; that does not mean every MFA configuration or targeted account is compromised. Group-IB’s research describes the reported sequence and its conditions.

The phishing begins with a business-themed PDF containing an embedded link. The link leads to an intermediary page, observed as either a SharePoint-themed document page or a human-verification challenge. Both routes lead to a phishing page displaying a device code. The victim is then directed to Microsoft’s legitimate portal to enter it and authenticate.

What to check after an unexpected Device Code event

An interrupted authentication event alone does not establish that an account was compromised. Group-IB recommends correlating the event with successful sign-ins, application and account details, source information, email-link activity, and subsequent account operations.

For an investigation, check for unexpected Device Code activity in Microsoft Entra sign-in logs, unfamiliar applications, and unusual source IP addresses or locations. Then look for related email clicks and activity on the account after the sign-in attempt. Taken together, those details help distinguish an interrupted attempt from evidence of successful access. Group-IB’s investigation guidance covers these signals.

Correlate the device-code event with sign-ins, the application, the source, the email link, and what happened next.

What a Conditional Access block changes

Microsoft classifies Device Code flow as high risk and recommends blocking it wherever possible. Where an organization needs the flow for a particular use, Microsoft’s Conditional Access controls can target it. Administrators can assess a proposed restriction in report-only mode before enforcing it, as described in Microsoft’s Conditional Access documentation.

Group-IB recommends reviewing sign-in logs and testing proposed restrictions in report-only mode. A new block can stop subsequent token requests, but it should not be treated as an immediate revocation of access tokens already issued; those tokens may remain usable until they expire or the resource rejects them. Group-IB’s guidance calls out that operational limit.

What Group-IB mapped about the campaign

Group-IB mapped 155 root domains and observed phishing components on subdomains or URL paths associated with 97 of them. Those figures describe mapped infrastructure in the group’s dataset, not victims or confirmed account compromises.