Affected rows stateful anomaly on database - hunting query
Goal: To detect anomalous data change/deletion. This query detects SQL queries that changed/deleted a large number of rows, which is significantly higher than normal for this database. This is a hunting query, so the…
Description
Goal: To detect anomalous data change/deletion. This query detects SQL queries that changed/deleted a large number of rows, which is significantly higher than normal for this database. This is a hunting query, so the training and the detection occur on the whole time window (controlled by 'queryPeriod' parameter). The user can set the minimal threshold for anomaly by changing the threshold parameters volThresholdZ and volThresholdQ (higher threshold will detect only more severe anomalies).
Detection logic
Detection requirements
- Platform
- ContainersESXiIaaSLinuxmacOSWindows
The rule states no platform. This is derived from the 3 ATT&CK techniques it maps to.
- Log source product
- azuresql
- Log source service
- azurediagnostics
MITRE ATT&CK mappings
0 exclusive techniques.This is coverage no other published rule has; it is not this rule's total technique count.
No references are available for this detection.
From the source
- At source
- Open at source
- Upstream identifier
- 9670ac84-e035-47f5-8eb5-9d863a8a7893
- Tagged by the source as
- Impact
Licence
- Published under
- MIT LicenseRead the licence
- Attribution
- Required
- Obtained under
- MITRead the origin licence
Authorship
- Published
- Aug 29, 2026
- Version
- 1