Skip to content

Commit 3876d08

Browse files
authored
WAF Detection for Protocol Attacks
Files Added: Application Gateway WAF Detection for Protocol Attacks [HTTP] - Azure Diagnostics. Json Azure Front Door WAF Detection for Protocol Attacks [HTTP] - Azure Diagnostics. Json Resource-Specific - Application Gateway WAF Detection for Protocol Attacks [HTTP].Json
1 parent f592e46 commit 3876d08

3 files changed

+66
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
let Threshold = 3;
2+
AzureDiagnostics
3+
| where Category == "ApplicationGatewayFirewallLog"
4+
| where action_s == "Matched"
5+
| where Message has_any ("HTTP Header Injection", "HTTP Response Splitting", "HTTP Splitting", "LDAP Injection")
6+
| where ruleId_s startswith "921"
7+
| where ruleGroup_s startswith "PROTOCOL-ATTACK"
8+
| project transactionId_g, hostname_s, requestUri_s, TimeGenerated, clientIp_s, Message, details_message_s, details_data_s
9+
| join kind = inner(
10+
AzureDiagnostics
11+
| where Category =~ "ApplicationGatewayFirewallLog"
12+
| where action_s =~ "Blocked"
13+
) on transactionId_g
14+
| summarize
15+
StartTime = min(TimeGenerated),
16+
EndTime = max(TimeGenerated),
17+
TransactionID = make_set(transactionId_g, 100),
18+
Message = make_set(Message, 100),
19+
Detail_Message = make_set(details_message_s, 100),
20+
Detail_Data = make_set(details_data_s, 100),
21+
Total_TransactionId = dcount(transactionId_g)
22+
by clientIp_s, action_s
23+
| where Total_TransactionId >= Threshold
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
let Threshold = 3;
2+
AzureDiagnostics
3+
| where Category =~ "FrontDoorWebApplicationFirewallLog"
4+
| where action_s =~ "AnomalyScoring"
5+
| where details_msg_s has_any ("HTTP Header Injection", "HTTP Response Splitting", "HTTP Splitting", "LDAP Injection")
6+
| where ruleName_s has "Microsoft_DefaultRuleSet-2.1-PROTOCOL-ATTACK"
7+
| project trackingReference_s, host_s, requestUri_s, TimeGenerated, clientIP_s, details_matches_s, details_msg_s, details_data_s
8+
| join kind = inner(
9+
AzureDiagnostics
10+
| where Category =~ "FrontDoorWebApplicationFirewallLog"
11+
| where action_s =~ "Block"
12+
) on trackingReference_s
13+
| summarize
14+
StartTime = min(TimeGenerated),
15+
EndTime = max(TimeGenerated),
16+
TrackingReference = make_set(trackingReference_s, 100),
17+
Detail_Data = make_set(details_data_s, 100),
18+
Detail_Message = make_set(details_msg_s, 100),
19+
Total_TrackingReference = dcount(trackingReference_s)
20+
by clientIP_s, action_s
21+
| where Total_TrackingReference >= Threshold
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
let Threshold = 3;
2+
AGWFirewallLogs
3+
| where Action == "Matched"
4+
| where FileDetails contains "PROTOCOL-ATTACK"
5+
| where Message startswith "HTTP"
6+
| where RuleId startswith "921"
7+
| project TransactionId, Hostname, RequestUri, TimeGenerated, ClientIp, Message, DetailedMessage, DetailedData
8+
| join kind=inner (
9+
AGWFirewallLogs
10+
| where Action == "Blocked"
11+
) on TransactionId
12+
| extend Uri = strcat(Hostname, RequestUri)
13+
| summarize
14+
StartTime = min(TimeGenerated),
15+
EndTime = max(TimeGenerated),
16+
TransactionID = make_set(TransactionId, 100),
17+
Message = make_set(Message, 100),
18+
Detail_Message = make_set(DetailedMessage, 100),
19+
Detail_Data = make_set(DetailedData, 100),
20+
Total_TransactionId = dcount(TransactionId)
21+
by ClientIp, Uri, Action
22+
| where Total_TransactionId >= Threshold

0 commit comments

Comments
 (0)