← Back to SOC feed Coverage →

Top External Sender domains - Spam

kql MEDIUM Azure-Sentinel
T1566
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-12T23:00:00Z · Confidence: medium

Hunt Hypothesis

Adversaries may use compromised external domains to send spam messages via Microsoft Teams as part of phishing campaigns. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify and mitigate potential spear-phishing attempts and reduce the risk of credential compromise.

KQL Query

//Top External Sender domains sending Teams message with Spam threats
MessageEvents
| where IsExternalThread==1 and IsOwnedThread==0
| where ThreatTypes contains "Spam"
| extend SenderDomain = tostring(split(SenderEmailAddress, "@")[1])
| summarize count() by SenderDomain

Analytic Rule Definition

id: 96ea02b2-7db7-4206-bd7f-c3c579d33fcc
name: Top External Sender domains - Spam
description: |
  Top External Sender domains sending Teams message with Spam threats
description-detailed: |
  This query helps hunt for Top External Sender domains sending Teams message with Spam threats, using Microsoft Defender for Office 365 and Advance hunting in Microsoft Defender XDR
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - MessageEvents
tactics:
  - InitialAccess
relevantTechniques:
  - T1566
query: |
  //Top External Sender domains sending Teams message with Spam threats
  MessageEvents
  | where IsExternalThread==1 and IsOwnedThread==0
  | where ThreatTypes contains "Spam"
  | extend SenderDomain = tostring(split(SenderEmailAddress, "@")[1])
  | summarize count() by SenderDomain
version: 1.0.0

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/Microsoft Teams protection/Top External Sender domains - Spam.yaml