Key facts
- With device code phishing, the victim signs in directly to the identity provider while the attacker captures the resulting authorization, so credentials are never typed on an unfamiliar page.
- MadApe steals Microsoft 365 access without collecting passwords on its phishing pages.
- MadApe abuses Microsoft's Device Code authentication flow so operators can receive an access token and a refresh token where supported after a victim signs in.
- A successful MadApe authentication may also satisfy multi-factor authentication requirements, according to Group-IB researchers Mansour Alhmoud and Faraz Ali.
Group-IB researchers Mansour Alhmoud and Faraz Ali revealed the MadApe phishing kit targeting Microsoft 365, a campaign that steals access tokens and, where supported, refresh tokens through Microsoft’s Device Code authorization flow without showing a password prompt.
The attack begins with a phishing e-mail carrying a PDF attachment presented as a business document, according to Group-IB. The PDF contains an embedded link that sends the recipient to an intermediary page, observed in SharePoint-themed document-access versions that redirect the browser after a click. Some intermediary pages deliver the next stage through a human-verification challenge chosen randomly from a custom CAPTCHA, a text-entry field, image selection, or a press-and-hold button, a step the researchers said is designed to keep security scanners out. Once the challenge is passed, a device code appears; since the kit obtained it from Microsoft, clicking copies the code to the clipboard and records the interaction, and an Open File button sends the browser to microsoft.com/devicelogin for pasting the code.
MadApe authentication happens on a legitimate Microsoft domain rather than an attacker-controlled login page, so credentials are never typed on an unfamiliar page, Group-IB said. The kit backend repeatedly polls Microsoft’s token endpoint to collect the tokens issued after sign-in. The researchers said a successful MadApe authentication may also satisfy multifactor authentication requirements.
Templates for the kit pose as SharePoint, OneDrive, Microsoft Teams, Adobe Acrobat, DocuSign, and Microsoft sign-in pages, according to Group-IB. One German-language Microsoft Teams lure is built around a voicemail notification, and attachment names mostly refer to payments, invoices, contracts, and account statements. The lures come in at least nine languages, including English, French, Hebrew, Finnish, and Icelandic, with e-mails written in Hebrew aimed at recipients in Israel.
The kit’s templates call the same JavaScript functions and backend API endpoints, which Group-IB researchers Mansour Alhmoud and Faraz Ali described as “frontend variations of the same phishing framework.” The operator panel login page appeared on at least five domains, with the earliest instance on Aug. 19, 2026, and the panel server was hosted in Germany. A decoy business site impersonates a logistics firm named C2S Logistics, and Group-IB assesses that the panel, phishing pages, and decoy sites run as one deployment because they sit on the same hosts. The kit’s name comes from the operator panel.
Group-IB identified 155 root domains, with the kit appearing on subdomains or URL paths connected to 97 of them while the remainder seem staged and unused. Most MadApe domains were registered between mid-June and late August 2026, and the largest batch, ten domains, was registered on Aug. 18, 2026. 69% of MadApe domains were created at the exact same second as at least one other domain, and domain registrar Dynadot handled 86.4% of the registrations Group-IB analyzed. Nine legitimate third-party websites hosted redirect pages for the campaign.

The company did not attribute the MadApe campaign to a known threat actor. The researchers released YARA rules and indicators of compromise covering URLs, domains, and file hashes tied to the PDF lures. Organizations that do not need the Device Code flow are advised to block it with Conditional Access. People should treat any unexpected device code request with caution.
Device code phishing works by having the victim sign in directly to the identity provider while the attacker captures the resulting authorization, so credentials are never typed on an unfamiliar page. “The device code flow is a legitimate authentication method that is being actively exploited by cybercriminals to bypass multi-factor authentication,” the FBI said.
Token theft is more valuable to attackers than password theft because a stolen token can be replayed into an active session with instant access to cloud resources and email. A successfully completed multifactor authentication does not make a session trustworthy on its own. Because device code phishing captures OAuth tokens instead of passwords, forcing a password reset may not remove an attacker from the account.
The FBI warned that Kali365 lets cybercriminals hijack Microsoft 365 accounts such as Outlook, Teams, and OneDrive while bypassing multifactor authentication completely. Kali365 was first observed in April 2026 and had rapidly spread among cybercriminal groups, the FBI said. Kali365 provides less-technical attackers with AI-generated phishing lures, automated campaign templates, real-time tracking dashboards, and OAuth token capture capabilities. Attackers can maintain persistent access to accounts compromised through Kali365 until the stolen tokens are manually revoked.
Jalisco creates new Microsoft OAuth device codes immediately when a victim opens a phishing page, bypassing the 15-minute expiration window. Jalisco includes a management portal for organizing stolen sessions and compromised Microsoft 365 accounts.
ReliaQuest recently saw threat actors register over five devices to one compromised Microsoft Entra ID account, frequently choosing names that resemble legitimate Windows or Microsoft devices. Enrolled devices can keep refreshing authentication tokens, letting attackers retain access. The company also found that phishing activity increased by 1,380% between late 2025 and early 2026.
Huntress found EvilTokens in early 2026 during a device code phishing campaign that relied on the Railway Platform-as-a-Service as a token-harvesting and replay engine. A joint effort between Microsoft’s Digital Crimes Unit and the FBI later in 2026 led to the arrest of one of EvilTokens’ alleged operators.
Knight Office is an adversary-in-the-middle phishing kit that captures valid Microsoft 365 session tokens and sends them to an operator console. Attackers can replay Knight Office sessions and establish persistence across tenant accounts.
Defenders can hunt for signs of a stolen session, including successful sign-ins from unfamiliar cloud infrastructure, device code authentication, automated token refresh, new devices, and mailbox activity. Containment priorities include revoking refresh tokens and removing unauthorized devices and Windows Hello credentials. Huntress advises blocking device code authentication when possible and reviewing outbound phishing, mailbox access, and forwarding rules. ReliaQuest said organizations should block device code authentication with Microsoft Entra ID Conditional Access policies, and for Okta it urged restricting OAuth Device Authorization grants, auditing unneeded application registrations, and cutting the default device registration ceiling from 50 devices to one or two where operations permit.

Join the discussion