Adversary-in-the-Middle (AiTM)

AiTM attacks target sessions, not passwords
AiTM attacks target sessions, not passwords

“If MFA passed, why are we still compromised?”

This question is becoming increasingly common in modern SOCs.

Adversary-in-the-Middle (AiTM) attacks are one of the most effective phishing techniques today because they don’t break authentication —
they abuse sessions.


What Is an Adversary-in-the-Middle (AiTM) Attack?

An AiTM attack is an advanced phishing technique where an attacker places themselves between the user and the legitimate login service using a phishing proxy.

The login flow looks completely normal:

  1. User clicks a phishing link
  2. User enters credentials
  3. MFA challenge is completed successfully
  4. Session cookie is issued
  5. Attacker steals and reuses the session token

At no point does MFA fail.

From the logs, authentication appears legitimate — but the attacker is already inside.


Why AiTM Attacks Are Hard to Detect

Traditional detections focus on:

AiTM attacks generate:

The compromise happens after authentication, at the session layer.

This is why many AiTM incidents are missed.


Detecting AiTM Attacks in Microsoft Defender

AiTM detection is about context, not credentials.

Below are the key signals defenders should look for.


1. 🚩 Successful MFA with Abnormal Context

A successful MFA login should still be investigated if it comes with:

These often indicate stolen session reuse.


2. 🚩 Impossible Travel

One of the strongest AiTM indicators.

Example pattern:

Example KQL

SigninLogs
| summarize locations = makeset(Location) by UserPrincipalName, bin(TimeGenerated, 10m)
| where array_length(locations) > 1


3. 🚩 Token Reuse from Unknown Devices

Attackers replay stolen session cookies from:

Look for:


4. 🚩 Suspicious OAuth Activity After Login

Registering malicious OAuth apps (like OfficeHome)

Requesting high-privilege permissions


Why Defender XDR Correlation Matters

High-confidence AiTM detections come from signal correlation, not single alerts:

  1. Phishing email (Defender for Office 365)

  2. MFA success (Entra ID)

  3. Impossible travel or token abuse (Defender for Cloud Apps)

  4. Follow-up activity (Defender XDR)

Individually, these signals may look benign. Together, they tell the full story.


SOC Team Takeaway

AiTM detection isn’t about failed logins.

It’s about:


If your detection logic stops at:

“MFA passed”

You’re already late.

Final Thoughts

MFA is essential — but no longer sufficient on its own.

To defend against AiTM:

Use phishing-resistant MFA:

FIDO2
FIDO2