← Back to SOC feed Coverage →

Attacked more than x times average

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

Hunt Hypothesis

Users who have been attacked more than the average number of times may indicate targeted attacks or compromised accounts, as adversaries often reuse credentials or exploit known vulnerabilities to repeatedly compromise the same user. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential credential theft or persistent access attempts early.

KQL Query

let AverageThreatPerRecipient = toscalar(EmailEvents 
| where DetectionMethods != "" 
| summarize total=count() by RecipientEmailAddress 
| summarize avg(total)); 
EmailEvents 
| where DetectionMethods != "" 
| summarize total=count() by RecipientEmailAddress 
| where tolong(total) >= 1*AverageThreatPerRecipient // update "1"

Analytic Rule Definition

id: de480ca4-4095-4fef-b3e7-2a3f17f24e78
name: Attacked more than x times average
description: |
  This query helps reviewing count of users attacked more than x times average.
description-detailed: |
  This query helps reviewing count of users attacked more than x times average using Defender for Office 365 data. Update the value of x in the query to get desired results.
requiredDataConnectors:
  - connectorId: MicrosoftThreatProtection
    dataTypes:
      - EmailEvents
tactics:
  - InitialAccess
relevantTechniques:
  - T1566
query: |
  let AverageThreatPerRecipient = toscalar(EmailEvents 
  | where DetectionMethods != "" 
  | summarize total=count() by RecipientEmailAddress 
  | summarize avg(total)); 
  EmailEvents 
  | where DetectionMethods != "" 
  | summarize total=count() by RecipientEmailAddress 
  | where tolong(total) >= 1*AverageThreatPerRecipient // update "1"
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/Top Attacks/Attacked more than x times average.yaml