Tomcat - Sql injection patterns
Id | ce84741e-4875-11ec-81d3-0242ac130003 |
Rulename | Tomcat - Sql injection patterns |
Description | Detects possible sql injection patterns |
Severity | High |
Tactics | InitialAccess |
Techniques | T1190 |
Required data connectors | ApacheTomcat CustomLogsAma |
Kind | Scheduled |
Query frequency | 1h |
Query period | 1h |
Trigger threshold | 0 |
Trigger operator | gt |
Source Uri | https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Tomcat/Analytic Rules/TomcatSQLiPattern.yaml |
Version | 1.0.1 |
Arm template | ce84741e-4875-11ec-81d3-0242ac130003.json |
let commands = dynamic(["1/*'*/", "1'||'asd'||'", "'1'='1", "1' or '1'='1", "1 or 1=1", "1=1", "1/*!1111'*/", "'or''='"]);
TomcatEvent
| where UrlOriginal has_any (commands)
| extend UrlCustomEntity = UrlOriginal
status: Available
queryFrequency: 1h
description: |
'Detects possible sql injection patterns'
severity: High
version: 1.0.1
relevantTechniques:
- T1190
name: Tomcat - Sql injection patterns
triggerThreshold: 0
kind: Scheduled
query: |
let commands = dynamic(["1/*'*/", "1'||'asd'||'", "'1'='1", "1' or '1'='1", "1 or 1=1", "1=1", "1/*!1111'*/", "'or''='"]);
TomcatEvent
| where UrlOriginal has_any (commands)
| extend UrlCustomEntity = UrlOriginal
triggerOperator: gt
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Tomcat/Analytic Rules/TomcatSQLiPattern.yaml
requiredDataConnectors:
- connectorId: ApacheTomcat
dataTypes:
- TomcatEvent
- connectorId: CustomLogsAma
datatypes:
- Tomcat_CL
tactics:
- InitialAccess
id: ce84741e-4875-11ec-81d3-0242ac130003
queryPeriod: 1h
entityMappings:
- fieldMappings:
- columnName: UrlCustomEntity
identifier: Url
entityType: URL
{
"$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/ce84741e-4875-11ec-81d3-0242ac130003')]",
"kind": "Scheduled",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/ce84741e-4875-11ec-81d3-0242ac130003')]",
"properties": {
"alertRuleTemplateName": "ce84741e-4875-11ec-81d3-0242ac130003",
"customDetails": null,
"description": "'Detects possible sql injection patterns'\n",
"displayName": "Tomcat - Sql injection patterns",
"enabled": true,
"entityMappings": [
{
"entityType": "URL",
"fieldMappings": [
{
"columnName": "UrlCustomEntity",
"identifier": "Url"
}
]
}
],
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Tomcat/Analytic Rules/TomcatSQLiPattern.yaml",
"query": "let commands = dynamic([\"1/*'*/\", \"1'||'asd'||'\", \"'1'='1\", \"1' or '1'='1\", \"1 or 1=1\", \"1=1\", \"1/*!1111'*/\", \"'or''='\"]);\nTomcatEvent\n| where UrlOriginal has_any (commands)\n| extend UrlCustomEntity = UrlOriginal\n",
"queryFrequency": "PT1H",
"queryPeriod": "PT1H",
"severity": "High",
"status": "Available",
"subTechniques": [],
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"InitialAccess"
],
"techniques": [
"T1190"
],
"templateVersion": "1.0.1",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0
},
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
}
]
}