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

Imperva - Possible command injection

Back
Id6214f187-5840-4cf7-a174-0cf9a72bfd29
RulenameImperva - Possible command injection
DescriptionDetects requests with commands in URI.
SeverityHigh
TacticsInitialAccess
TechniquesT1190
T1133
Required data connectorsImpervaWAFCloudAPI
KindScheduled
Query frequency10m
Query period10m
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/ImpervaCloudWAF/Analytic Rules/ImpervaCommandInUri.yaml
Version1.0.1
Arm template6214f187-5840-4cf7-a174-0cf9a72bfd29.json
Deploy To Azure
let cmd_lst = dynamic(['%2fetc%2fpasswd', '%2fetc%2fshadow', 'ping', 'whoami', 'phpinfo', '%2fbin%2fbash', 'curl', 'exec(', 'wget', 'python', 'gcc' , 'uname', 'systeminfo', 'rout', 'hostname', 'ifconfig']);
ImpervaWAFCloud
| where QueryString has_any (cmd_lst)
| extend IPCustomEntity = SrcIpAddr
queryPeriod: 10m
version: 1.0.1
tactics:
- InitialAccess
queryFrequency: 10m
id: 6214f187-5840-4cf7-a174-0cf9a72bfd29
triggerOperator: gt
requiredDataConnectors:
- dataTypes:
  - ImpervaWAFCloud
  connectorId: ImpervaWAFCloudAPI
severity: High
entityMappings:
- entityType: IP
  fieldMappings:
  - columnName: IPCustomEntity
    identifier: Address
triggerThreshold: 0
relevantTechniques:
- T1190
- T1133
query: |
  let cmd_lst = dynamic(['%2fetc%2fpasswd', '%2fetc%2fshadow', 'ping', 'whoami', 'phpinfo', '%2fbin%2fbash', 'curl', 'exec(', 'wget', 'python', 'gcc' , 'uname', 'systeminfo', 'rout', 'hostname', 'ifconfig']);
  ImpervaWAFCloud
  | where QueryString has_any (cmd_lst)
  | extend IPCustomEntity = SrcIpAddr  
kind: Scheduled
name: Imperva - Possible command injection
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/ImpervaCloudWAF/Analytic Rules/ImpervaCommandInUri.yaml
description: |
    'Detects requests with commands in URI.'
status: Available
{
  "$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/6214f187-5840-4cf7-a174-0cf9a72bfd29')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/6214f187-5840-4cf7-a174-0cf9a72bfd29')]",
      "properties": {
        "alertRuleTemplateName": "6214f187-5840-4cf7-a174-0cf9a72bfd29",
        "customDetails": null,
        "description": "'Detects requests with commands in URI.'\n",
        "displayName": "Imperva - Possible command injection",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "IP",
            "fieldMappings": [
              {
                "columnName": "IPCustomEntity",
                "identifier": "Address"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/ImpervaCloudWAF/Analytic Rules/ImpervaCommandInUri.yaml",
        "query": "let cmd_lst = dynamic(['%2fetc%2fpasswd', '%2fetc%2fshadow', 'ping', 'whoami', 'phpinfo', '%2fbin%2fbash', 'curl', 'exec(', 'wget', 'python', 'gcc' , 'uname', 'systeminfo', 'rout', 'hostname', 'ifconfig']);\nImpervaWAFCloud\n| where QueryString has_any (cmd_lst)\n| extend IPCustomEntity = SrcIpAddr\n",
        "queryFrequency": "PT10M",
        "queryPeriod": "PT10M",
        "severity": "High",
        "status": "Available",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "InitialAccess"
        ],
        "techniques": [
          "T1133",
          "T1190"
        ],
        "templateVersion": "1.0.1",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}