Join our Newsletter — 33% off our NHI Course
Home› Guides› AiTM Phishing Guide: Evilginx, Tycoon and Token Theft
Guide Email & Communications Security

AiTM Phishing Guide: Evilginx, Tycoon and Token Theft

← All guides
By Lalit Choda, NHI Mgmt Group Updated 16 October 2026 17 min read
On this page

Adversary-in-the-middle (AiTM) phishing defeats passwords, one-time codes and push approvals in a single step, because the attacker relays a real sign-in and keeps the session cookie that comes back. Kits rented as phishing-as-a-service have made this a routine attack on Microsoft 365 and Google workforce accounts, and device code phishing reaches the same outcome without a proxy. This guide explains both at technique level, the kits defenders will see in reporting, which authentication methods resist them, and the identity controls, detections and response steps that close the gap. It is for identity engineers, architects and SOC teams; for phishing in general see the Phishing Guide.

Key takeaways

  • AiTM steals the session, not just the password. A reverse proxy relays the user's real sign-in, including MFA, and captures the session cookie, so the attacker never needs to authenticate again while the cookie lives.
  • Only origin-bound authenticators break the relay. FIDO2 security keys, passkeys, Windows Hello for Business and certificate-based authentication do not release a usable response to a look-alike domain; OTP codes, push approvals and SMS all do.
  • Device code phishing needs a separate control. The user signs in on the genuine Microsoft page, so phishing-resistant MFA does not stop it; block the device code flow with an authentication flows policy and allow it only where a device has no keyboard.
  • Bind sessions to managed devices. Requiring a compliant or joined device, plus token protection where supported, means a replayed cookie or token from attacker infrastructure fails Conditional Access.
  • Revoke, do not just reset. A password reset alone leaves stolen refresh tokens and attacker-registered MFA methods in place; response must revoke sessions, remove added methods and devices, and delete inbox rules.

How AiTM phishing works

In classic credential phishing the fake page collects a password and stops. In AiTM phishing the attacker runs a reverse proxy that sits between the victim and the legitimate sign-in service. Every page the victim sees is the real one, relayed through the attacker's domain, so branding, error messages and the MFA prompt are all genuine. Microsoft Threat Intelligence, describing a campaign that tried to reach more than 10,000 organisations from September 2021, put it simply: "The URL is the only visible difference." When the user completes sign-in, the identity provider issues a session cookie, the proxy keeps a copy and the attacker imports it into their own browser.

Microsoft is explicit that "this is not a vulnerability in MFA": the user really did authenticate, and the cookie can carry an MFA claim. The move to money is fast: in the same campaign, payment fraud began within about five minutes of the session being stolen. The attackers searched mailboxes for finance threads, created inbox rules to hide replies from the people they were defrauding and deleted evidence, then used the trusted mailbox for follow-on business email compromise. See the Email Identity and BEC Guide.

  • Reverse-proxy relay: the proxy forwards traffic both ways and captures credentials, codes and cookies as they pass. This is what Evilginx, Modlishka and Muraena do, and what most commercial kits package.
  • Synchronous relay pages: several kits show their own copy of the sign-in page and relay what the user enters to the real service in real time. The outcome, a stolen session, is the same.
  • Token use after capture: the attacker reaches mail, files and Microsoft Graph, often through non-interactive sign-ins users never see.

The AiTM kit ecosystem

Sekoia's June 2025 analysis ranked the kits most prevalent from January to April 2025 and found they mainly target Microsoft 365 and, less often, Google accounts. Kits are typically rented on monthly subscriptions, generally between $100 and $1,000, which lowers the skill needed. The table is for recognition, not attribution.

