← Back to SOC feed Coverage →

Spoof attempts with auth failure

kql MEDIUM Azure-Sentinel
T1566
EmailEvents
huntingmicrosoftofficial
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at Azure-Sentinel →
Retrieved: 2026-05-09T23:00:01Z · Confidence: medium

Hunt Hypothesis

Adversaries may be attempting to spoof user identities on the domain through failed authentication attempts to evade detection. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential credential stuffing or account takeover efforts early.

KQL Query

EmailEvents 
| where Timestamp > ago (1d) and DetectionMethods contains "spoof"  
| project Timestamp, AR=parse_json(AuthenticationDetails) , NetworkMessageId, EmailDirection, Subject, SenderFromAddress, SenderIPv4,ThreatTypes, DetectionMethods, ThreatNames  
| evaluate bag_unpack(AR)  
| where SPF == "fail" or DMARC == "fail" or DKIM == "fail" or CompAuth == "fail"

Analytic Rule Definition

id: 5971f2e7-1bb2-4170-aa7a-577ed8a45c72
name: Spoof attempts with auth failure
description: |
  This query helps in checking for spoofing attempts on the domain with Authentication failures
description-detailed: |
  This query helps in checking for spoofing attempts on the domain with Authentication failures.
  Reference - https://learn.microsoft.com/en-us/defender-office-365/anti-phishing-protection-spoofing-about
requiredDataConnectors:
  - connectorId: MicrosoftThreatProtection
    dataTypes:
      - EmailEvents
tactics:
  - InitialAccess
relevantTechniques:
  - T1566
query: |
  EmailEvents 
  | where Timestamp > ago (1d) and DetectionMethods contains "spoof"  
  | project Timestamp, AR=parse_json(AuthenticationDetails) , NetworkMessageId, EmailDirection, Subject, SenderFromAddress, SenderIPv4,ThreatTypes, DetectionMethods, ThreatNames  
  | evaluate bag_unpack(AR)  
  | where SPF == "fail" or DMARC == "fail" or DKIM == "fail" or CompAuth == "fail"
version: 1.0.0

Required Data Sources

Sentinel TableNotes
EmailEventsEnsure this data connector is enabled

MITRE ATT&CK Context

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/Microsoft 365 Defender/Email and Collaboration Queries/Authentication/Spoof attempts with auth failure.yaml