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

App GW WAF - Path Traversal Attack

Back
Idb6c3a8a6-d22c-4882-9c57-abc01690938b
RulenameApp GW WAF - Path Traversal Attack
DescriptionIdentifies a match for a Path Traversal based attack in the App Gateway WAF logs. The threshold value in the query can be changed as per your infrastructure’s requirements.

References: https://owasp.org/www-community/attacks/Path_Traversal
SeverityHigh
TacticsDefenseEvasion
Execution
InitialAccess
PrivilegeEscalation
Discovery
TechniquesT1548
T1203
T1190
T1548
T1087
Required data connectorsWAF
KindScheduled
Query frequency6h
Query period6h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Azure Web Application Firewall (WAF)/Analytic Rules/App-GW-WAF-Path-Traversal-Attack.yaml
Version1.0.2
Arm templateb6c3a8a6-d22c-4882-9c57-abc01690938b.json
Deploy To Azure
let Threshold = 3;  
AzureDiagnostics
| where ResourceProvider == 'MICROSOFT.NETWORK' and Category == 'ApplicationGatewayFirewallLog'
| where action_s == "Matched"
| where Message has "Path Traversal Attack"
| project transactionId_g, hostname_s, requestUri_s, TimeGenerated, clientIp_s, Message, details_message_s, details_data_s
| join kind = inner(
AzureDiagnostics
| where ResourceProvider == 'MICROSOFT.NETWORK' and Category == 'ApplicationGatewayFirewallLog'
| where action_s == "Blocked") on transactionId_g
| extend Uri = strcat(hostname_s,requestUri_s)
| summarize StartTime = min(TimeGenerated), EndTime = max(TimeGenerated), TransactionID = make_set(transactionId_g,100), Message = make_set(Message,100), Detail_Message = make_set(details_message_s,100), Detail_Data = make_set(details_data_s,100), Total_TransactionId = dcount(transactionId_g) by clientIp_s, Uri, action_s
| where Total_TransactionId >= Threshold
id: b6c3a8a6-d22c-4882-9c57-abc01690938b
triggerOperator: gt
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Azure Web Application Firewall (WAF)/Analytic Rules/App-GW-WAF-Path-Traversal-Attack.yaml
requiredDataConnectors:
- dataTypes:
  - AzureDiagnostics
  connectorId: WAF
description: |
  'Identifies a match for a Path Traversal based attack in the App Gateway WAF logs. The threshold value in the query can be changed as per your infrastructure's requirements.
  References: https://owasp.org/www-community/attacks/Path_Traversal'  
severity: High
queryPeriod: 6h
kind: Scheduled
tags:
- Path Traversal
tactics:
- DefenseEvasion
- Execution
- InitialAccess
- PrivilegeEscalation
- Discovery
queryFrequency: 6h
query: |
  let Threshold = 3;  
  AzureDiagnostics
  | where ResourceProvider == 'MICROSOFT.NETWORK' and Category == 'ApplicationGatewayFirewallLog'
  | where action_s == "Matched"
  | where Message has "Path Traversal Attack"
  | project transactionId_g, hostname_s, requestUri_s, TimeGenerated, clientIp_s, Message, details_message_s, details_data_s
  | join kind = inner(
  AzureDiagnostics
  | where ResourceProvider == 'MICROSOFT.NETWORK' and Category == 'ApplicationGatewayFirewallLog'
  | where action_s == "Blocked") on transactionId_g
  | extend Uri = strcat(hostname_s,requestUri_s)
  | summarize StartTime = min(TimeGenerated), EndTime = max(TimeGenerated), TransactionID = make_set(transactionId_g,100), Message = make_set(Message,100), Detail_Message = make_set(details_message_s,100), Detail_Data = make_set(details_data_s,100), Total_TransactionId = dcount(transactionId_g) by clientIp_s, Uri, action_s
  | where Total_TransactionId >= Threshold  
version: 1.0.2
triggerThreshold: 0
name: App GW WAF - Path Traversal Attack
entityMappings:
- entityType: URL
  fieldMappings:
  - columnName: Uri
    identifier: Url
- entityType: IP
  fieldMappings:
  - columnName: clientIp_s
    identifier: Address
status: Available
relevantTechniques:
- T1548
- T1203
- T1190
- T1548
- T1087
{
  "$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/b6c3a8a6-d22c-4882-9c57-abc01690938b')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/b6c3a8a6-d22c-4882-9c57-abc01690938b')]",
      "properties": {
        "alertRuleTemplateName": "b6c3a8a6-d22c-4882-9c57-abc01690938b",
        "customDetails": null,
        "description": "'Identifies a match for a Path Traversal based attack in the App Gateway WAF logs. The threshold value in the query can be changed as per your infrastructure's requirements.\nReferences: https://owasp.org/www-community/attacks/Path_Traversal'\n",
        "displayName": "App GW WAF - Path Traversal Attack",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "URL",
            "fieldMappings": [
              {
                "columnName": "Uri",
                "identifier": "Url"
              }
            ]
          },
          {
            "entityType": "IP",
            "fieldMappings": [
              {
                "columnName": "clientIp_s",
                "identifier": "Address"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Azure Web Application Firewall (WAF)/Analytic Rules/App-GW-WAF-Path-Traversal-Attack.yaml",
        "query": "let Threshold = 3;  \nAzureDiagnostics\n| where ResourceProvider == 'MICROSOFT.NETWORK' and Category == 'ApplicationGatewayFirewallLog'\n| where action_s == \"Matched\"\n| where Message has \"Path Traversal Attack\"\n| project transactionId_g, hostname_s, requestUri_s, TimeGenerated, clientIp_s, Message, details_message_s, details_data_s\n| join kind = inner(\nAzureDiagnostics\n| where ResourceProvider == 'MICROSOFT.NETWORK' and Category == 'ApplicationGatewayFirewallLog'\n| where action_s == \"Blocked\") on transactionId_g\n| extend Uri = strcat(hostname_s,requestUri_s)\n| summarize StartTime = min(TimeGenerated), EndTime = max(TimeGenerated), TransactionID = make_set(transactionId_g,100), Message = make_set(Message,100), Detail_Message = make_set(details_message_s,100), Detail_Data = make_set(details_data_s,100), Total_TransactionId = dcount(transactionId_g) by clientIp_s, Uri, action_s\n| where Total_TransactionId >= Threshold\n",
        "queryFrequency": "PT6H",
        "queryPeriod": "PT6H",
        "severity": "High",
        "status": "Available",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "DefenseEvasion",
          "Discovery",
          "Execution",
          "InitialAccess",
          "PrivilegeEscalation"
        ],
        "tags": [
          "Path Traversal"
        ],
        "techniques": [
          "T1087",
          "T1190",
          "T1203",
          "T1548"
        ],
        "templateVersion": "1.0.2",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}