Detection rules › Kusto

Tomcat - Sql injection patterns

Status
available
Severity
high
Time window
1h
Source
github.com/Azure/Azure-Sentinel

'Detects possible sql injection patterns'

MITRE ATT&CK coverage

TacticTechniques
Initial AccessT1190 Exploit Public-Facing Application

Rule body kusto

id: ce84741e-4875-11ec-81d3-0242ac130003
name: Tomcat - Sql injection patterns
description: |
  'Detects possible sql injection patterns'
severity: High
status: Available
requiredDataConnectors:
  - connectorId: CustomLogsAma
    datatypes:
      - Tomcat_CL
queryFrequency: 1h
queryPeriod: 1h
triggerOperator: gt
triggerThreshold: 0
tactics:
  - InitialAccess
relevantTechniques:
  - T1190
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
entityMappings:
  - entityType: URL
    fieldMappings:
      - identifier: Url
        columnName: UrlCustomEntity
version: 1.0.2
kind: Scheduled

Stages and Predicates

Let binding: commands

let commands = dynamic(["1/*'*/", "1'||'asd'||'", "'1'='1", "1' or '1'='1", "1 or 1=1", "1=1", "1/*!1111'*/", "'or''='"]);

Stage 1: source

TomcatEvent

Stage 2: where

| where UrlOriginal has_any (commands)

References commands (defined above).

Stage 3: extend

| extend UrlCustomEntity = UrlOriginal

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
UrlOriginalmatch
  • '1'='1
  • 'or''='
  • 1 or 1=1
  • 1' or '1'='1
  • 1'||'asd'||'
  • 1/*!1111'*/
  • 1/*'*/
  • 1=1

Output fields

Fields the rule emits when it matches. Chronicle authors list these in the outcome block; they appear on the detection and $risk_score drives alerting. Sentinel / Defender XDR rules build them up through project / summarize / extend stages. Sentinel maps these into alert fields via entityMappings and customDetails; Defender XDR custom detections surface them as alert fields directly.

FieldSource
UrlCustomEntityextend