← Back to SOC feed Coverage →

Email containing malware sent by an internal sender

kql MEDIUM Azure-Sentinel
T1534
EmailAttachmentInfoEmailEvents
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-11T11:00:00Z · Confidence: medium

Hunt Hypothesis

Internal users may send emails with malicious attachments to external recipients, leveraging their trusted status to bypass email security controls. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential insider threats and prevent lateral movement or data exfiltration.

KQL Query

EmailEvents
| where EmailDirection == "Intra-org" or EmailDirection == "Outbound"
| where ThreatTypes == "Malware" and SenderFromAddress !startswith "postmaster@" and SenderFromAddress !startswith "microsoftexchange"
| join (EmailAttachmentInfo | where isnotempty(ThreatTypes)) on NetworkMessageId

Analytic Rule Definition

id: 07c85687-6dee-4266-9345-1e34de85d989
name: Email containing malware sent by an internal sender
description: |
  In this query, we are looking for emails containing malware attachment sent by an internal sender
description-detailed: |
  In this query, we are looking for emails containing malware attachment sent by an internal sender using Defender for Office 365 data
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
   - EmailEvents
tactics:
  - LateralMovement
relevantTechniques:
  - T1534
query: |
  EmailEvents
  | where EmailDirection == "Intra-org" or EmailDirection == "Outbound"
  | where ThreatTypes == "Malware" and SenderFromAddress !startswith "postmaster@" and SenderFromAddress !startswith "microsoftexchange"
  | join (EmailAttachmentInfo | where isnotempty(ThreatTypes)) on NetworkMessageId
version: 1.0.0

Required Data Sources

Sentinel TableNotes
EmailAttachmentInfoEnsure this data connector is enabled
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/Malware/Email containing malware sent by an internal sender.yaml