In March 2026, a mid-sized logistics firm lost access to its entire M365 tenant after an attacker used an adversary-in-the-middle (AiTM) phishing kit to steal session tokens — bypassing MFA entirely. The technique isn’t new: it’s the same pattern documented in Storm-1167 campaigns tracked by Microsoft. What’s new is how fast and cheap it’s become to run this attack at scale. Here’s what it actually looks like, and how defenders can catch it.
Stage 1: AiTM Phishing with Evilginx3
Evilginx3 is an open-source reverse-proxy phishing framework. It sits between the victim and the real Microsoft login page, forwarding credentials and session cookies in real time — so MFA prompts get completed by the victim, and the attacker captures the authenticated session token.
An attacker sets up a phishlet targeting Microsoft 365 on a VPS at 192.0.2.47, using the domain login-microsoftonline-secure.com. After the victim clicks the link and logs in, Evilginx captures this in its console:
[09:14:32] [inf] [session: a3f9c] Phishlet: o365
[09:14:32] [inf] Username: j.harris@acmecorp.io
[09:14:32] [inf] Password: W!nter2026#
[09:14:33] [inf] Tokens captured:
cookie: ESTSAUTH=eyJ0eXAiOiJKV1QiLCJhbGciO...[truncated]
cookie: ESTSAUTHPERSISTENT=eyJ0eXAiOiJKV1Q...[truncated]
[09:14:33] [inf] [session: a3f9c] All tokens saved.
The ESTSAUTH cookie is a post-authentication session token issued by Azure AD. It doesn’t matter that the victim completed an MFA push — the attacker now holds the authenticated session. They import this cookie into a browser using a tool like Cookie Editor, navigate to office.com, and they’re in. No password needed from this point forward.
The attacker’s immediate next move: enumerate the mailbox for password reset emails, forwarding rules, and financial approval chains. They look for SharePoint links, Teams messages with credentials, and any HR portals that trust M365 SSO. This takes under five minutes.
Stage 2: Post-Compromise Recon with AADInternals
AADInternals is a PowerShell toolkit for Azure AD research and red teaming. With a stolen access token, an attacker can pull tenant configuration, user lists, and conditional access policies — all over legitimate Microsoft Graph API calls that blend into normal traffic.
Using the harvested token for j.harris@acmecorp.io, the attacker runs:
Import-Module AADInternals
$token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1Ni...[truncated]"
Get-AADIntUsers -AccessToken $token | Select-Object UserPrincipalName, DisplayName, IsAdmin
# Output:
UserPrincipalName DisplayName IsAdmin
----------------- ----------- -------
j.harris@acmecorp.io Jamie Harris False
a.patel@acmecorp.io Arjun Patel True
m.chen@acmecorp.io Ming Chen True
svc-sharepoint@acmecorp.io SPO Service Acct False
Get-AADIntConditionalAccessPolicies -AccessToken $token
# Output:
DisplayName State Conditions
----------- ----- ----------
Require MFA for Admins enabled users: a.patel, m.chen
Block Legacy Auth enabled all users
MFA for Risky Sign-ins enabled all users
This output tells the attacker two critical things. First, only admins a.patel and m.chen are under strict MFA policy — regular users like j.harris have weaker controls. Second, legacy authentication is blocked, so password spray won’t work. But the conditional access policy for risky sign-ins uses sign-in risk, not token risk — meaning a replayed token from a trusted IP won’t trigger it.
The attacker’s pivot: target a.patel with a spear-phish using context stolen from Harris’s mailbox. An email referencing a real internal project lands with far higher credibility. One admin compromise gives full tenant control.
How Defenders Catch This
Token theft leaves fingerprints if you know where to look. In Microsoft Entra ID (formerly Azure AD) sign-in logs, AiTM sessions show a characteristic pattern: the token is used from an IP that never appeared during the authentication event itself.
Run this KQL query in Microsoft Sentinel or the Entra sign-in log workbook:
SigninLogs
| where TimeGenerated > ago(24h)
| where ResultType == 0
| extend TokenIssuerType = tostring(AuthenticationDetails[0].authenticationMethod)
| summarize AuthIP = make_set(IPAddress), SessionCount = count()
by UserPrincipalName, CorrelationId, AppDisplayName
| where array_length(AuthIP) > 1
| project UserPrincipalName, AppDisplayName, AuthIP, SessionCount
# Example output:
UserPrincipalName AppDisplayName AuthIP SessionCount
----------------- -------------- ------ ------------
j.harris@acmecorp.io Office 365 ["192.0.2.47", "192.0.2.9"] 4
A single correlation ID showing two different IPs means the session was used from a location that didn’t authenticate it. 192.0.2.47 is the phishing proxy; 192.0.2.9 is Harris’s real machine. That’s your AiTM indicator. Alert on it, revoke the session immediately with Revoke-MgUserSignInSession, and pull the full token issuance log for the CorrelationId.
What To Do Now
Open your Microsoft Entra admin center right now and enable token protection for Conditional Access (currently in GA for desktop sign-ins). This cryptographically binds the session token to the device it was issued on — a stolen ESTSAUTH cookie replayed from a different machine will be rejected, even if MFA was completed. Navigate to Protection > Conditional Access > New Policy, set the session control to Require token protection, and scope it to your highest-risk users first. It takes fifteen minutes to configure and closes the exact gap that AiTM phishing exploits.
