Victims finished real multi-factor authentication on Microsoft's own device portal and still walked Microsoft 365 API access straight to an attacker-controlled client. The MadApe kit never collected a password on its fake SharePoint, OneDrive, Teams, Adobe, or DocuSign pages. According to Group-IB, recipients pasted an attacker-generated device code, completed authentication including MFA on legitimate Microsoft infrastructure, and left access tokens and, where issued, refresh tokens with the operator. Preventing MadApe-style Microsoft 365 device-code phishing means blocking that grant path at the corporate identity provider, for example with Conditional Access. MFA 2.0 cannot prevent device-code phishing. A remote pending grant can still collect a finished authentication if the tenant still allows the flow.

What Group-IB documented about MadApe

Group-IB identified MadApe as a previously undocumented multi-stage kit built around Microsoft Device Code authentication and published the findings on 29 October 2026. Business-themed PDF lures and intermediary brand pages moved people from ordinary document bait into a calm paste-the-code story. The expanded infrastructure set covered 155 root domains, with device-code phishing components on 97 of them, and the kit spoke at least nine languages.

The phishing page displayed a device code, copied it on interaction, reported that interaction to the backend, then handed the recipient to Microsoft's real device login portal. Authentication therefore finished on microsoft.com while attacker-controlled pages only staged the handoff. Group-IB did not publish compromised-account counts, treat organization names in lures as confirmed victims, attribute a named operator group, or document ransom figures.

The full kill-chain narrative, infrastructure table, and source quotes live on the companion breakdown of how MadApe stole M365 tokens without password fields.

Why finishing MFA still minted attacker tokens

Microsoft's device login flow exists for headless and input-constrained clients. A person reads a code on one screen, opens the portal on another, pastes the code, and proves they may sign in. MadApe inverted that convenience. The pending grant belonged to the operator's client, not a company laptop the helpdesk would recognize.

Recipients who reached the portal completed authentication, including MFA, on real Microsoft pages. Push approvals, app one-time codes, SMS messages, and similar transferable second factors still authorized a session bound to the attacker's device-code request. The factor proved a human could satisfy the identity provider. It did not prove the client holding the grant was an enrolled workplace device.

Access tokens followed that approval. Where Microsoft also issued refresh tokens to the attacker-controlled client, the operator kept replayable Microsoft 365 API access after the lure went cold. Cloud mail, files, and collaboration APIs do not re-challenge the human on every call once a usable token exists. A single successful device-code grant therefore travels farther than a one-off lookalike password form.

Control present MadApe outcome Gap
Password on decoy form Not collected Decoys only staged the code
MFA on microsoft.com Victim completed it Bound to attacker client
Device-code grant Attacker generated code User pasted into real portal
Refresh token when issued Stayed with attacker Replay needed no second lure

Defenders who only hunt harvested passwords on lookalike domains miss the ceremony. The credential step happened on the real identity provider. The wrong party collected the output. The same device-code pattern appeared in earlier Microsoft 365 social-engineering waves, including the GTG-20006 Midnight Blizzard device-code theft analysis. MadApe's contribution was packaging: PDF themes, brand impersonation, multilingual copy, and dozens of domains lowered friction between "open this file" and "paste this code."

Removing the grant path before a session exists

Phishing-proof, device-bound authentication changes what can be reused after a phished login. There is no OTP, SMS code, email code, push approval, or recovery secret a coached user can type or approve on a hostile page. Private keys stay on hardware the enterprise already enrolled. Signatures are origin-bound and never transit the network as reusable secrets. They cannot refuse a device-code approval on a genuine Microsoft page if the tenant still allows the grant.

Corporate policy must also refuse the grant style MadApe abused. If the identity provider still offers a device-code path that mints user tokens for an arbitrary client after a human finishes MFA elsewhere, social engineering only needs a calm paste story. Closing that path at the IdP removes the handoff Group-IB described. The Prevention, Not Detection stance is literal here: stop the ceremony that issues the token, rather than racing to revoke after the fact.

