Imperva - Possible command injection
Id | 6214f187-5840-4cf7-a174-0cf9a72bfd29 |
Rulename | Imperva - Possible command injection |
Description | Detects requests with commands in URI. |
Severity | High |
Tactics | InitialAccess |
Techniques | T1190 T1133 |
Required data connectors | ImpervaWAFCloudAPI |
Kind | Scheduled |
Query frequency | 10m |
Query period | 10m |
Trigger threshold | 0 |
Trigger operator | gt |
Source Uri | https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/ImpervaCloudWAF/Analytic Rules/ImpervaCommandInUri.yaml |
Version | 1.0.1 |
Arm template | 6214f187-5840-4cf7-a174-0cf9a72bfd29.json |
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
relevantTechniques:
- T1190
- T1133
name: Imperva - Possible command injection
requiredDataConnectors:
- dataTypes:
- ImpervaWAFCloud
connectorId: ImpervaWAFCloudAPI
entityMappings:
- fieldMappings:
- identifier: Address
columnName: IPCustomEntity
entityType: IP
triggerThreshold: 0
id: 6214f187-5840-4cf7-a174-0cf9a72bfd29
tactics:
- InitialAccess
version: 1.0.1
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/ImpervaCloudWAF/Analytic Rules/ImpervaCommandInUri.yaml
queryPeriod: 10m
kind: Scheduled
queryFrequency: 10m
severity: High
status: Available
description: |
'Detects requests with commands in URI.'
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
triggerOperator: gt
{
"$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"
}
]
}