MadApe: a previously undocumented Device Code phishing kit targeting Microsoft 365 accounts across nine languages, with 155 operator-registered domains identified and phishing components confirmed on 97 of them.
Key findings:
- The kill chain never touches a fake login page. A business-themed PDF drops an embedded link to a SharePoint-impersonating intermediary page, which uses JavaScript setTimeout redirection to a MadApe-served phishing page. That page displays a dynamically generated Microsoft Device Code, copies it to the clipboard on click, notifies the backend at /api/code/entered, then opens the legitimate microsoft[.]com/devicelogin for the victim to paste and authenticate. The attacker's server polls Microsoft's token endpoint server-side; if the victim completes the flow, the attacker receives an access token and, where supported, a refresh token, with MFA silently satisfied during the legitimate sign-in.
- MadApe is a configurable, multi-theme framework. Shared JavaScript functions cc() (code delivery and clipboard write) and ne() (devicelogin redirect), plus the /api/code/entered and /api/code/status/ backend endpoints, appear identically across visually distinct pages impersonating SharePoint, OneDrive, Microsoft Teams, Adobe Acrobat, DocuSign, and Microsoft sign-in. Representative phishing URLs include hxxps://secure-docs.liveoakfarmsllc[.]net (SharePoint theme), hxxps://durakdisplay[.]com/7664453fe5 (OneDrive), hxxps://lvborses[.]com/f948e90ab1 (Teams voicemail lure in German 🇩🇪), and hxxps://nxinet[.]com/d9f90ed790 (Microsoft sign-in). The operator panel, titled "Mad Ape - Login," was observed on itencrypted[.]co, householdwares[.]co, liva-fit[.]com, uouso[.]net, and wbconnecticut[.]net, all serving the same C2S Logistics decoy at their root domains.
- Infrastructure provisioning is automated and ongoing. Of 154 domains registered in 2026, 117 landed between mid-June and late August, 133 (86.4%) through Dynadot, and 105 of 152 (69%) share an exact-second WHOIS creation timestamp with at least one sibling domain, the largest batch being 10 domains registered 18 August 2026 at 23:48:21 UTC. Twin TLD purchasing (.com paired with .net, .co, .biz, or .online) and a recurring subdomain naming pattern built from cgi-, otp-, -ox, and -oi labels tie the cluster together. Nine compromised third-party hosts were also identified serving intermediary redirect pages under paths like /otp_folder/solid.html and /top_box/solid.html.
- The anti-analysis stack is layered. A custom client-side verification gate (CAPTCHA, image selection, press-and-hold) sits in front of the Device Code page, sets a short-lived cookie (_cv=1, max-age 300 seconds), and reloads to serve the phishing page only to cookie-bearing requests, keeping automated URL scanners at the gate. Both the gate and the phishing page suppress right-click, F12, Ctrl+Shift+I/J/C, and Ctrl+U. Neither control stops external analysis but both slow scanner-based reputation scoring.
- Detection artifacts are concrete and actionable. Hunt Microsoft Entra sign-in logs for Device Code authentication protocol events outside documented business use, correlating source IP, application identifier, and timestamp against email URL click telemetry, particularly clicks originating from PDF attachments. After suspicious authentication, monitor for MailItemsAccessed events, new inbox rules, OAuth consent grants, bulk OneDrive/SharePoint downloads, and new device registrations as persistence indicators. IOCs (155 domains, subdomains, URLs, and 41 PDF SHA1 hashes) and two YARA rules, GIB_MadApe_Phishing_Page and GIB_MadApe_Verification_Gate, targeting the /api/code/entered string, cc() and ne() function names, and the verification gate cookie logic, are published in the Group-IB report.
SOC hunt: query proxy or sandbox telemetry for POST requests to /api/code/entered and polling to /api/code/status/ on any non-Microsoft host, then correlate with microsoft[.]com/devicelogin visits within the same session. Where Conditional Access permits, restrict Device Code flow via the Authentication flows condition in Microsoft Entra and monitor Entra sign-in logs for the Original transfer method field to surface token reuse from earlier Device Code sessions.
#DFIR_Radar