App Gateway WAF - Scanner Detection
| Id | 9b8dd8fd-f192-42eb-84f6-541920400a7a |
| Rulename | App Gateway WAF - Scanner Detection |
| Description | Identifies a match for a Scanner detection user agent based attack in the App Gateway WAF logs. The threshold value in the query can be changed as per your infrastructure’s requirements. References: https://owasp.org/www-community/Vulnerability_Scanning_Tools |
| Severity | High |
| Tactics | DefenseEvasion Execution InitialAccess Reconnaissance Discovery |
| Techniques | T1548 T1203 T1190 T1595 T1046 |
| Required data connectors | WAF |
| Kind | Scheduled |
| Query frequency | 6h |
| Query period | 6h |
| Trigger threshold | 0 |
| Trigger operator | gt |
| Source Uri | https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Azure Web Application Firewall (WAF)/Analytic Rules/App-GW-WAF-Scanner-detection.yaml |
| Version | 1.0.3 |
| Arm template | 9b8dd8fd-f192-42eb-84f6-541920400a7a.json |
let Threshold = 3;
AGWFirewallLogs
| where Action == "Matched"
| where Message contains "Found User-Agent associated with security scanner"
| project TransactionId, Hostname, RequestUri, TimeGenerated, ClientIp, Message, DetailedMessage, DetailedData
| join kind = inner(
AGWFirewallLogs
| where Action == "Blocked"
) on TransactionId
| extend Uri = strcat(Hostname,RequestUri)
| summarize StartTime = min(TimeGenerated), EndTime = max(TimeGenerated), TransactionID = make_set(TransactionId), Message = make_set(Message), Detail_Message = make_set(DetailedMessage), Detail_Data = make_set(DetailedData), Total_TransactionId = dcount(TransactionId) by ClientIp, Uri, Action
| where Total_TransactionId >= Threshold
description: |
'Identifies a match for a Scanner detection user agent based attack in the App Gateway WAF logs. The threshold value in the query can be changed as per your infrastructure's requirements.
References: https://owasp.org/www-community/Vulnerability_Scanning_Tools'
version: 1.0.3
triggerThreshold: 0
tactics:
- DefenseEvasion
- Execution
- InitialAccess
- Reconnaissance
- Discovery
queryPeriod: 6h
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Azure Web Application Firewall (WAF)/Analytic Rules/App-GW-WAF-Scanner-detection.yaml
triggerOperator: gt
status: Available
id: 9b8dd8fd-f192-42eb-84f6-541920400a7a
name: App Gateway WAF - Scanner Detection
queryFrequency: 6h
severity: High
kind: Scheduled
entityMappings:
- fieldMappings:
- columnName: Uri
identifier: Url
entityType: URL
- fieldMappings:
- columnName: ClientIp
identifier: Address
entityType: IP
relevantTechniques:
- T1548
- T1203
- T1190
- T1595
- T1046
query: |
let Threshold = 3;
AGWFirewallLogs
| where Action == "Matched"
| where Message contains "Found User-Agent associated with security scanner"
| project TransactionId, Hostname, RequestUri, TimeGenerated, ClientIp, Message, DetailedMessage, DetailedData
| join kind = inner(
AGWFirewallLogs
| where Action == "Blocked"
) on TransactionId
| extend Uri = strcat(Hostname,RequestUri)
| summarize StartTime = min(TimeGenerated), EndTime = max(TimeGenerated), TransactionID = make_set(TransactionId), Message = make_set(Message), Detail_Message = make_set(DetailedMessage), Detail_Data = make_set(DetailedData), Total_TransactionId = dcount(TransactionId) by ClientIp, Uri, Action
| where Total_TransactionId >= Threshold
tags:
- Scanner Detection
requiredDataConnectors:
- dataTypes:
- AzureDiagnostics
connectorId: WAF