SpoofedDomain and EmailEvents: Detecting Spoofed Emails in Microsoft Defender
The email looked legitimate.
The sender name looked familiar. The message reached the mailbox. No one immediately panicked.
But inside Microsoft Defender, the evidence was already there.
SpoofedDomain. EmailEvents. AuthenticationDetails. DMARC failure signals.
This Agent Foskett briefing looks at how Microsoft Defender XDR and KQL can help uncover spoofed emails, sender mismatch, failed authentication and suspicious delivery behaviour that may not be obvious to the user.
The inbox may show a trusted name. The logs show what actually happened.
Briefing summary
SpoofedDomain and EmailEvents can expose email spoofing that users may never notice. GEMXIT looks at how Microsoft Defender XDR, AuthenticationDetails, DMARC results and KQL help investigate suspicious email authentication behaviour.
What happened
Why SpoofedDomain and EmailEvents matter
First hunt: find spoofed or mismatched sender domains
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
EmailEvents | where TimeGenerated > ago(7d) | where ThreatTypes has "Spoof" or SenderFromDomain != SenderMailFromDomain | project TimeGenerated, SenderFromAddress, SenderFromDomain, SenderMailFromDomain, RecipientEmailAddress, Subject, ThreatTypes, DeliveryAction, NetworkMessageId | order by TimeGenerated desc
Second hunt: investigate AuthenticationDetails and DMARC failures
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
EmailEvents | where TimeGenerated > ago(14d) | where AuthenticationDetails has "dmarc=fail" or AuthenticationDetails has "spf=fail" or AuthenticationDetails has "dkim=fail" | project TimeGenerated, SenderFromAddress, RecipientEmailAddress, Subject, AuthenticationDetails, ThreatTypes, DeliveryAction, NetworkMessageId | order by TimeGenerated desc
Third hunt: correlate suspicious email with URL clicks
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
EmailEvents | where TimeGenerated > ago(7d) | where ThreatTypes has "Spoof" or AuthenticationDetails has "dmarc=fail" | join kind=leftouter ( UrlClickEvents | project NetworkMessageId, ClickTime = TimeGenerated, AccountUpn, Url, ActionType ) on NetworkMessageId | project TimeGenerated, ClickTime, SenderFromAddress, RecipientEmailAddress, Subject, Url, ActionType, DeliveryAction | order by TimeGenerated desc
What this kind of activity can indicate
How GEMXIT approaches spoofed email investigations
Final thought
It is: “Did the sender identity actually make sense?”
Continue the investigation with Email Spoofing Detection Guide, EmailEvents KQL Guide, AuthenticationDetails Explained, DMARC Failed But Delivered, SenderFrom vs SenderMailFrom and The User Passed MFA But It Wasn't Really Them.
Develop IT. Protect IT. GEMXIT PTY LTD | GEMXIT UK LTD