Identify and Investigate Phishing Attacks with KQL
1. Basic Query to Detect Emails with Suspicious Attachments
EmailEvents
| where EmailDirection == "Inbound"
| where AttachmentCount > 0
| mv-expand Attachments
| where isnotempty(Attachments.FileName)
| where Attachments.FileName endswith ".exe"
or Attachments.FileName endswith ".scr"
or Attachments.FileName endswith ".vbs"
or Attachments.FileName endswith ".js"
or Attachments.FileName endswith ".bat"
| project TimeReceived, SenderFromAddress, RecipientEmailAddress, Subject, Attachments.FileName2. Detect Emails with Suspicious URLs
EmailEvents
| where EmailDirection == "Inbound"
| where UrlCount > 0
| mv-expand Urls
| where isnotempty(Urls.Url)
| where Urls.Url contains "phishingsite.com"
or Urls.Url contains "malicioussite.com"
| project TimeReceived, SenderFromAddress, RecipientEmailAddress, Subject, Urls.Url3. Detect Emails from External Senders with High-Risk Indicators
4. Detect Emails with Spoofed Display Names
5. Detect Emails with High Spam Confidence Level (SCL)
6. Detect Emails with Phishing Keywords in the Subject
7. Detect Emails with Mismatched Sender Domains
8. Detect Emails with High Volume Sent to Multiple Users
9. Detect Emails with Malware Detected
10. Detect Emails with Anomalous Sender Behavior
Notes:
PreviousDetect When Large Number of Files Downloaded From OneDrive or SharePointNextPowerShell for SecOps
Last updated