Analytic rule catalog
NGINX - Sql injection patterns
Back
| Id | 3bac451d-f919-4c92-9be7-694990e0ca4b |
| Rulename | NGINX - Sql injection patterns |
| Description | Detects possible sql injection patterns |
| Severity | High |
| Tactics | InitialAccess |
| Techniques | T1190 |
| Required data connectors | CustomLogsAma |
| 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/NGINX%20HTTP%20Server/Analytic%20Rules/NGINXSqlPattern.yaml |
| Version | 1.0.3 |
| Arm template | 3bac451d-f919-4c92-9be7-694990e0ca4b.json |
let sql_patterns = dynamic([@"1/*'*/", @"1'||'asd'||'", @"'1'='1", @"1' or '1'='1", @"1 or 1=1", @"1=1", @"1/*!1111'*/", @"'or''='"]);
NGINXHTTPServer
| where UrlOriginal has_any (sql_patterns)
| extend IPCustomEntity = SrcIpAddr, UrlCustomEntity = UrlOriginal
entityMappings:
- entityType: IP
fieldMappings:
- identifier: Address
columnName: IPCustomEntity
- entityType: URL
fieldMappings:
- identifier: Url
columnName: UrlCustomEntity
name: NGINX - Sql injection patterns
kind: Scheduled
triggerOperator: gt
status: Available
queryPeriod: 10m
requiredDataConnectors:
- connectorId: CustomLogsAma
dataTypes:
- NGINX_CL
tactics:
- InitialAccess
query: |
let sql_patterns = dynamic([@"1/*'*/", @"1'||'asd'||'", @"'1'='1", @"1' or '1'='1", @"1 or 1=1", @"1=1", @"1/*!1111'*/", @"'or''='"]);
NGINXHTTPServer
| where UrlOriginal has_any (sql_patterns)
| extend IPCustomEntity = SrcIpAddr, UrlCustomEntity = UrlOriginal
description: |
'Detects possible sql injection patterns'
severity: High
id: 3bac451d-f919-4c92-9be7-694990e0ca4b
triggerThreshold: 0
queryFrequency: 10m
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/NGINX%20HTTP%20Server/Analytic%20Rules/NGINXSqlPattern.yaml
version: 1.0.3
relevantTechniques:
- T1190
{
"$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/3bac451d-f919-4c92-9be7-694990e0ca4b')]",
"kind": "Scheduled",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/3bac451d-f919-4c92-9be7-694990e0ca4b')]",
"properties": {
"alertRuleTemplateName": "3bac451d-f919-4c92-9be7-694990e0ca4b",
"customDetails": null,
"description": "'Detects possible sql injection patterns'\n",
"displayName": "NGINX - Sql injection patterns",
"enabled": true,
"entityMappings": [
{
"entityType": "IP",
"fieldMappings": [
{
"columnName": "IPCustomEntity",
"identifier": "Address"
}
]
},
{
"entityType": "URL",
"fieldMappings": [
{
"columnName": "UrlCustomEntity",
"identifier": "Url"
}
]
}
],
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/NGINX%20HTTP%20Server/Analytic%20Rules/NGINXSqlPattern.yaml",
"query": "let sql_patterns = dynamic([@\"1/*'*/\", @\"1'||'asd'||'\", @\"'1'='1\", @\"1' or '1'='1\", @\"1 or 1=1\", @\"1=1\", @\"1/*!1111'*/\", @\"'or''='\"]);\nNGINXHTTPServer\n| where UrlOriginal has_any (sql_patterns)\n| extend IPCustomEntity = SrcIpAddr, UrlCustomEntity = UrlOriginal\n",
"queryFrequency": "PT10M",
"queryPeriod": "PT10M",
"severity": "High",
"status": "Available",
"subTechniques": [],
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"InitialAccess"
],
"techniques": [
"T1190"
],
"templateVersion": "1.0.3",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0
},
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
}
]
}