
In short: Only MFA that is bound to the genuine domain stops AiTM phishing. FIDO2 security keys and passkeys sign a login only for the service they were registered with (relying party ID), and only when the browser is on the genuine address (origin). A proxy on a phishing domain therefore never obtains a login that the real service accepts.
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 explains how they differ from synced passkeys.
The protection comes from three bindings that are checked at every FIDO2 login:
Origin: the address actually opened, made up of scheme, host and port, for example https://login.example.com. The browser writes it into the signed login data itself. A phishing page cannot fake it.
Relying party ID (RP ID): the domain of the service the passkey was registered for. The browser only allows the login if the opened address belongs to that domain.
Challenge: a one-time random value from the server. It makes every signature unique, so an intercepted response cannot be reused.
The phishing link takes the user to the attacker’s page, for example login-example.co instead of login.example.com.
The proxy requests a challenge from the real service and passes it on to the browser.
The browser sees that the opened address does not belong to the service’s registered domain. There is no matching passkey for the phishing domain, so the key signs nothing.
Even if a signature were created, it would contain the wrong origin. The real service checks challenge, origin and RP ID and rejects the login.
Without a valid login, the service issues no session token. The attacker has nothing to hijack.
Note the limit of this protection: binding to origin and RP ID prevents an attacker from relaying the login. It does not protect a session token that has already been stolen in another way, for example by malware on the device. That requires the additional measures in the next section.
Choosing a FIDO2 security key for your organization? Our comparison of the iShield Key 2 and YubiKey 5 covers the key criteria: passkey storage, FIPS 140-3, firmware updates, access control and supply chain.
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.
It checks that the challenge is its own, that the origin matches the genuine address, that the RP ID belongs to the registered domain and that the signature matches the stored public key. Only if everything matches is the login accepted.
A passkey is bound to the domain it was registered for. On a different domain, the browser does not offer it, and a signature for the genuine domain cannot be created there.
No. FIDO2 prevents attackers from capturing the login through a proxy. A cookie stolen from the device, for example by malware, needs short session lifetimes, token binding and conditional access.
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
W3C: Web Authentication Level 2, relying party identifier and origin, w3.org/TR/webauthn-2
Want to test phishing-resistant MFA in your organization?