Threat Overview
From an identity security perspective, brute force attacks have evolved beyond noisy and obvious failure patterns. Modern attackers operate patiently, rotate infrastructure, abuse legacy authentication flows, and attempt to blend into normal sign-in behavior to avoid detection.
Microsoft Entra ID provides rich authentication telemetry, but attackers often exploit monitoring gaps. Non-interactive sign-ins, SMTP authentication, and protocol-based access can bypass modern client protections. In many investigations, defenders only see suspicious behavior after access has already been obtained.
The highest-risk scenarios typically include:
- A password being entered correctly
- The sign-in originating from an unfamiliar or malicious IP address
- An account that was recently locked due to repeated failures
These conditions strongly indicate a brute force campaign that has moved from attempted access to potential compromise.
Detection Logic Explained
Intent
The detection logic is designed to:
- Identify authentication attempts where a correct password is used under suspicious conditions
- Detect early indicators of successful brute force activity before attackers exploit access
- Reduce reliance on alerts driven solely by failed sign-ins
Signal Selection
The detection leverages Entra ID sign-in telemetry from both interactive and non-interactive logs. It focuses on authentication events associated with risk indicators such as malicious IP classifications, account lockouts, and legacy authentication protocols. Recent activity is evaluated in the context of historical behavior.
Allow-List and Baseline Design
A historical baseline of IP addresses that successfully authenticated over the past 14 days is established. When a sign-in originates from an IP address not observed during that period, it is treated as higher risk if additional suspicious indicators are present.
This approach allows the detection to adapt naturally to normal user behavior while still highlighting meaningful anomalies.
Behavioral Rationale
Instead of alerting on every authentication failure, this logic looks for signs of success occurring in the wrong context, including:
- Correct passwords originating from malicious or unfamiliar infrastructure
- Successful authentication attempts against accounts already under attack or locked
- SMTP or legacy protocol access following repeated authentication failures
In practice, this behavior-focused approach produces higher-quality signals and improves analyst confidence during triage.
KQL Query Used
The query analyzes recent authentication activity and identifies several high-risk scenarios:
- Correct password usage from IPs flagged as malicious.
- Successful authentication attempts against locked accounts.
- Possible successful brute force attempts using SMTP or legacy authentication flows.
- All results are filtered to exclude IP addresses previously observed in successful sign-ins.
The output is a consolidated view of potentially compromised authentication events that warrant immediate investigation.


