← Back to SOC feed Coverage →

Top 10 External Senders (Malware)

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-10T11:00:00Z · Confidence: medium

Hunt Hypothesis

Adversaries may use external sender addresses to deliver malware via phishing emails, leveraging compromised or spoofed domains to bypass initial email security controls. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential malware distribution channels and prevent lateral movement or data exfiltration.

KQL Query

EmailEvents
| where EmailDirection == "Inbound"
| where ThreatTypes has "Malware"
//| where SenderFromAddress !contains ".yourdomain.com"
| summarize count() by SenderFromAddress
| sort by count_ desc
| top 10 by count_
| render piechart

Analytic Rule Definition

id: 530ef5e4-7ee4-4d70-a8e2-a06459605c02
name: 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
requiredDataConnectors:
  - connectorId: MicrosoftThreatProtection
    dataTypes:
      - EmailEvents
tactics:
  - InitialAccess
relevantTechniques:
  - T1566
query: |
  EmailEvents
  | where EmailDirection == "Inbound"
  | where ThreatTypes has "Malware"
  //| where SenderFromAddress !contains ".yourdomain.com"
  | summarize count() by SenderFromAddress
  | sort by count_ desc
  | top 10 by count_
  | render piechart
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/General/Top 10 External Senders (Malware).yaml