Back
Id3c5be96e-2eeb-439a-9856-1c23aa72cfdd
RulenameBOLA Finding with API Traffic Anomaly
DescriptionDetects applications with open BOLA/IDOR findings (OWASP API1, API3, API5)

that also show anomalous 4xx error traffic in Azure API Management.

Correlates StratoSecure BOLA findings with APIM gateway error spikes.
SeverityHigh
TacticsInitialAccess
Discovery
TechniquesT1190
T1083
Required data connectorsStratoSecurePush
KindScheduled
Query frequency1h
Query period75m
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/StratoSecure/Analytic%20Rules/S3_BOLA_TrafficAnomaly.yaml
Version1.0.0
Arm template3c5be96e-2eeb-439a-9856-1c23aa72cfdd.json
Deploy To Azure
let lookback = 1h;
let enumThreshold = 100;
let BolaFindings = StratoSecure_Findings_CL
    | where TimeGenerated >= ago(lookback)
    | where FixStatus =~ "open"
    | where OwaspCategory in ("API1", "API3", "API5")
    | where Severity in ("Critical", "High")
    | summarize FindingCount = count(), RuleIds = make_set(RuleId)
        by ApplicationId, StraTenantId;
let TrafficAnomalies = ApiManagementGatewayLogs
    | where TimeGenerated >= ago(lookback)
    | where ResponseCode in (403, 401, 404)
    | summarize ErrorCount = count(), DistinctCallers = dcount(CallerIpAddress),
        Paths = make_set(Url, 30), LastSeen = max(TimeGenerated)
        by ApiId, OperationId
    | where ErrorCount >= enumThreshold;
BolaFindings
    | join kind=inner TrafficAnomalies on $left.ApplicationId == $right.ApiId
    | project TimeGenerated = LastSeen, ApplicationId, StraTenantId,
        FindingCount, RuleIds, ErrorCount, DistinctCallers, Paths
triggerThreshold: 0
kind: Scheduled
description: |
  Detects applications with open BOLA/IDOR findings (OWASP API1, API3, API5)
  that also show anomalous 4xx error traffic in Azure API Management.
  Correlates StratoSecure BOLA findings with APIM gateway error spikes.
queryFrequency: 1h
triggerOperator: gt
relevantTechniques:
- T1190
- T1083
entityMappings:
- fieldMappings:
  - identifier: AppId
    columnName: ApplicationId
  entityType: CloudApplication
id: 3c5be96e-2eeb-439a-9856-1c23aa72cfdd
query: |
  let lookback = 1h;
  let enumThreshold = 100;
  let BolaFindings = StratoSecure_Findings_CL
      | where TimeGenerated >= ago(lookback)
      | where FixStatus =~ "open"
      | where OwaspCategory in ("API1", "API3", "API5")
      | where Severity in ("Critical", "High")
      | summarize FindingCount = count(), RuleIds = make_set(RuleId)
          by ApplicationId, StraTenantId;
  let TrafficAnomalies = ApiManagementGatewayLogs
      | where TimeGenerated >= ago(lookback)
      | where ResponseCode in (403, 401, 404)
      | summarize ErrorCount = count(), DistinctCallers = dcount(CallerIpAddress),
          Paths = make_set(Url, 30), LastSeen = max(TimeGenerated)
          by ApiId, OperationId
      | where ErrorCount >= enumThreshold;
  BolaFindings
      | join kind=inner TrafficAnomalies on $left.ApplicationId == $right.ApiId
      | project TimeGenerated = LastSeen, ApplicationId, StraTenantId,
          FindingCount, RuleIds, ErrorCount, DistinctCallers, Paths
version: 1.0.0
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/StratoSecure/Analytic%20Rules/S3_BOLA_TrafficAnomaly.yaml
requiredDataConnectors:
- dataTypes:
  - StratoSecure_Findings_CL
  connectorId: StratoSecurePush
tactics:
- InitialAccess
- Discovery
queryPeriod: 75m
severity: High
status: Available
name: BOLA Finding with API Traffic Anomaly
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "apiVersion": "2024-01-01-preview",
      "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/3c5be96e-2eeb-439a-9856-1c23aa72cfdd')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/3c5be96e-2eeb-439a-9856-1c23aa72cfdd')]",
      "properties": {
        "alertRuleTemplateName": "3c5be96e-2eeb-439a-9856-1c23aa72cfdd",
        "customDetails": null,
        "description": "Detects applications with open BOLA/IDOR findings (OWASP API1, API3, API5)\nthat also show anomalous 4xx error traffic in Azure API Management.\nCorrelates StratoSecure BOLA findings with APIM gateway error spikes.\n",
        "displayName": "BOLA Finding with API Traffic Anomaly",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "CloudApplication",
            "fieldMappings": [
              {
                "columnName": "ApplicationId",
                "identifier": "AppId"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/StratoSecure/Analytic%20Rules/S3_BOLA_TrafficAnomaly.yaml",
        "query": "let lookback = 1h;\nlet enumThreshold = 100;\nlet BolaFindings = StratoSecure_Findings_CL\n    | where TimeGenerated >= ago(lookback)\n    | where FixStatus =~ \"open\"\n    | where OwaspCategory in (\"API1\", \"API3\", \"API5\")\n    | where Severity in (\"Critical\", \"High\")\n    | summarize FindingCount = count(), RuleIds = make_set(RuleId)\n        by ApplicationId, StraTenantId;\nlet TrafficAnomalies = ApiManagementGatewayLogs\n    | where TimeGenerated >= ago(lookback)\n    | where ResponseCode in (403, 401, 404)\n    | summarize ErrorCount = count(), DistinctCallers = dcount(CallerIpAddress),\n        Paths = make_set(Url, 30), LastSeen = max(TimeGenerated)\n        by ApiId, OperationId\n    | where ErrorCount >= enumThreshold;\nBolaFindings\n    | join kind=inner TrafficAnomalies on $left.ApplicationId == $right.ApiId\n    | project TimeGenerated = LastSeen, ApplicationId, StraTenantId,\n        FindingCount, RuleIds, ErrorCount, DistinctCallers, Paths\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "PT75M",
        "severity": "High",
        "status": "Available",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "Discovery",
          "InitialAccess"
        ],
        "techniques": [
          "T1083",
          "T1190"
        ],
        "templateVersion": "1.0.0",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}