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

DDoS Attack IP Addresses - Percent Threshold

Back
Id402a42ad-f31c-48d1-8f80-0200846b7f25
RulenameDDoS Attack IP Addresses - Percent Threshold
DescriptionIdentifies IP addresses that generate over 5% of traffic during DDoS attack mitigation
SeverityMedium
TacticsImpact
TechniquesT1498
Required data connectorsDDOS
KindScheduled
Query frequency2h
Query period2h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Azure DDoS Protection/Analytic Rules/AttackSourcesPercentThreshold.yaml
Version1.0.1
Arm template402a42ad-f31c-48d1-8f80-0200846b7f25.json
Deploy To Azure
let T1 = AzureDiagnostics
  | where ResourceType == "PUBLICIPADDRESSES" and Category == "DDoSMitigationFlowLogs"
  | summarize rows_count = count() by destPublicIpAddress_s, sourcePublicIpAddress_s;
let T2 = AzureDiagnostics
  | where ResourceType == "PUBLICIPADDRESSES" and Category == "DDoSMitigationFlowLogs"
  | summarize rows_total = count() by destPublicIpAddress_s;
T2
  | join kind=leftouter T1 on destPublicIpAddress_s
  | project destPublicIpAddress_s, sourcePublicIpAddress_s, percent_of_traffic = 100*rows_count/rows_total
  | order by percent_of_traffic desc
  | where percent_of_traffic > 5
relevantTechniques:
- T1498
name: DDoS Attack IP Addresses - Percent Threshold
requiredDataConnectors:
- dataTypes:
  - AzureDiagnostics
  connectorId: DDOS
entityMappings:
- fieldMappings:
  - identifier: Address
    columnName: sourcePublicIpAddress_s
  entityType: IP
triggerThreshold: 0
id: 402a42ad-f31c-48d1-8f80-0200846b7f25
tactics:
- Impact
version: 1.0.1
queryPeriod: 2h
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Azure DDoS Protection/Analytic Rules/AttackSourcesPercentThreshold.yaml
triggerOperator: gt
kind: Scheduled
eventGroupingSettings:
  aggregationKind: SingleAlert
queryFrequency: 2h
severity: Medium
status: Available
description: Identifies IP addresses that generate over 5% of traffic during DDoS attack mitigation
query: |
  let T1 = AzureDiagnostics
    | where ResourceType == "PUBLICIPADDRESSES" and Category == "DDoSMitigationFlowLogs"
    | summarize rows_count = count() by destPublicIpAddress_s, sourcePublicIpAddress_s;
  let T2 = AzureDiagnostics
    | where ResourceType == "PUBLICIPADDRESSES" and Category == "DDoSMitigationFlowLogs"
    | summarize rows_total = count() by destPublicIpAddress_s;
  T2
    | join kind=leftouter T1 on destPublicIpAddress_s
    | project destPublicIpAddress_s, sourcePublicIpAddress_s, percent_of_traffic = 100*rows_count/rows_total
    | order by percent_of_traffic desc
    | where percent_of_traffic > 5  
{
  "$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/402a42ad-f31c-48d1-8f80-0200846b7f25')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/402a42ad-f31c-48d1-8f80-0200846b7f25')]",
      "properties": {
        "alertRuleTemplateName": "402a42ad-f31c-48d1-8f80-0200846b7f25",
        "customDetails": null,
        "description": "Identifies IP addresses that generate over 5% of traffic during DDoS attack mitigation",
        "displayName": "DDoS Attack IP Addresses - Percent Threshold",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "IP",
            "fieldMappings": [
              {
                "columnName": "sourcePublicIpAddress_s",
                "identifier": "Address"
              }
            ]
          }
        ],
        "eventGroupingSettings": {
          "aggregationKind": "SingleAlert"
        },
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Azure DDoS Protection/Analytic Rules/AttackSourcesPercentThreshold.yaml",
        "query": "let T1 = AzureDiagnostics\n  | where ResourceType == \"PUBLICIPADDRESSES\" and Category == \"DDoSMitigationFlowLogs\"\n  | summarize rows_count = count() by destPublicIpAddress_s, sourcePublicIpAddress_s;\nlet T2 = AzureDiagnostics\n  | where ResourceType == \"PUBLICIPADDRESSES\" and Category == \"DDoSMitigationFlowLogs\"\n  | summarize rows_total = count() by destPublicIpAddress_s;\nT2\n  | join kind=leftouter T1 on destPublicIpAddress_s\n  | project destPublicIpAddress_s, sourcePublicIpAddress_s, percent_of_traffic = 100*rows_count/rows_total\n  | order by percent_of_traffic desc\n  | where percent_of_traffic > 5\n",
        "queryFrequency": "PT2H",
        "queryPeriod": "PT2H",
        "severity": "Medium",
        "status": "Available",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "Impact"
        ],
        "techniques": [
          "T1498"
        ],
        "templateVersion": "1.0.1",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}