← Back to SOC feed Coverage →

Quarantine Release Percentage

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 potential phishing or spearphishing campaigns (T1566) where attackers craft convincing messages that bypass initial automated filters, leading to a high rate of user-initiated releases from quarantine. Proactively hunting for this anomaly in Azure Sentinel helps identify targeted attacks or compromised user judgment that standard threshold alerts might miss, ensuring timely investigation of suspicious email traffic.

KQL Query

let Quarantine_Releases = toscalar(EmailPostDeliveryEvents
| where Timestamp > ago(30d)
| where Action == "Quarantine release"
| distinct NetworkMessageId, RecipientEmailAddress
| count);
let Quarantined_Mailflow = toscalar(EmailEvents
| where Timestamp > ago(30d)
| where DeliveryLocation == "Quarantine"
| distinct NetworkMessageId, RecipientEmailAddress
| count);
print
Quarantine_Releases = toreal(Quarantine_Releases),
Quarantined_Mailflow = toreal(Quarantined_Mailflow),
Release_Percentage = iff(Quarantined_Mailflow == 0, 0.0, round((toreal(Quarantine_Releases) / toreal(Quarantined_Mailflow)) * 100, 2))

Analytic Rule Definition

id: 5fb333a4-39bb-474b-ab37-9efdca8e9182
name: Quarantine Release Percentage
description: |
  This query calculates the percentage of quarantined emails that were subsequently released, out of the total quarantined.
description-detailed: |
  This query calculates the percentage of quarantined emails in Microsoft Defender for Office 365 that were subsequently released (EmailPostDeliveryEvents Action == "Quarantine release") out of the total quarantined (EmailEvents DeliveryLocation == "Quarantine"). The percentage is guarded against a zero denominator.
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - EmailEvents
  - EmailPostDeliveryEvents
tactics:
  - InitialAccess
relevantTechniques:
  - T1566
query: |
  let Quarantine_Releases = toscalar(EmailPostDeliveryEvents
  | where Timestamp > ago(30d)
  | where Action == "Quarantine release"
  | distinct NetworkMessageId, RecipientEmailAddress
  | count);
  let Quarantined_Mailflow = toscalar(EmailEvents
  | where Timestamp > ago(30d)
  | where DeliveryLocation == "Quarantine"
  | distinct NetworkMessageId, RecipientEmailAddress
  | count);
  print
  Quarantine_Releases = toreal(Quarantine_Releases),
  Quarantined_Mailflow = toreal(Quarantined_Mailflow),
  Release_Percentage = iff(Quarantined_Mailflow == 0, 0.0, round((toreal(Quarantine_Releases) / toreal(Quarantined_Mailflow)) * 100, 2))
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/Quarantine/Quarantine Release Percentage.yaml