Microsoft Sentinel Analytic Rules
cloudbrothers.infoAzure Sentinel RepoToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

API - Rate limiting

Back
Idb808063b-07d5-432c-95d0-8900da61cce9
RulenameAPI - Rate limiting
Description42Crunch API protection against rate limiting
SeverityMedium
TacticsImpact
TechniquesT1499
Required data connectors42CrunchAPIProtection
FortyTwoCrunchAPIProtection
KindScheduled
Query frequency5m
Query period5m
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/42Crunch API Protection/Analytic Rules/APIRateLimiting.yaml
Version3.0.1
Arm templateb808063b-07d5-432c-95d0-8900da61cce9.json
Deploy To Azure
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;
status: Available
queryFrequency: 5m
queryPeriod: 5m
triggerOperator: gt
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;  
eventGroupingSettings:
  aggregationKind: SingleAlert
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/42Crunch API Protection/Analytic Rules/APIRateLimiting.yaml
tactics:
- Impact
triggerThreshold: 0
entityMappings:
- entityType: IP
  fieldMappings:
  - identifier: Address
    columnName: SourceIp
- entityType: Host
  fieldMappings:
  - identifier: HostName
    columnName: Hostname
- entityType: Account
  fieldMappings:
  - identifier: FullName
    columnName: InstanceName
requiredDataConnectors:
- connectorId: 42CrunchAPIProtection
  dataTypes:
  - FortyTwoCrunchAPIProtection
- connectorId: FortyTwoCrunchAPIProtection
  dataTypes:
  - FortyTwoCrunchAPIProtection
kind: Scheduled
relevantTechniques:
- T1499
customDetails: 
description: |
    '42Crunch API protection against rate limiting'
name: API - Rate limiting
version: 3.0.1
id: b808063b-07d5-432c-95d0-8900da61cce9
severity: Medium