Once access or refresh material already sits with the attacker client, login cryptography cannot pull those tokens back. Revocation, short lifetimes as a containment aid (not a root fix), continuous access evaluation, and endpoint controls handle post-issuance replay. Shortening lifetime does not prevent the next MadApe lure. It only forces the operator to re-steal or re-use sooner, and it stops mattering if the attacker registers a lasting factor during the window. The prevention win is upstream: close the device-code grant so no token is minted for the wrong client. MFA 2.0 cannot prevent device-code phishing.

Microsoft 365 access after a successful grant still spans mail, files, and collaboration APIs without a fresh human challenge on every call. That is why the first successful paste matters more than any single decoy domain, and why issued tokens have to be revoked.

Stage What attackers obtained Device-bound phishing-proof control
Initial device-code approval Access token to attacker client Block the grant, for example with Conditional Access
Refresh issued to client Replayable API access Cannot un-issue; revoke and block flow
Later API calls Mail, files, collab without re-login No new login to intercept

Passkeys harden the login act, not every edge grant

Passkeys and FIDO2/WebAuthn place a key pair on the device, keep the private key in hardware, and produce an origin-bound signature at authentication time. That design is origin-bound at login: a lookalike host cannot complete the ceremony the way a password-plus-OTP page can.

On a generic enterprise identity provider that issues only hardware-bound signatures, the user still gets a one-tap proof without typing a secret. That hardens the interactive login act. It does not automatically delete every device-code style grant, every recovery shortcut, or every policy exception that still accepts a transferable factor for a pending remote client. Passkeys are strong login cryptography; the next check is whether the tenant still allows the exact flow MadApe narrated.

Key takeaways for defenders

Training people to distrust microsoft.com will not stop this class of attack. The portal is genuine. The failure sits in identity policy that still lets a remote stranger's pending grant receive a full user authentication. Once the grant is closed, the MadApe handoff has nowhere to land. MFA 2.0 cannot prevent device-code phishing.

FAQ

Would phishing-proof MFA alone have stopped MadApe device-code token theft?

No. Phishing-proof MFA alone would not have stopped MadApe device-code token theft. According to Group-IB, MadApe depended on victims pasting an attacker-generated code and finishing MFA on real Microsoft infrastructure so tokens issued to the operator. Blocking or turning off device-code sign-in, for example with Conditional Access, is what closes that grant. MFA 2.0 cannot prevent device-code phishing. Tokens already issued still need revoke and session controls.

How is MadApe different from ordinary password-harvesting phishing pages?

MadApe differs from ordinary password-harvesting pages because Group-IB found no password collection on the decoys. Fake SharePoint, OneDrive, Teams, Adobe, and DocuSign pages only displayed and copied a device code, reported interaction, and sent people to Microsoft's legitimate device login portal. Authentication, including MFA, finished on real Microsoft infrastructure while access tokens and optional refresh tokens went to the attacker-controlled client.

Do passkeys alone close every MadApe-style device-code path?

Passkeys alone do not close every MadApe-style device-code path if the tenant still allows device-code grants or other remote client approvals after a human authenticates. Passkeys are origin-bound at login through hardware-held keys and origin-bound signatures. Device-code phishing uses the real origin on purpose, so origin-bound login still needs a policy that removes the grant path MadApe abused.

What should security teams do after a suspected MadApe-style success?

Security teams facing a suspected MadApe-style success should revoke the affected user's access and refresh tokens, invalidate active Microsoft 365 sessions, block device-code flow for the workforce tier that was targeted, and inspect sign-in logs for device-code grants tied to unfamiliar clients. Login hardening prevents the next paste. It does not erase API tokens the attacker already holds.

Why did victim MFA fail to protect Microsoft 365 accounts in the MadApe flow?

Victim MFA failed to protect Microsoft 365 accounts in the MadApe flow because the second factor confirmed the person could authenticate on Microsoft's real portal, not that the pending device-code client was a trusted corporate device. Group-IB described authentication completing on legitimate Microsoft infrastructure while attacker pages only guided the recipient. Transferable approvals still green-lit tokens for the operator's grant.