Query Details
// Attacker in the Middle Precision Detection //** A premium detection requiring Entra P2 license ** // Beginning in July 2024, the ‘Attacker in the Middle’ detection is now generally available in Identity Protection. By combining this offline detection with ‘Anomalous Token’ detection, it provides high-precision detection when a malicious actor attempts to replay a token. AAD Identity Protection will raise a security alert under ‘Anomalous Token’ with the ‘attackerInTheMiddle’ risk event type, ensuring reliable detection. let AnomalousTokenRequestId= SecurityAlert | where AlertName == "Anomalous Token" | mv-expand todynamic(Entities) | project Entities | extend RequestId = tostring(Entities.RequestId) | distinct RequestId; AADUserRiskEvents | where RequestId has_any(AnomalousTokenRequestId) | where RiskEventType == "attackerinTheMiddle" // #Sentinel #AiTM #AnomalousToken #IdentityProtection #Entra #PremiumDetection
This query is designed to detect a specific type of security threat known as "Attacker in the Middle" (AiTM) within Microsoft Entra Identity Protection. Here's a simplified breakdown:
Context:
Process:
RequestId from these alerts.RequestIds and have the risk event type "attackerinTheMiddle".Outcome:
In summary, this query helps in identifying and raising alerts for sophisticated token replay attacks by combining different detection methods within Microsoft Entra Identity Protection.

Steven Lim
Released: August 7, 2024
Tables
Keywords
Operators