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
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.0
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
queryFrequency: 1h
tactics:
- InitialAccess
queryPeriod: 1h
kind: Scheduled
relevantTechniques:
- T1190
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Tomcat/Analytic Rules/TomcatSQLiPattern.yaml
description: |
    'Detects possible sql injection patterns'
requiredDataConnectors:
- dataTypes:
  - TomcatEvent
  connectorId: ApacheTomcat
version: 1.0.0
triggerThreshold: 0
severity: High
triggerOperator: gt
id: ce84741e-4875-11ec-81d3-0242ac130003
entityMappings:
- entityType: URL
  fieldMappings:
  - columnName: UrlCustomEntity
    identifier: Url
status: Available
name: Tomcat - Sql injection patterns
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  
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "apiVersion": "2023-02-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",
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "InitialAccess"
        ],
        "techniques": [
          "T1190"
        ],
        "templateVersion": "1.0.0",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}