← Back to SOC feed Coverage →

Unusual Anomaly

kql MEDIUM Azure-Sentinel
backdoormicrosoftofficial
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-03-25T03:06:09Z · Confidence: medium

Hunt Hypothesis

The hypothesis is that the detection rule identifies unusual activity patterns in Azure Sentinel that may indicate adversarial behavior such as data exfiltration or lateral movement. SOC teams should proactively hunt for these anomalies to uncover potential threats that traditional detection methods may have missed.

KQL Query

// You can leave out Anomalies that are already monitored through other Analytics Rules
//let _MonitoredRules = dynamic(["TestAlertName"]);
let query_frequency = 1h;
let query_lookback = 3d;
Anomalies
| where TimeGenerated > ago(query_frequency)
//| where not(RuleName has_any (_MonitoredRules))
| join kind = leftanti (
    Anomalies
    | where TimeGenerated between (ago(query_frequency + query_lookback)..ago(query_frequency))
    | distinct RuleName
) on RuleName
| extend Name = tostring(split(UserPrincipalName, "@")[0]), UPNSuffix = tostring(split(UserPrincipalName, "@")[1])

Analytic Rule Definition

id: d0255b5f-2a3c-4112-8744-e6757af3283a
name: Unusual Anomaly
description: |
  'Anomaly Rules generate events in the Anomalies table. This scheduled rule tries to detect Anomalies that are not usual, they could be a type of Anomaly that has recently been activated, or an infrequent type. The detected Anomaly should be reviewed, if it is relevant enough, eventually a separate scheduled Analytics Rule could be created specifically for that Anomaly Type, so an alert and/or incident is generated everytime that type of Anomaly happens.'
severity: Medium
requiredDataConnectors: []
queryFrequency: 1h
queryPeriod: 4d
triggerOperator: gt
triggerThreshold: 0
tactics: []
techniques: []
query: |
  // You can leave out Anomalies that are already monitored through other Analytics Rules
  //let _MonitoredRules = dynamic(["TestAlertName"]);
  let query_frequency = 1h;
  let query_lookback = 3d;
  Anomalies
  | where TimeGenerated > ago(query_frequency)
  //| where not(RuleName has_any (_MonitoredRules))
  | join kind = leftanti (
      Anomalies
      | where TimeGenerated between (ago(query_frequency + query_lookback)..ago(query_frequency))
      | distinct RuleName
  ) on RuleName
  | extend Name = tostring(split(UserPrincipalName, "@")[0]), UPNSuffix = tostring(split(UserPrincipalName, "@")[1])
entityMappings:
  - entityType: Account
    fieldMappings:
      - identifier: FullName
        columnName: UserPrincipalName
      - identifier: Name
        columnName: Name
      - identifier: UPNSuffix
        columnName: UPNSuffix
eventGroupingSettings:
  aggregationKind: AlertPerResult
alertDetailsOverride:
  alertDisplayNameFormat: Unusual Anomaly - {{RuleName}}
  alertTacticsColumnName: Tactics
  alertDynamicProperties:
    - alertProperty: Techniques
      value: Techniques
version: 1.0.3
kind: Scheduled

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Detections/Anomalies/UnusualAnomaly.yaml