
An AiTM (adversary-in-the-middle) attack is an advanced form of credential theft in which attackers insert themselves between a user and a legitimate authentication service to intercept credentials and session tokens. This method allows attackers to bypass Multi-Factor Authentication (MFA), even when strong authentication mechanisms are in place. AitM attacks have evolved from the traditional Man-in-the-Middle attacks but incorporate more sophisticated approaches with even more malicious intent. These attacks present a significantly higher potential for severe damage. Typical targets are cloud accounts such as Microsoft 365 or Google Workspace. Ready-made phishing kits like Evilginx and Tycoon 2FA put these attacks within reach of less skilled criminals.
Both Man-in-the-Middle (MitM) and Adversary-in-the-Middle (AitM) attacks involve an attacker intercepting communication between two parties, but they differ in their execution, scope, and primary targets. We’ll explore some of these differences to establish a comparison of both methods and their unique objectives.
A MitM attack occurs when an attacker secretly intercepts and possibly alters communication between two parties without their knowledge. The attacker can passively eavesdrop or actively manipulate the data being exchanged.The attacker intercepts the data being transferred between two communicating parties (i.e. the user and a website or the client and a server). The primary goals of an MitM attack are to steal credentials, session cookies or other sensitive information that can then be manipulated.
An AiTM attack goes after the sign-in itself. The attacker runs a convincing copy of the login page as a reverse proxy that forwards every input to the real service in real time. The user appears to sign in normally and even confirms the second factor. In the end, the attacker holds a valid session token.
How an AiTM attack unfolds:
1. The user receives a phishing email or QR code that links to an address resembling the real login page.
2. The proxy displays the genuine sign-in page and passes username, password and MFA code through to the service.
3. After the successful sign-in, the service issues a session cookie.
4. The proxy captures this cookie. The attacker loads it into their own browser and is signed in.
| Man-in-the-Middle (MitM) | Adversary-in-the-Middle (AiTM) | |
|---|---|---|
Target | General network communication | Authentication sessions (MFA) |
Technique | Intercepts and manipulates traffic | Acts as a proxy between user and authentication service |
Objective | Data theft, manipulation, espionage | MFA bypass, session hijacking |
Execution | Network-level attack | Web-based phishing attack |
Mitigation | Encryption (TLS, VPN, HTTPS), network security | Phishing-resistant MFA, token binding, conditional access |
MFA is a one-time barrier; therefore, once the attacker gains a session token, they no longer need to perform MFA. As the session is already hijacked, full access to the application is granted for the duration of the session. The attacker may continue to reuse the stolen session token to access the user’s account until the session expires, or the user logs out of the application.
This applies to every method in which the user types in or approves something that can be passed on:
| MFA method | Stops AiTM? | Why |
|---|---|---|
SMS code | No | The user types the code into the proxy page, and the attacker forwards it immediately. |
One-time code from an authenticator app | No | The code is usually valid for 30 seconds. That is enough time to relay it. |
Push approval | No | The user approves a real sign-in that runs through the proxy. |
Push with number matching | No | Prevents accidental approvals, but not a real-time proxy. |
FIDO2 security key or passkey | Yes | The signature is only valid for the genuine domain. The proxy never receives a valid response. |
This is why the US agency CISA classifies only FIDO/WebAuthn and PKI-based methods such as smart cards as phishing-resistant.
FIDO2/WebAuthn uses phishing-resistant methods that bind authentication to the device. No reusable secrets such as passwords or codes are transmitted, and the signature is only valid for the genuine domain. A sign-in through the proxy therefore fails, and the attacker never obtains a session token. The attacker also cannot generate a valid response without the legitimate device. Therefore, session hijacking, a key part of AiTM attacks, becomes ineffective.
FIDO2 uses public-key cryptography in four steps:
Even if an attacker does successfully intercept and relay an authentication request, they cannot steal the private key because it never leaves the user’s device. Each device generates a unique private key per website. An attacker cannot export or transfer these keys to another device. This applies to device-bound passkeys, for example on a hardware security key. Our article on passkeys for enterprises passkeys for enterprises ⟨/en/news/blog/authentication-101-passkeys-for-enterprises⟩ explains how they differ from synced passkeys.
MitM attacks represent a broad category of methods that specifically target network communications, while AitM phishing attacks provide a more refined approach, specifically designed to hijack authentication processes and allow attackers to bypass MFA.
Organizations should use both network security measures for MitM defense and adopt phishing-resistant authentication methods that prevent MFA bypass. Enterprise security strategies that implement FIDO2 passwordless authentication will protect against these threats, as AiTM techniques evolve.
One example is the Swissbit iShield Key 2. It supports FIDO2/WebAuthn, works via USB-A, USB-C or NFC and is also available as a FIPS 140-3 Level 3 version.
A man-in-the-middle attack eavesdrops on or alters general network traffic. An AiTM attack targets the sign-in: a fake login page forwards everything to the real service and then captures the session token.
No. SMS codes, one-time codes from apps and push approvals can be relayed through a proxy. FIDO2 security keys and passkeys only sign for the genuine domain, so the sign-in through the fake page never completes.
Not reliably. The user enters the code on the phishing page, and the attacker uses it right away. Number matching for push requests helps little here, because the sign-in really does take place.
A typical sign is a login from an unknown location shortly after the user’s regular sign-in. Another is the same session token showing up on two devices. Many identity providers flag these patterns as risky sign-ins.
CISA: Implementing Phishing-Resistant MFA (fact sheet, 2022), cisa.govNIST SP 800-63B-4: Digital Identity Guidelines, Authentication and Authenticator Management (2025), pages.nist.gov
CISA: Implementing Phishing-Resistant MFA (fact sheet, 2022), cisa.gov
NIST SP 800-63B-4: Digital Identity Guidelines, Authentication and Authenticator Management (2025), pages.nist.gov
FIDO Alliance: Passkeys, fidoalliance.org/passkeys
Want to test phishing-resistant MFA in your organization?
Receive the latest news and announcements about storage and security solutions as well as current events and new products.