12.5 Sign-In Log Investigation
Sign-In Log Investigation
The email analysis (11.4) identified users who clicked the phishing URL. This subsection determines whether their credentials were compromised: did the AiTM proxy capture the session token? The answer is in the sign-in logs.
Required role: Microsoft Sentinel Reader or Global Reader for sign-in log queries.
Step 1: Examine the initial compromised user’s sign-in timeline
Start with j.morrison — the user from the original alert.
| |
What to look for in the results — the AiTM signature:
Two sign-ins in rapid succession from different IPs. The legitimate sign-in (from the user’s device, through the AiTM proxy) appears first. Within seconds to minutes, a second sign-in from a different IP (the attacker’s infrastructure) appears. Both show MFA satisfied. This is the token replay.
In the Northgate Engineering scenario:
- 08:52 — Sign-in from 192.0.2.10 (user’s office IP), MFA satisfied, result 0. This is the user authenticating through the AiTM proxy. The proxy forwarded the auth to Microsoft, Microsoft saw the request as coming from the user’s IP.
- 08:54 — Sign-in from 203.0.113.47 (attacker IP), no MFA challenge, result 0, AuthenticationRequirement = “singleFactorAuthentication”. This is the token replay. The attacker used the captured session token — no MFA needed because the token already passed MFA.
The key differentiator: The second sign-in shows AuthenticationRequirement = "singleFactorAuthentication" or shows no MFA details despite the tenant requiring MFA. This is because the attacker is replaying a session token — the identity provider does not re-evaluate MFA for a valid token.
Step 2: Check non-interactive sign-ins for token replay
Interactive sign-ins show the initial token replay. Non-interactive sign-ins show ongoing use of the stolen token for API access (Graph API, EWS, PowerShell).
| |
What to look for: A series of non-interactive sign-ins from the attacker IP (203.0.113.47) accessing various M365 services — Outlook, SharePoint, Graph API. Each sign-in uses the stolen refresh token to obtain new access tokens for different resources. The UserAgent may differ from the user’s normal browser — attackers often use scripts or API tools that present a different user agent string.
Step 3: Identify all sign-ins from the attacker IP
The attacker IP may have been used to access other compromised accounts — not just j.morrison.
| |
Expected result: At this stage of the investigation (Wave 1), this may show only j.morrison. As the investigation expands (Waves 2-5), additional compromised accounts will appear from this IP or from different attacker IPs.
Investigation decision point: If this query returns multiple users from the same attacker IP, you have confirmed a campaign — not an isolated compromise. Escalate: notify management, consider org-wide password reset, and start the campaign tracking process (subsection 12.9).
Step 4: Confirm AiTM by correlating click time with sign-in time
The definitive AiTM confirmation: a phishing URL click followed by a sign-in from a different IP within minutes.
| |
This is the core AiTM detection query. A gap of 1-5 minutes between URL click and sign-in from a new IP is the AiTM pattern. The user clicked the phishing URL, entered credentials on the proxy, the proxy captured the token, and the attacker replayed it within minutes.
Verify: Each result row represents a confirmed or highly probable compromise. Create a bookmark for each row. Tag: INC-2026-0227-001, signin-investigation, confirmed-compromise.
Step 5: Check for attacker IP infrastructure
Determine whether 203.0.113.47 is a known hosting provider, VPN, or residential proxy.
| |
Operational context: AiTM campaigns typically use VPS infrastructure (DigitalOcean, Vultr, OVH) or residential proxy networks. If the ASN belongs to a cloud hosting provider, this strongly confirms attacker infrastructure — legitimate users do not sign in from cloud hosting IPs. If the ASN belongs to a residential ISP, the attacker is using a residential proxy to evade IP-based detection — more sophisticated.
Subsection artifact: The five sign-in investigation queries above. These form the sign-in analysis section of your AiTM investigation playbook. The AiTM correlation query (Step 4) is also the basis for the AiTM detection analytics rule you will build in subsection 12.13.
Knowledge check
Check your understanding
1. You see two successful sign-ins for the same user within 2 minutes: one from IP 192.0.2.10 (known office IP) and one from IP 203.0.113.47 (unknown). Both show MFA satisfied. What is the most likely explanation?
2. The AADNonInteractiveUserSignInLogs shows the attacker IP accessing Outlook, SharePoint, and Graph API over a 3-hour period. What does this tell you?