Top 10 Targeted Users (Malware+Phish+Spam)
Description
Identifies the top 10 users receiving inbound emails classified as malware, phishing, or spam. Based on concepts from the Defender for Office 365 solution in Sentinel: https://techcommunity.microsoft.com/blog/microsoftdefenderforoffice365blog/part-2-build-custom-email-security-reports-and-dashboards-with-workbooks-in-micr/4411303
Query · kql
EmailEvents
| where EmailDirection == "Inbound"
// Exclude phishing-simulation and SecOps mailbox traffic so they do not skew the ranking
| where OrgLevelPolicy != "Phishing simulation" and OrgLevelPolicy != "SecOps Mailbox"
| where ThreatTypes has_any ("Malware", "Phish", "Spam")
// De-duplicate each delivery (NetworkMessageId + recipient) before counting so re-scanned messages are counted once
| extend Key = strcat(NetworkMessageId, '-', RecipientEmailAddress)
| summarize arg_max(Timestamp, *) by Key
| summarize count() by RecipientEmailAddress
| top 10 by count_
| render piechart