-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAzureLock.kql
More file actions
9 lines (9 loc) · 843 Bytes
/
Copy pathAzureLock.kql
File metadata and controls
9 lines (9 loc) · 843 Bytes
1
2
3
4
5
6
7
8
9
// This can be used as a Custom Detection Rule in Defender to detect Azure Lock activity and alert off of that. It also excludes Azure Backup Service because a lock is applied when Azure Backup for Azure File Shares is configured
AzureActivity
| where OperationNameValue in ("MICROSOFT.AUTHORIZATION/LOCKS/WRITE", "MICROSOFT.AUTHORIZATION/LOCKS/DELETE")
| where ActivityStatusValue == "Success"
| where not(Properties has "AzureBackupProtectionLock") // Exclusion Filter: Stops Azure Backup Service from triggering the rule
| extend Properties_entity = parse_json(Properties)["entity"]
| extend Properties_message = parse_json(Properties)["message"]
| extend Properties_resource = parse_json(Properties)["resource"]
| project TimeGenerated,OperationNameValue,Caller,ActivityStatusValue,Properties_message,Properties_resource,Properties_entity