Kit or frameworkTypeFirst seen (per Sekoia)What defenders should know
Evilginx (Evilginx2)Open-source reverse-proxy frameworkNot statedATT&CK software S9003; captures credentials, tokens and cookies; ATT&CK records Star Blizzard using it.
Modlishka, MuraenaOpen-source reverse-proxy frameworksNot statedNamed by Microsoft in the 2021 to 2022 campaign.
Tycoon 2FAPhishing-as-a-service, synchronous relayLate 2023Ranked first by prevalence in early 2025; widely linked to QR code lures.
EvilProxyPhishing-as-a-service, reverse proxyAugust 2020Promoted on cybercrime forums and Telegram as a service.
NakedPagesReverse-proxy kit sold on Telegram2022Still ranked third in early 2025.
Sneaky 2FAPhishing-as-a-service, synchronous relay2024Detections rose sharply in the first quarter of 2025.
Rockstar 2FA, Dadsec OTTPhishing-as-a-serviceMay 2023 (Dadsec), around December 2023 (Rockstar)Rockstar 2FA is believed to be a rebrand of Dadsec OTT.
Mamba 2FAPhishing-as-a-service, synchronous relayAt least November 2023Sold to dozens of affiliates; decentralised infrastructure.
GreatnessKit sold on Telegram2022Lower prevalence by 2025.

Kit names change faster than controls, so indicator blocking supports the defence but is not it. Lures increasingly arrive as QR codes, HTML attachments and SVG files, which moves the click onto phones outside managed browsers. Every kit ends in the same artefact, a stolen session, so the controls below work whichever kit is used.

Device code phishing

Device code phishing reaches the same result as AiTM without a proxy. The OAuth 2.0 device authorization grant exists for devices with no keyboard: the device shows a short code, the user enters it on a genuine sign-in page from another device, and tokens are issued to the waiting device. In device code phishing the attacker starts that flow, sends the code to the victim with a pretext, and the victim authenticates on the real Microsoft page. The tokens go to the attacker. ATT&CK v20 now describes device code phishing under Spearphishing Link (T1566.002), and the resulting token theft sits under Steal Application Access Token (T1528).

Microsoft reported that Storm-2372, active since August 2024 and assessed with moderate confidence as aligned with Russian interests, used this method against government, NGO, IT, defence, telecoms, health, education and energy organisations. The actor used the tokens to search mail through Microsoft Graph and later shifted to the Microsoft Authentication Broker client ID, which let it register an attacker-controlled device in Entra ID and obtain a Primary Refresh Token (PRT). That turns a phished session into a device identity.

  • Block the flow: Microsoft Learn calls device code flow "a high-risk authentication method that can be part of a phishing attack" and recommends "blocking device code flow wherever possible" using the Conditional Access authentication flows condition.
  • Allow by exception: only for input-less devices such as digital signage, scoped by platform and location.
  • Know the side effects: device code sessions stay protocol tracked through later refreshes, and policies targeting all resources also cover the Device Registration Service (client ID 01cb2876-7ebd-4aa4-9cc9-d28bd4d359a9, which needs excluding if device code is used for registration). Blocked refresh tokens return AADSTS530036.
  • Restrict device registration: limit which users can register or join devices, so a phished token cannot become a PRT.

ATT&CK mapping

IDs checked against ATT&CK v20. The T1557 sub-techniques (.001 to .004) are network-layer attacks such as ARP poisoning; web reverse-proxy phishing sits at the parent technique.

TechniqueHow it appears in AiTM and device code phishingATT&CK mitigationsDetection strategy
T1566.002 Phishing: Spearphishing LinkDelivery of the proxy link, QR code or device code pretext; v20 text now covers consent and device code phishingM1047, M1021, M1054, M1018, M1017DET0107
T1557 Adversary-in-the-MiddleReverse proxy relays the sign-in (Credential Access and Collection)M1042, M1041, M1037, M1035, M1031, M1030, M1017DET0296
T1539 Steal Web Session CookieProxy captures the post-MFA cookieM1032 (FIDO keys bound to the login domain, Conditional Access for trusted devices), M1047, M1021, M1054, M1051, M1017DET0509
T1550.004 Use Alternate Authentication Material: Web Session CookieAttacker replays the cookie to reach mail and files (Lateral Movement)M1054DET0074
T1528 Steal Application Access TokenDevice code and consent phishing yield access and refresh tokensM1047, M1021 (block end-user consent), M1018, M1017DET0515

