Threat reportPhishingTL-2026-7067
MadApe phishing kit abuses Microsoft 365 Device Code authentication to steal access tokens without passwords
Group-IB documents MadApe, a previously undocumented phishing kit that uses PDF lures impersonating SharePoint, OneDrive, Teams, Adobe Acrobat and DocuSign to push victims to microsoft.com/devicelogin with an attacker-initiated device code. If the victim completes sign-in, operators can obtain access and, where supported, refresh tokens for mailbox and file access, and the authentication may satisfy MFA. First disclosed .
Key facts
| Identifiers | TL-2026-7067 |
|---|---|
| Also known as | MadApe, Mad Ape |
| Severity | HIGH |
| First disclosed | |
| Affected products | Microsoft Microsoft 365 / Entra ID (OAuth 2.0 Device Authorization Grant) |
| Malware | MadApe |
| MITRE ATT&CK techniques | T1204.001 Malicious Link, T1497 Virtualization/Sandbox Evasion, T1528 Steal Application Access Token, T1550.001 Application Access Token, T1566.001 Spearphishing Attachment, T1566.002 Spearphishing Link, T1583.001 Domains, T1584 Compromise Infrastructure, T1622 Debugger Evasion, T1684.001 Impersonation |
| Motivation | UNKNOWN |
| Target regions | israel |
| Detection rules | 9 (1 shown free) |
| Sources | 6 cited sources |
Detection coverage
As of 2026-11-30, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-7067 across Splunk SPL, Microsoft KQL and Sigma, covering 25 indicator(s) of compromise. The whole corpus is readable without an account. Every threat comes with one complete detection in Splunk SPL, Microsoft KQL and Sigma, free for everyone; a free account adds daily TL Creds to unlock the rest. Paid plans add a larger daily allowance, correlation and the MCP server. Threadlinqs MCP server · View plans.
Free detection: MadApe Device Code Phishing - Successful Entra ID Device Code Sign-In from Unmanaged Device
Detects successful Microsoft Entra ID sign-ins using the OAuth 2.0 Device Authorization Grant (device code flow) from unmanaged devices. MadApe PDF lures push victims to microsoft.com/devicelogin with an attacker-initiated code; when the victim signs in, the operator's server-side polling obtains access/refresh tokens (T1528) that can satisfy MFA. Entra sign-in telemetry is the authoritative record of the victim completing the flow, so this fires even when the lure domain is unknown.
- Languages: Splunk SPL, Microsoft KQL, Sigma
- ATT&CK: T1528, T1550.001, T1204.001
- Data sources: azure:monitor:aad SignInLogs (index=azure), Microsoft Entra ID SigninLogs
- Severity: high
- Confidence: high
Splunk SPL
index=azure sourcetype="azure:monitor:aad" category=SignInLogs properties.authenticationProtocol=deviceCode properties.status.errorCode=0 earliest=-24h
```MadApe TL-2026-7067 - successful Entra device code sign-ins from unmanaged devices (victim completes microsoft.com/devicelogin)```
| eval user=lower('properties.userPrincipalName'), src_ip='properties.ipAddress', app='properties.appDisplayName', country='properties.location', unmanaged=if(lower('properties.deviceDetail.isManaged')="true",0,1)
| stats count AS signins dc(src_ip) AS distinct_ips values(src_ip) AS src_ips values(app) AS apps values(country) AS countries max(unmanaged) AS unmanaged min(_time) AS first_seen max(_time) AS last_seen BY user
| where unmanaged=1
| convert ctime(first_seen) ctime(last_seen)Microsoft KQL
SigninLogs
| where TimeGenerated > ago(24h)
| where ResultType == 0
| where AuthenticationProtocol =~ "deviceCode" or OriginalTransferMethod =~ "deviceCodeFlow"
| extend IsManaged = tostring(DeviceDetail.isManaged), Country = tostring(LocationDetails.countryOrRegion)
| where IsManaged !~ "true"
| summarize SignIns = count(), SourceIPs = make_set(IPAddress), Apps = make_set(AppDisplayName), Countries = make_set(Country), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by UserPrincipalName
| project UserPrincipalName, SignIns, SourceIPs, Apps, Countries, FirstSeen, LastSeenSigma
title: MadApe - Successful Entra ID Device Code Flow Sign-In
id: a1d3c5e7-1b2f-4c6a-8d90-3e4f5a6b7c01
status: experimental
description: Detects successful Microsoft Entra ID sign-ins that use the OAuth device code flow. MadApe phishing PDFs direct victims to microsoft.com/devicelogin with an attacker-initiated code, letting the operator obtain access and refresh tokens without a password.
references:
- https://www.group-ib.com/blog/madape-microsoft-device-code-phishing-kit/
- https://learn.microsoft.com/en-us/entra/identity/conditional-access/policy-block-authentication-flows
author: Threadlinqs Team
date: 2026/11/30
tags:
- attack.credential_access
- attack.t1528
- attack.execution
- attack.t1204.001
- attack.defense_evasion
- attack.t1550.001
logsource:
product: azure
service: signinlogs
detection:
selection:
AuthenticationProtocol: deviceCode
ResultType: 0
condition: selection
falsepositives:
- Legitimate device code use on input-constrained devices such as shared Teams Rooms, IoT or CLI tooling
- Administrators using Azure CLI or PowerShell with device code authentication
level: highKnown false positives:
- Administrators and developers legitimately using Azure CLI / PowerShell device code login
- Shared devices such as Teams Rooms, kiosks or IoT devices that authenticate with device code
Tuning notes: Inventory legitimate device code users first (Conditional Access report-only with the Authentication flows condition) and exclude those accounts/apps and compliant corporate egress IPs. Adjust index/sourcetype and the properties.* field names to match your Splunk add-on's Entra sign-in ingestion. Enrich with ASN to prioritise hosting-provider source IPs.
- MadApe PDF Lure Delivery - Known Lure Attachment Names and SHA1 Hashes · unlock with TL Creds
- MadApe Token Reuse - Non-Interactive Sign-Ins from a New IP After a Device Code Sign-In · unlock with TL Creds
- MadApe Operator Panel Infrastructure - Connections to [indicator] and Panel Domains · unlock with TL Creds
- MadApe Lure and Staging Domain Access via Web Proxy, Safe Links or Endpoint · unlock with TL Creds
- MadApe Follow-On - OAuth Application Consent Granted After Token Theft · unlock with TL Creds
- MadApe Brand-Impersonating Hosts - SharePoint, OneDrive, DocuSign and Adobe Lure Domains · unlock with TL Creds
- MadApe Post-Compromise - Device Code Sign-In Followed by Inbox Rule, Mail Access or OAuth Consent · unlock with TL Creds
- MadApe Kit Backend - [indicator] Polling and [indicator] Requests · unlock with TL Creds
Indicators of compromise
As of 2026-11-30, Threadlinqs Intelligence tracks 25 indicators of compromise for TL-2026-7067.
Sample indicators (3 of 25)
- IP address:
5.230.194[.]87 - Domain:
householdwares[.]co - File hash:
e9621f90091b56c712858a27d3a775cde21c6463
Defanged, TLP:CLEAR. Full set of 25 indicators: unlock with TL Creds.
Technical analysis
Group-IB mapped 155 root domains, 97 of which host phishing components.
MadApe is a Microsoft Device Code phishing kit reported by Group-IB Threat Intelligence (researchers Mansour Alhmoud and Faraz Ali). No credentials are collected on attacker-controlled pages. The phishing backend requests a device code from Microsoft and embeds the user code in the lure page; the victim copies it (the page's JavaScript cc() function handles display, clipboard copy and logging via navigator.clipboard.writeText, and ne() opens the Device Login page) and enters it at the legitimate microsoft.com/devicelogin. Token polling against Microsoft's token endpoint runs server-side, so if the victim completes sign-in and tenant policy allows, the operator can obtain an access token and, where supported, a refresh token granting mailbox and file access. Because the victim performs the authentication, it may also satisfy MFA.
Delivery chain: a phishing email carries a business-themed PDF (payments, invoices, contracts, account statements; some emails use the target organization's branding, signatures or forwarded-mail content). The PDF's embedded link leads to an intermediary page, either a SharePoint-style 'Secure Document Access' page (redirect after a click and a ~500 ms overlay) or a client-side human-verification gate (randomly selected text CAPTCHA, text entry, image selection or press-and-hold challenge) intended to keep security scanners out; completion sets a short-lived cookie _cv=1 (max-age 300) and reloads. A per-sample targetUrl variable lets operators swap the destination without altering the template. Lure templates impersonate SharePoint, OneDrive, Microsoft Teams (including a German voicemail lure), Adobe Acrobat, DocuSign and Microsoft sign-in, in at least nine languages (English, Hebrew, German, Portuguese, French, Spanish, Polish, Finnish, Icelandic); Hebrew payment-themed lures target recipients in Israel. Pages block right-click and F12/Ctrl+Shift+I/J/C/Ctrl+U, which only hinders casual inspection. Backend endpoints are /api/code/entered and /api/code/status/ (polled every 5 seconds); sequential record IDs reflect backend records, not confirmed victims.
Infrastructure: Group-IB mapped 155 root domains; Device Code components were found on 97 (33 subdomain-only, 54 path-only, 10 both) and the remaining 58 are assessed as staged. 154 were registered in 2026 (117 between mid-June and late August, peak week from 2026-08-17 with 26 registrations), 133 of 154 (86.4%) via Dynadot, and 69% share a creation second with another domain (largest batch: 10 domains at 2026-08-18 23:48:21 UTC). Decoy sites share one 'C2S Logistics — Global Supply Chain Solutions' HTML template. Nine legitimate third-party sites were assessed as likely compromised and used to host redirect pages. The operator panel ('Mad Ape — Login') was first seen 2026-08-19 on 5.230.194.87 (AS12586, ASGHOSTNET GmbH, Germany) and appeared on at least five domains. Group-IB linked everything to one operator via shared code, decoys, naming and registration patterns, while noting no single clue proves it, and does not attribute the activity to any known actor. Group-IB published YARA rules (GIB_MadApe_Phishing_Page, GIB_MadApe_Verification_Gate, dated 2026-10-28; the latter has a flaw where $title is an empty string matching any file) and IOC lists (~300 URLs, 250+ domains, ~50 PDF SHA1 hashes). Victim counts, sectors and confirmed compromises are not reported. Note: Group-IB's blog page and the platform hunt record carry a 2026-11-25 date, while Expert Insights dates both its coverage and the Group-IB research to 2026-10-29; the earlier date is used for first_disclosed.
MITRE ATT&CK techniques by tactic:
Execution
Defense Evasion
T1497 Virtualization/Sandbox Evasion; T1622 Debugger Evasion; T1684.001 Impersonation
Credential Access
T1528 Steal Application Access Token
lateral-movement
T1550.001 Application Access Token
Lateral Movement
T1550.001 Application Access Token
Initial Access
T1566.001 Spearphishing Attachment; T1566.002 Spearphishing Link
Resource Development
Remediation
Immediate actions
- Review Microsoft Entra sign-in logs for Device Code flow authentications and inventory legitimate use
- Revoke user sessions and refresh tokens for any account that completed an unexpected device code sign-in (already-issued access tokens may remain valid until expiry)
- Block or hunt DNS/proxy traffic for the MadApe domains and for /api/code/entered and /api/code/status/ requests
- Hunt for post-compromise activity: new device registrations, inbox rules, MailItemsAccessed events, new OAuth consent grants, bulk SharePoint/OneDrive downloads
Workarounds
- Block the Device Code flow with Entra Conditional Access (Authentication flows condition) where it is not needed; test in Report-only mode first and keep exclusions minimal
Longer-term hardening
- Monitor Device Code sign-ins from hosting providers and unusual locations
- Correlate Device Code sign-ins with clicks on PDF-originated links
- Train users to treat unexpected device code requests as suspicious and report them
Affected and fixed versions
- Microsoft — Microsoft 365 / Entra ID (OAuth 2.0 Device Authorization Grant)
Vulnerable versions: Tenants permitting the Device Code authentication flow
Fixed in: Tenants blocking Device Code flow via Conditional Access
Timeline
- Mid-June 2026: MadApe-linked domain registrations begin; 117 of 154 domains registered in 2026 fall between mid-June and late August (exact day not stated)
- Batch of 6 domains registered in the same second, one of the same-second creation groups Group-IB uses to link infrastructure
- Batch of 8 domains registered in the same second
- Peak registration week begins with 26 domains registered
- Largest same-second batch: 10 domains created at 23:48:21 UTC
- Earliest observed Mad Ape operator panel on [domain withheld] ([IP address withheld], AS12586 ASGHOSTNET GmbH, Germany)
- Group-IB's GIB_MadApe_Phishing_Page and GIB_MadApe_Verification_Gate YARA rules are dated this day; domain registration and provisioning continued through September and October
- Group-IB Threat Intelligence publishes MadApe research (date per Expert Insights coverage; Group-IB page metadata and the hunt record show 2026-11-25, with a later modification on 2026-11-27)
- Help Net Security reports on the MadApe kit
Sources cited
- MadApe: The Code That Opens the Door (Group-IB) group-ib.com · Research · 2026-10-29
- MITRE ATT&CK T1528 Steal Application Access Token MITRE · Research
- MITRE ATT&CK T1566.001 Spearphishing Attachment MITRE · Research
- Microsoft Learn: Block authentication flows with Conditional Access Microsoft · Vendor report
- MadApe phishing kit steals Microsoft 365 access without ever asking for a password (Help Net Security) Help Net Security · News · 2026-11-30
- New MadApe Phishing Kit Abuses Microsoft Device Code Sign-In to Steal Account Tokens (Expert Insights) expertinsights.com · News · 2026-10-29
AI-drafted from 6 cited sources; published ; last updated —.