Top 10 External Senders (Malware)
Description
Identifies the top 10 external sender addresses delivering inbound emails classified as malware. If you want to exclude your own organization's domains (including subdomains), add a filter after the malware filter, e.g.: | where SenderFromAddress !contains ".yourdomain.com" (Replace "yourdomain.com" with your actual domain.) Based on Defender for Office 365 workbook: 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 "Malware" //| where SenderFromAddress !contains ".yourdomain.com" // 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 SenderFromAddress | sort by count_ desc | top 10 by count_ | render piechart