Which authentication methods resist AiTM

NIST SP 800-63B-4 is direct: passwords, look-up secrets, out-of-band authenticators and OTPs are "not phishing-resistant". Manual OTP entry fails because "an impostor verifier could relay an authenticator output". Phishing resistance comes from verifier name binding, where the authenticator output is cryptographically bound to the site it is used on, or channel binding. That is the property that breaks a reverse proxy: a passkey created for the real domain is simply not offered to the attacker's domain. CISA's fact sheet reaches the same conclusion, calling FIDO/WebAuthn "the only widely available phishing-resistant authentication", with PKI-based smart cards as the less widely available alternative.

MethodReverse-proxy relayReplay of a stolen cookieDevice code phishing
Password only, SMS or voice codeNot resistedNot resistedNot resisted
Authenticator app OTPNot resisted: code is relayedNot resistedNot resisted
Push with number matchingNot resisted: user approves a real promptNot resistedNot resisted
Synced passkeyResisted (origin bound)Not addressed by the authenticatorNot resisted: user signs in on the genuine page
Device-bound passkey, FIDO2 key, Windows Hello for Business, certificate-based authenticationResistedNot addressed by the authenticatorNot resisted
Any method plus compliant device requirement and token protectionResisted: proxy is not a managed deviceReduced: bound tokens fail on another deviceReduced: attacker device fails the device condition

Authenticator strength protects the sign-in moment; device binding protects the session afterwards. A cookie stolen by an infostealer from a security key user is still a valid cookie. See the Passwordless and Passkeys Guide and the Hardware Security Keys Guide.

Controls that close the gap

Phishing-resistant authentication, enforced

  • Enforce through policy, not enrolment: in Microsoft Entra, the Conditional Access grant Require authentication strength with the built-in phishing-resistant MFA strength stops the weaker path being chosen. Registration alone does not.
  • Remove fallbacks: if SMS, voice or OTP remain allowed, the proxy simply asks for them. See the MFA Fatigue and Bypass Guide.
  • Protect registration: require a phishing-resistant credential or a time-limited access pass to register new methods, otherwise a proxied session can add the attacker's authenticator.

Bind the session to a device

  • Require a compliant or joined device: both Microsoft's AiTM guidance and ATT&CK mitigation M1032 recommend Conditional Access that only admits trusted devices. The attacker's browser is not enrolled, so the replayed cookie fails policy. See the Device Trust and Posture Guide.
  • Token protection: this Conditional Access session control accepts only device-bound sign-in session tokens such as PRTs, so "even if a threat actor steals the token, it can't be used from another device". Native clients for Exchange Online, SharePoint Online and Teams are generally available on Windows, macOS and iOS/iPadOS (Apple devices must be MDM managed, macOS 14 or later, iOS 16 or later); browser support is in preview for selected web apps only.
  • Session lifetime: NIST SP 800-63B-4 sets the AAL2 overall reauthentication timeout at no more than 24 hours (SHOULD) with an inactivity timeout of no more than one hour, and AAL3 at no more than 12 hours (SHALL) with 15 minutes inactivity. Sign-in frequency policies for sensitive apps shrink the window a stolen cookie is useful.

Evaluate continuously

  • Continuous Access Evaluation (CAE): Exchange Online, SharePoint Online and Teams act on critical events in near real time (up to 15 minutes): account disabled or deleted, password changed or reset, MFA enabled, all refresh tokens revoked by an administrator, and high user risk. IP location enforcement is instant. CAE tokens can last up to 28 hours, so revocation, not expiry, is the control.
  • Risk-based policies: sign-in and user risk conditions block or force reauthentication when Identity Protection flags an anomalous token or unfamiliar sign-in properties.

