← Back to SOC feed Coverage →

New External Sender Domains Carrying Threats

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-09-03T23:00:00Z · Confidence: medium

Hunt Hypothesis

This hypothesis targets adversaries leveraging phishing (T1566) by introducing new external sender domains that immediately carry malicious payloads, a tactic often used to bypass established allowlists or reputation checks. Proactively hunting for these first-seen domains in Azure Sentinel allows the SOC team to identify potential supply chain or spoofing attacks early, before they propagate across the organization and lead to credential theft or malware execution.

KQL Query

// TIP: to hide your own accepted domains, uncomment the ExcludeDomains line and the matching where-clause.
// let ExcludeDomains = dynamic(["contoso.com", "fabrikam.com"]);
EmailEvents
| where Timestamp > ago(30d)
| where EmailDirection == "Inbound" and isnotempty(SenderFromAddress)
| extend Key = strcat(NetworkMessageId, '-', RecipientEmailAddress)
| summarize arg_max(Timestamp, *) by Key
| extend SenderDomain = tostring(split(SenderFromAddress, '@')[1])
// | where SenderDomain !in~ (ExcludeDomains)
| summarize FirstSeen = min(Timestamp), LastSeen = max(Timestamp), Messages = count(), Senders = dcount(SenderFromAddress), Recipients = dcount(RecipientEmailAddress), ThreatMessages = countif(isnotempty(ThreatTypes)) by SenderDomain
| where ThreatMessages > 0
| top 20 by FirstSeen desc
| project SenderDomain, FirstSeen, Messages, Senders, Recipients, ThreatMessages, LastSeen

Analytic Rule Definition

id: 12f223d9-ff72-4a6d-b60b-c59eacfaa89e
name: New External Sender Domains Carrying Threats
description: |
  This query lists external sender domains seen for the first time in the period that already carried threats, using the EmailEvents table.
description-detailed: |
  A brand-new sender domain that already arrives carrying threats is a strong early-warning signal for phishing and business email compromise (BEC). This query lists inbound external sender domains ordered by when they were first seen in the period, keeping only those that carried at least one threat, with message, sender, recipient and threat counts. Treat brand-new domains sending threats as high-priority review.
  This query is part of the Microsoft Defender for Office 365 Detections and Insights workbook in Microsoft Sentinel: https://techcommunity.microsoft.com/blog/microsoftdefenderforoffice365blog/part-3-build-custom-email-security-reports-with-power-bi-and-workbooks-in-micros/4490127
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - EmailEvents
tactics:
  - InitialAccess
relevantTechniques:
  - T1566
query: |
  // TIP: to hide your own accepted domains, uncomment the ExcludeDomains line and the matching where-clause.
  // let ExcludeDomains = dynamic(["contoso.com", "fabrikam.com"]);
  EmailEvents
  | where Timestamp > ago(30d)
  | where EmailDirection == "Inbound" and isnotempty(SenderFromAddress)
  | extend Key = strcat(NetworkMessageId, '-', RecipientEmailAddress)
  | summarize arg_max(Timestamp, *) by Key
  | extend SenderDomain = tostring(split(SenderFromAddress, '@')[1])
  // | where SenderDomain !in~ (ExcludeDomains)
  | summarize FirstSeen = min(Timestamp), LastSeen = max(Timestamp), Messages = count(), Senders = dcount(SenderFromAddress), Recipients = dcount(RecipientEmailAddress), ThreatMessages = countif(isnotempty(ThreatTypes)) by SenderDomain
  | where ThreatMessages > 0
  | top 20 by FirstSeen desc
  | project SenderDomain, FirstSeen, Messages, Senders, Recipients, ThreatMessages, LastSeen
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/Mailflow/New External Sender Domains Carrying Threats.yaml