Skip to content

Commit 3725bd4

Browse files
authored
Merge pull request #519 from shabaz-github/master
Add detection for CAPTCHA bot traffic in AFD WAF logs
2 parents cf0ac0d + cb142a9 commit 3725bd4

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//This detection identifies source IPs repeatedly served a CAPTCHA challenge by Azure Front Door WAF within the selected lookback window (default 90 days). It groups Front Door WAF events by socketIP_s (labeled as SourceIp) and raises findings for any IP that hit the CAPTCHA action ≥ 3 times. For each flagged IP, it provides the first/last seen times, total challenge count, and unique URIs the IP requested. This helps surface persistent or recurring bot/automated traffic that was challenged by the WAF, so analysts can decide whether to block, rate‑limit, or tune bot protections.
2+
3+
let lookback = 90d;
4+
let minChallenges = 3;
5+
AzureDiagnostics
6+
| where Category =~ "FrontDoorWebApplicationFirewallLog"
7+
| where TimeGenerated > ago(lookback)
8+
| where (action_s in~ ("Captcha")
9+
or tostring(details_msg_s) contains "captcha")
10+
| project TimeGenerated, clientIp_s, requestUri_s, socketIP_s
11+
| summarize Count = count(),
12+
FirstSeen = min(TimeGenerated),
13+
LastSeen = max(TimeGenerated),
14+
URIs = make_set(requestUri_s)
15+
by SourceIp=socketIP_s
16+
| where Count >= minChallenges
17+
| order by Count desc

0 commit comments

Comments
 (0)