Reduce the click

Link detonation, QR code and SVG attachment inspection and browser reputation blocking cut volume, and blocking end-user consent to unverified OAuth apps (M1021 under T1528) stops a proxied session granting a persistent app. See the Enterprise Browser and Browser Security Guide.

Choosing controls for your organisation

  • Security keys or platform passkeys: choose device-bound FIDO2 keys for administrators, finance approvers and help desk staff, where NIST AAL3 or non-exportable keys matter. Choose Windows Hello for Business or platform passkeys for the general workforce on managed devices, where there is nothing extra to issue. Synced passkeys suit customers and bring-your-own-device staff but cannot meet AAL3.
  • Device compliance or token protection: device compliance works across browsers and apps today and is the broader control; token protection adds cryptographic binding but covers fewer resources. Use compliance as the baseline and add token protection for the apps it supports.
  • Small organisations: enforce phishing-resistant authentication for email and the identity provider, block device code flow and legacy authentication, require managed devices for administrators and turn on built-in risk detections. That covers most of the exposure without a SOC.
  • Large organisations: expect exceptions: shared workstations, contractors on unmanaged devices, input-less devices that need device code flow and guest accounts (CAE does not support guests). Make each a named, time-limited exception group with compensating controls such as a virtual desktop.

How to implement

  1. Baseline: export a month of sign-in logs and count users by MFA method, device state and device code use (the authentication protocol filter). This shows who breaks when you enforce.
  2. Protect administrators first: issue FIDO2 keys and enforce the phishing-resistant authentication strength for privileged roles. CISA recommends starting with IT administrators and help desk staff, then email, remote access and identity systems.
  3. Block device code flow in report-only mode: review the report for a full business cycle, build the exception group for legitimate input-less devices, then enforce.
  4. Require compliant devices in rings: IT, then one business unit, then everyone, excluding two monitored break-glass accounts.
  5. Add token protection: report-only first, reviewing interactive and non-interactive sign-ins across normal use, then enforce for known reliable users.
  6. Remove fallbacks: once phishing-resistant coverage passes target, disable SMS, voice and OTP for enforced groups.
  7. Roll back safely: rollback means switching a policy back to report-only, not deleting it. Policy changes can take up to a day to reach CAE-enabled services, so revoke sessions when a change must apply at once.

Detection and measurement

AiTM leaves its clearest traces in identity and mailbox logs. Microsoft's token theft playbook notes that some detections, such as anomalous token, have no SigninLogs row, so collect AuditLogs and OfficeActivity and stream Identity Protection risk tables to the SIEM. See the ITDR Guide.

SignalWhere to find itWhy it matters
Anomalous token, unfamiliar sign-in properties, anonymous IP addressEntra ID Protection risk detectionsSession replay from attacker infrastructure
"Stolen session cookie was used"Microsoft Defender XDR alertDirect evidence of replay against Exchange Online
Mismatched user agent and application ID within one sessionEntra sign-in logsProxy and kit behaviour flagged by Sekoia
Same session ID from two IPs or ASNs; unfamiliar non-interactive sign-insInteractive and non-interactive sign-in logsCookie used from a second location
Click on a device login URL followed by a risky sign-in; error 50199 then success in the same sessionEmail click events, sign-in logsDevice code phishing pattern per Microsoft
New inbox rule, forwarding rule or mass mail access soon after sign-inUnified audit log, Defender for Cloud AppsBEC preparation, often within minutes
Security info registered or device registered shortly after a risky sign-inAuditLogs, Device Registration Service eventsPersistence through attacker MFA or PRT

Metrics that show the programme is working:

  • Phishing-resistant coverage: percentage of sign-ins, not users, satisfied by a phishing-resistant method, split by privileged and standard accounts.
  • Managed-device share: percentage of sign-ins to email and files from compliant or joined devices.
  • Device code exposure: device code sign-ins per week outside the exception group (target zero).
  • Time to revoke: median minutes from a token theft alert to session revocation, measured against the five-minute fraud window Microsoft observed.
  • Fallback population: number of accounts still allowed SMS, voice or OTP.

