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
Raw source Top 10 Targeted Users (Malware+Phish+Spam) · KQL
Esc
Published by Azure/Azure-Sentinel ↗, licensed under MIT ↗. Reproduced here unmodified.
id: b8330f6e-fc47-40ce-b225-5d3b055c6446
name: 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
requiredDataConnectors:
  - connectorId: MicrosoftThreatProtection
    dataTypes:
      - EmailEvents
tactics:
  - InitialAccess
relevantTechniques:
  - T1566
query: |
  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
version: 1.1.0

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.