# Adversary-in-the-Middle Phishing
> Adversary-in-the-middle (AiTM) phishing puts a transparent reverse proxy between the victim and the real login page. The victim completes their real password and MFA through the proxy, and the attacker keeps the authenticated session cookie that comes back, so the second factor never has to be defeated.
## How it works
The phishing site doesn't imitate the login page. It *relays* it. Every request goes on to the genuine IdP in real time and every response comes back, so the victim sees the real UI, real MFA prompts, and a successful login ([[raw/blog.talosintelligence.com/cisco-talos-state-of-the-art-phishing-mfa-bypass-3877|Talos]]). The proxy records the credentials and, more importantly, the **session cookie** issued after MFA. That cookie is proof of completed authentication, so replaying it skips password and MFA until it expires or is revoked ([[raw/obsidiansecurity.com/token-based-attacks-how-attackers-bypass-mfa-4363|Obsidian]]).
This defeats every factor whose output can be relayed: OTP, SMS, push, number matching. It doesn't defeat FIDO2/WebAuthn. That signature is bound to the origin the browser sees, and the proxy's origin doesn't match the IdP's ([[raw/blog.talosintelligence.com/cisco-talos-state-of-the-art-phishing-mfa-bypass-3877|Talos]]). Attackers therefore pair AiTM with **downgrade**: rewrite the IdP's method list to hide FIDO, or spoof a user agent the IdP doesn't offer FIDO to, so the victim uses a relayable factor ([[raw/ioactive.com/ioactive-authentication-downgrade-mfa-bypass-4084|IOActive]], [[raw/proofpoint.com/proofpoint-fido-authentication-downgrade-4085|Proofpoint]]).
The technique is sold as a service. Phishing-as-a-Service kits (Tycoon 2FA, EvilProxy) bundle proxying, evasion and cookie capture ([[raw/blog.talosintelligence.com/cisco-talos-state-of-the-art-phishing-mfa-bypass-3877|Talos]]). Infrastructure has moved to serverless and CDN platforms, which leave little forensic footprint ([[raw/ioactive.com/ioactive-authentication-downgrade-mfa-bypass-4084|IOActive]]). Stolen sessions feed the same market as infostealer-harvested cookies ([[raw/pretalx.com/the-cookie-is-a-lie-handing-canarytoken-sessions-to-infostealers-chcon-15537|CHCon]]).
## What to check
- [ ] Which factors do high-value users actually use? Anything other than FIDO2, passkeys or certificate-based auth is relayable.
- [ ] For FIDO-enrolled users, are weaker methods still allowed (a downgrade path)? Does the IdP fall back by user agent?
- [ ] Session cookie lifetime, and whether sessions are bound to device or token (token protection or binding).
- [ ] Detection: sign-in followed by the same session used from a different IP, ASN or device; impossible travel; mailbox-rule creation and new MFA-method registration right after login ([[raw/doit4everyone.github.io/mirage2fa-stole-4-561-m365-session-cookies-despite-mfa-via-aitm-proxy-13171|Mirage2FA guide]]).
- [ ] Conditional access: compliant or managed-device requirements for sensitive apps, so a replayed cookie from an attacker host fails.
- [ ] Help desk and MFA reset procedures, which AiTM operators pair with social engineering ([[raw/bugcrowd.com/bugcrowd-how-attackers-bypass-multi-factor-authentication-part-1-3878|Bugcrowd]], [[raw/netrixglobal.com/navigating-the-new-wave-of-mfa-bypass-attacks-in-2025-4527|Netrix]]).
## Notable cases
- **Mirage2FA (2024–2026)**: a PhaaS from the LinX Coders group. A WebSocket-based transparent proxy targeted Microsoft 365 through link, attachment (.htm/.svg) and QR lures. ANY.RUN estimated 9,426 targeted addresses, about 4,532 likely compromised, and 4,561 session-cookie theft events despite MFA ([[raw/doit4everyone.github.io/mirage2fa-stole-4-561-m365-session-cookies-despite-mfa-via-aitm-proxy-13171|guide]]).
- **Tycoon 2FA and EvilProxy**: PhaaS kits that added usability and detection-evasion features ([[raw/blog.talosintelligence.com/cisco-talos-state-of-the-art-phishing-mfa-bypass-3877|Talos]]).
- **Cloudflare Workers downgrade proxy (IOActive)**: an AiTM proxy that rewrites Entra ID's authentication configuration to hide FIDO2. Similar hiding was seen with 0ktapus and Scattered Spider ([[raw/ioactive.com/ioactive-authentication-downgrade-mfa-bypass-4084|IOActive]]).
- **Evilginx FIDO downgrade phishlet (Proofpoint)**: user-agent spoofing against Entra ID. Not observed in the wild at publication ([[raw/proofpoint.com/proofpoint-fido-authentication-downgrade-4085|Proofpoint]]).
## Defenses
- Deploy phishing-resistant authentication (FIDO2/WebAuthn, passkeys, Windows Hello for Business). Make it **mandatory** with no relayable fallback for enrolled users ([[raw/blog.talosintelligence.com/cisco-talos-state-of-the-art-phishing-mfa-bypass-3877|Talos]], [[raw/ioactive.com/ioactive-authentication-downgrade-mfa-bypass-4084|IOActive]]).
- Alert when a FIDO user suddenly authenticates with a weaker method ([[raw/ioactive.com/ioactive-authentication-downgrade-mfa-bypass-4084|IOActive]]).
- Bind sessions and tokens to devices, and require managed or compliant devices for sensitive resources, so a stolen cookie can't be replayed elsewhere ([[raw/obsidiansecurity.com/token-based-attacks-how-attackers-bypass-mfa-4363|Obsidian]]).
- Shorten session lifetimes and use continuous evaluation to revoke on risk. Make incident response revoke sessions and refresh tokens, not just reset the password.
- Where push is still used, enable number matching and limit request volume. Harden help-desk verification ([[raw/netrixglobal.com/navigating-the-new-wave-of-mfa-bypass-attacks-in-2025-4527|Netrix]]).
- Detect cookie replay with canary sessions and session-anomaly analytics ([[raw/pretalx.com/the-cookie-is-a-lie-handing-canarytoken-sessions-to-infostealers-chcon-15537|CHCon]], [[raw/doit4everyone.github.io/mirage2fa-stole-4-561-m365-session-cookies-despite-mfa-via-aitm-proxy-13171|Mirage2FA guide]]).
## Related
- [[Authentication Security]] · [[MFA Bypass]] · [[Passkeys and WebAuthn]] · [[Session Management]] · [[Device Code Phishing]] · [[OAuth Consent Phishing]] · [[Account Takeover]]
- [[Secrets Management]] · [[Security Talks]]
## Sources
- [[raw/blog.talosintelligence.com/cisco-talos-state-of-the-art-phishing-mfa-bypass-3877|Cisco Talos: State-of-the-art phishing — MFA bypass]]
- [[raw/doit4everyone.github.io/mirage2fa-stole-4-561-m365-session-cookies-despite-mfa-via-aitm-proxy-13171|Mirage2FA stole 4,561 M365 session cookies despite MFA via AiTM proxy]]
- [[raw/obsidiansecurity.com/token-based-attacks-how-attackers-bypass-mfa-4363|Token-Based Attacks: How Attackers Bypass MFA]]
- [[raw/bugcrowd.com/bugcrowd-how-attackers-bypass-multi-factor-authentication-part-1-3878|Bugcrowd: How attackers bypass multi-factor authentication (Part 1)]]
- [[raw/netrixglobal.com/navigating-the-new-wave-of-mfa-bypass-attacks-in-2025-4527|Navigating the New Wave of MFA Bypass Attacks in 2025]]
- [[raw/ioactive.com/ioactive-authentication-downgrade-mfa-bypass-4084|IOActive: Authentication Downgrade / MFA Bypass]]
- [[raw/proofpoint.com/proofpoint-fido-authentication-downgrade-4085|Proofpoint: FIDO Authentication Downgrade]]
- [[raw/pretalx.com/the-cookie-is-a-lie-handing-canarytoken-sessions-to-infostealers-chcon-15537|The cookie is a lie: handing Canarytoken sessions to infostealers (CHCon 2026)]]