Responding to a stolen session

Microsoft's playbook states that "containment, or mitigation, is prioritized over information gathering". A password reset alone is not containment. See the Account Takeover Prevention Guide and the Incident Response Guide.

  1. Revoke sessions: revoke all refresh tokens (revokeSignInSessions in Microsoft Graph, Revoke-MgUserSignInSession in PowerShell, or Revoke sessions in the portal); CAE-capable services act on this within minutes.
  2. Reset the password and mark the user compromised in Identity Protection; for hybrid accounts the playbook advises resetting the password twice.
  3. Remove persistence: delete MFA methods and devices registered during the attack window, inbox and forwarding rules, and OAuth consents granted to unknown apps.
  4. Scope: find every user who clicked the same URL or signed in from the same IP or user agent, and review changes made by affected privileged accounts.
  5. Warn counterparties: if mail was read, alert suppliers and customers in those threads to expect payment instruction fraud.

Framework mapping

FrameworkReferenceRelevance
NIST SP 800-63B-4AAL2 phishing-resistant option; AAL3 non-exportable keys; reauthentication timeoutsAuthenticator choice and session lifetime
NIST SP 800-53 Rev. 5IA-2(1), IA-2(8), SC-23, AC-12, SI-4MFA for privileged access, replay resistance, session authenticity and termination, monitoring
NIST CSF 2.0PR.AA-03Users, services and hardware are authenticated
CIS Controls v8.16.3, 6.4, 6.5, 14.2MFA for external apps, remote access and administrators; social engineering training
ISO/IEC 27001:2022 Annex AA.5.17, A.8.5, A.8.16Authentication information, secure authentication, monitoring
MITRE ATT&CK v20T1566.002, T1557, T1539, T1550.004, T1528Detection engineering and threat modelling

Common failure patterns

  • Calling OTP "strong MFA": codes from apps or hardware tokens are relayed in real time. The Dropbox GitHub breach began with a fake CircleCI login that collected credentials and a one-time code, and the Twilio 0ktapus campaign used SMS lures to harvest employee sign-ins.
  • Phishing-resistant MFA registered but not required: users enrol keys, policy still accepts push or SMS, and the proxy asks for the weaker method.
  • Treating sign-in as the end of the problem: session cookies outlive the authentication that created them. The CircleCI breach shows a stolen, already-authenticated SSO session being used directly; device binding and short sessions are the answer, not a stronger authenticator.
  • Leaving device code flow open to everyone: it is enabled by default for most tenants and bypasses every authenticator choice.
  • Reset without revoke: the password changes, the attacker's refresh token, registered authenticator and inbox rule survive.
  • Exception creep: rollout exclusions are never reviewed and become the attacker's path.

Practitioner checklist

  • Enforce a phishing-resistant authentication strength for administrators, finance and help desk staff first, then everyone.
  • Remove SMS, voice and OTP fallbacks for every enforced group.
  • Block device code flow with an authentication flows policy and keep a reviewed exception group.
  • Restrict who can register or join devices and who can register security information.
  • Require compliant or joined devices for email, files and admin portals; add token protection where supported.
  • Enable CAE and risk-based Conditional Access, and stream identity risk tables to the SIEM.
  • Alert on inbox rules, MFA method changes and device registrations that follow a risky sign-in.
  • Test a token theft runbook that revokes sessions first, quarterly.

Standards and references

Related NHI Mgmt Group resources: Phishing Guide · MFA Fatigue and Bypass Guide · Passwordless and Passkeys Guide · Conditional Access Guide · Token and Session Security Guide

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Written and reviewed by Lalit Choda, NHI Mgmt Group. Last updated 16 October 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org