← Back to SOC feed Coverage →

detect-archive-exfiltration-to-competitor

kql MEDIUM Azure-Sentinel
DeviceFileEventsEmailAttachmentInfoEmailEvents
backdoorhuntingmicrosoftofficial
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-21T11:00:00Z · Confidence: medium

Hunt Hypothesis

A malicious insider may be exfiltrating sensitive data by creating and emailing compressed archives to a competitor. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential data breaches and insider threats early.

KQL Query

EmailEvents
| where RecipientEmailAddress contains "competitor"
and AttachmentCount >=1
| join (
EmailAttachmentInfo
//| where isnotempty(SHA256)
)on NetworkMessageId
| join (
DeviceFileEvents
| where InitiatingProcessFileName in ("7z.exe", "7zG.exe", "AxCrypt.exe", "BitLocker.exe", "Diskcryptor.exe", "GNUPrivacyGuard.exe", "GPG4Win.exe", "PeaZip.exe", "VeraCrypt.exe", "WinRAR.exe", "WinZip.exe")
| project FileName, SHA256
) on FileName

Analytic Rule Definition

id: 8baad907-3b15-4f26-be09-dbba3d32fc3f
name: detect-archive-exfiltration-to-competitor
description: |
  This query can be used to detect instances of a malicious insider creating a file archive and then emailing that archive to an external "competitor" organization.
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - EmailEvents
  - EmailAttachmentInfo
  - DeviceFileEvents
tactics:
- Exfiltration
query: |
  EmailEvents
  | where RecipientEmailAddress contains "competitor"
  and AttachmentCount >=1
  | join (
  EmailAttachmentInfo
  //| where isnotempty(SHA256)
  )on NetworkMessageId
  | join (
  DeviceFileEvents
  | where InitiatingProcessFileName in ("7z.exe", "7zG.exe", "AxCrypt.exe", "BitLocker.exe", "Diskcryptor.exe", "GNUPrivacyGuard.exe", "GPG4Win.exe", "PeaZip.exe", "VeraCrypt.exe", "WinRAR.exe", "WinZip.exe")
  | project FileName, SHA256
  ) on FileName

Required Data Sources

Sentinel TableNotes
DeviceFileEventsEnsure this data connector is enabled
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/Exfiltration/detect-archive-exfiltration-to-competitor.yaml