THREAT-EntraID-TokenTheft Sumo Logic CSE · Sumo

Detect Microsoft Entra ID Session Token Theft and Replay in Sumo Logic CSE

Session token theft (also called token replay or pass-the-cookie) is one of the most prevalent identity attacks targeting Microsoft 365 and Entra ID in 2025-2026. Adversaries use adversary-in-the-middle (AiTM) proxy frameworks (Evilginx2, Modlishka, Muraena, Tycoon 2FA, EvilProxy) to intercept valid session cookies from M365 sign-in flows, then replay those cookies to authenticate as the victim without needing their credentials or MFA code. The attack works because Microsoft's authentication cookies are bound to the browser session but not to the originating IP — replaying the cookie from a different IP is detected by Entra ID's risk engine but is not blocked by default. Scattered Spider and Storm-0539 are documented using this technique at scale against SMBs and mid-market organisations, primarily targeting financial fraud (payment diversion, payroll fraud) and IT admin compromise to then facilitate SIM swapping.

MITRE ATT&CK

Tactic
Credential Access Defense Evasion

Sumo Detection Query

Sumo Logic CSE (Sumo)
sql
_sourceCategory=azure/aad/signin
| json field=_raw "properties.status.errorCode" as error_code
| json field=_raw "properties.userPrincipalName" as user
| json field=_raw "properties.ipAddress" as ip
| json field=_raw "properties.location" as location
| json field=_raw "properties.authenticationDetails" as auth_details
| where error_code = "0"
| where !isNull(user) and user != ""
| where !isNull(ip) and ip != ""
| eval mfa_used = if(matches(auth_details, "(?i)(MFA|Passwordless|FIDO)"), "true", "false")
| sort by user, _messageTime
| backshift field=ip as prev_ip by user
| backshift field=location as prev_location by user
| backshift field=_messageTime as prev_time by user
| backshift field=mfa_used as prev_mfa by user
| where !isNull(prev_ip)
| eval time_diff_minutes = (_messageTime - prev_time) / 60000
| eval impossible_travel = if(ip != prev_ip and location != prev_location and time_diff_minutes > 0 and time_diff_minutes < 60, "true", "false")
| eval token_replay = if(mfa_used = "false" and prev_mfa = "true" and ip != prev_ip, "POSSIBLE_TOKEN_REPLAY", "NORMAL")
| where impossible_travel = "true" or token_replay = "POSSIBLE_TOKEN_REPLAY"
| eval threat_type = if(impossible_travel = "true", "ImpossibleTravel_TokenReplay", "NoMFA_NewIP_TokenReplay")
| fields _messageTime, user, ip, location, prev_ip, prev_location, time_diff_minutes, impossible_travel, token_replay, mfa_used, prev_mfa, threat_type
| sort by -_messageTime
high severity medium confidence

Detects Entra ID session token theft (AiTM) in Sumo Logic by parsing Azure AD sign-in JSON logs, then flagging impossible travel (same user, different geo IPs within 60 min) and MFA-downgrade events (prior MFA session followed by no-MFA sign-in from a new IP). Targets Scattered Spider, Storm-0539, and Midnight Blizzard TTPs.

Data Sources

Microsoft Entra ID Sign-In Logs via Azure Event Hub or Blob Storage to Sumo Logic

Required Tables

_sourceCategory=azure/aad/signin

False Positives & Tuning

  • VPN endpoints that rotate exit IPs causing apparent location changes
  • Users accessing M365 via corporate proxy then switching to mobile data
  • Conditional Access policies granting MFA exemptions for compliant/hybrid-joined devices
  • Federated identity providers that satisfy MFA upstream and do not report it in Entra ID auth details
  • Shared service accounts used from multiple geographic locations by a distributed team

Other platforms for THREAT-EntraID-TokenTheft


Testing Methodology

Validate this detection against 1 adversary technique from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Session Cookie Replay using Evilginx2 Captured Cookie

    Expected signal: Azure AD Sign-in logs record a session established from the test IP without MFA, using the replayed cookie. Entra ID Identity Protection may generate an 'Unfamiliar sign-in properties' risk event.

Unlock Pro Content

Get the full detection package for THREAT-EntraID-TokenTheft including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections