API - Rate limiting
| Id | b808063b-07d5-432c-95d0-8900da61cce9 |
| Rulename | API - Rate limiting |
| Description | 42Crunch API protection against rate limiting |
| Severity | Medium |
| Tactics | Impact |
| Techniques | T1499 |
| Required data connectors | 42CrunchAPIProtection FortyTwoCrunchAPIProtection |
| Kind | Scheduled |
| Query frequency | 5m |
| Query period | 5m |
| Trigger threshold | 0 |
| Trigger operator | gt |
| Source Uri | https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/42Crunch API Protection/Analytic Rules/APIRateLimiting.yaml |
| Version | 3.0.1 |
| Arm template | b808063b-07d5-432c-95d0-8900da61cce9.json |
let firstRec = FortyTwoCrunchAPIProtection
| where TimeGenerated >= ago(5m)
| project-away NonBlockingMode, SourcePort, DestinationPort, Query, ApiId, RequestHeader, ResponseHeader, Errors, EventType, Uuid
| where UriPath has "/api/login" and Status == 429;
let rateLimitCount = (toscalar(firstRec | count));
let recCount = iff((rateLimitCount > 20), 1, 0);
firstRec | top recCount by Timestamp desc;
entityMappings:
- entityType: IP
fieldMappings:
- identifier: Address
columnName: SourceIp
- entityType: Host
fieldMappings:
- identifier: HostName
columnName: Hostname
- entityType: Account
fieldMappings:
- identifier: FullName
columnName: InstanceName
tactics:
- Impact
requiredDataConnectors:
- dataTypes:
- FortyTwoCrunchAPIProtection
connectorId: 42CrunchAPIProtection
- dataTypes:
- FortyTwoCrunchAPIProtection
connectorId: FortyTwoCrunchAPIProtection
id: b808063b-07d5-432c-95d0-8900da61cce9
severity: Medium
status: Available
customDetails:
query: |
let firstRec = FortyTwoCrunchAPIProtection
| where TimeGenerated >= ago(5m)
| project-away NonBlockingMode, SourcePort, DestinationPort, Query, ApiId, RequestHeader, ResponseHeader, Errors, EventType, Uuid
| where UriPath has "/api/login" and Status == 429;
let rateLimitCount = (toscalar(firstRec | count));
let recCount = iff((rateLimitCount > 20), 1, 0);
firstRec | top recCount by Timestamp desc;
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/42Crunch API Protection/Analytic Rules/APIRateLimiting.yaml
kind: Scheduled
queryPeriod: 5m
version: 3.0.1
name: API - Rate limiting
queryFrequency: 5m
eventGroupingSettings:
aggregationKind: SingleAlert
relevantTechniques:
- T1499
description: |
'42Crunch API protection against rate limiting'
triggerThreshold: 0
triggerOperator: gt