← Back to SOC feed Coverage →

SecOps Mailbox Override Count

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

Hunt Hypothesis

This hypothesis targets adversaries who exploit overly permissive mail flow rules to bypass standard security gates and deliver phishing payloads or malicious attachments directly to the security operations team. Proactively hunting for this anomaly in Azure Sentinel is critical because a compromised SecOps mailbox grants attackers a trusted vantage point to pivot laterally, manipulate incident responses, or escalate privileges within the organization.

KQL Query

EmailEvents
| where Timestamp > ago(30d)
| extend Key = strcat(NetworkMessageId, "-", RecipientEmailAddress)
| summarize arg_max(Timestamp, *) by Key
| where OrgLevelPolicy == "SecOps Mailbox" and OrgLevelAction == "Allow"
| summarize ['SecOps Mailbox Deliveries'] = count()

Analytic Rule Definition

id: d4a0f7f4-1c9b-4c2f-9644-2c53cfd7af0f
name: SecOps Mailbox Override Count
description: |
  This query counts inbound emails delivered to the SecOps mailbox by an organisation-level allow override.
description-detailed: |
  This query counts inbound emails delivered to the SecOps mailbox in Microsoft Defender for Office 365 as a result of an organisation-level allow override (OrgLevelPolicy == "SecOps Mailbox" and OrgLevelAction == "Allow"), so the volume of deliberately-allowed SecOps deliveries can be isolated from other admin overrides. Messages are de-duplicated to the latest record per NetworkMessageId and recipient.
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - EmailEvents
tactics:
  - InitialAccess
relevantTechniques:
  - T1566
query: |
  EmailEvents
  | where Timestamp > ago(30d)
  | extend Key = strcat(NetworkMessageId, "-", RecipientEmailAddress)
  | summarize arg_max(Timestamp, *) by Key
  | where OrgLevelPolicy == "SecOps Mailbox" and OrgLevelAction == "Allow"
  | summarize ['SecOps Mailbox Deliveries'] = count()
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/Overrides/SecOps Mailbox Override Count.yaml