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

Tomcat - Sql injection patterns

Back
Idce84741e-4875-11ec-81d3-0242ac130003
RulenameTomcat - Sql injection patterns
DescriptionDetects possible sql injection patterns
SeverityHigh
TacticsInitialAccess
TechniquesT1190
Required data connectorsApacheTomcat
CustomLogsAma
KindScheduled
Query frequency1h
Query period1h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Tomcat/Analytic Rules/TomcatSQLiPattern.yaml
Version1.0.1
Arm templatece84741e-4875-11ec-81d3-0242ac130003.json
Deploy To Azure
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"
    }
  ]
}