Microsoft Sentinel low experimental kql

API - Rate limiting

'42Crunch API protection against first-time access'

View Source

Detection Logic

let firstRec = FortyTwoCrunchAPIProtection
| where TimeGenerated >= ago(5m)
| project-away NonBlockingMode, SourcePort, DestinationPort, Query, ApiId, RequestHeader, ResponseHeader, Errors, EventType, Uuid
| where UriPath has "/api/login"
| top 1 by Timestamp desc;
let ipAddress = toscalar(firstRec
| summarize by SourceIp);
let secondRec = FortyTwoCrunchAPIProtection
| where TimeGenerated >= ago(7d)
| project-away NonBlockingMode, SourcePort, DestinationPort, Query, ApiId, RequestHeader, ResponseHeader, Errors, EventType, Uuid
| where UriPath has "/api/login" and SourceIp == ipAddress;
let recCount = iff((toscalar(secondRec
| count) > 1), 0, 1);
secondRec
| take recCount

Field Validations

Loading…

Comments (0)

Loading comments...