MadApe phishing kit abuses Microsoft 365 Device Code sign-in to take over accounts without a password

Group-IB describes MadApe, a phishing kit that abuses Microsoft's Device Code flow to obtain access tokens without collecting passwords. Organizations that do not need the flow are advised to block it with Conditional Access.

A security analyst seen from behind works at a desk with two monitors in a bright modern office in Riyadh.

Key points

  • MadApe never asks for a password; victims sign in on the genuine Microsoft device login page.
  • If sign-in completes and access controls allow it, operators receive an access token and, where supported, a refresh token, opening the mailbox and files.
  • Group-IB warns that such an authentication may also satisfy MFA requirements.
  • Lures arrive as PDF attachments posing as SharePoint-style business documents, in at least nine languages.
  • Group-IB published YARA rules and indicators of compromise, and advises blocking the Device Code flow where it is not needed.

Group-IB's threat intelligence team has documented a previously unknown phishing kit named MadApe. Its distinguishing feature is that none of its phishing pages collects a password. Instead, it abuses Microsoft's Device Code authentication to obtain access to Microsoft 365 accounts.

How the attack works

The chain starts with an email carrying a PDF presented as a business document, often a payment, invoice, contract or account statement. Some emails use the target organization's branding, signatures or forwarded content. The PDF link leads to an intermediary page, either a SharePoint-style access page or a human-verification challenge that also helps keep security scanners out.

The victim is then shown a device code obtained from Microsoft and is sent to the genuine microsoft.com/devicelogin page to enter it. Because sign-in happens on a legitimate Microsoft domain, the flow looks more trustworthy than conventional credential phishing. Meanwhile the kit's backend polls Microsoft's token endpoint and collects the tokens once sign-in completes. Group-IB notes that this may also satisfy MFA requirements.

Scale and infrastructure

Templates imitate SharePoint, OneDrive, Teams, Adobe Acrobat, DocuSign and Microsoft sign-in pages. Group-IB mapped 155 root domains, with the kit deployed on 97 of them, mostly registered between mid-June and late August 2026. The campaign has not been attributed to a known actor.

What defenders can do

Group-IB has released YARA rules and indicators of compromise, including URLs, domains and PDF hashes. Organizations that do not need the Device Code flow are advised to block it with Conditional Access, and users should be cautious about any device code request they did not initiate.

What to do now

  1. Check whether the Device Code flow is needed in your Microsoft 365 tenant, and block it with Conditional Access where it is not.
  2. Where the flow is required, restrict it to specific users, devices or scenarios through Conditional Access policy.
  3. Load Group-IB's published YARA rules and indicators (URLs, domains, PDF hashes) into email and web security tooling and hunt for past matches.
  4. Review Entra ID sign-in logs for device code authentications that users cannot explain, and revoke sessions and tokens for affected accounts.
  5. Brief staff that an unexpected device code request, even on a genuine Microsoft page, should be refused and reported.

How useful was this story?

Need help acting on this?

Our consultants can assess your exposure and map the change to your controls and evidence.

Talk to an expert

Regulatory updates in your inbox

SAMA, NCA and SDAIA changes and what they mean for your institution — once a month.

E-mails in

We confirm by e-mail; unsubscribe any time. Manage your subscription · Past issues

Schedule a Free Assessment