MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Initial Access |
Rule body
id: 4d9d00b9-31a6-49e4-88c1-9e68277053ac
name: Cloudflare - XSS probing pattern in request
description: |
'Detects XSS probing patterns.'
severity: Medium
status: Available
requiredDataConnectors:
- connectorId: CloudflareDataConnector
dataTypes:
- Cloudflare
queryFrequency: 1h
queryPeriod: 1h
triggerOperator: gt
triggerThreshold: 0
tactics:
- InitialAccess
relevantTechniques:
- T1190
- T1133
query: |
let s_threshold = 3;
Cloudflare
| where HttpRequestMethod in~ ('POST', 'PUT')
| extend susp_ch = countof(ClientRequestURI, '%00')
| where ClientRequestURI matches regex @'(alert\()|(alert\%28)|(String\.fromCharCode\()|(expression\(alert)' or susp_ch > s_threshold
| extend CompleteUrl = strcat(HttpRequestHeaderHost,ClientRequestPath)
entityMappings:
- entityType: IP
fieldMappings:
- identifier: Address
columnName: SrcIpAddr
- entityType: URL
fieldMappings:
- identifier: Url
columnName: CompleteUrl
version: 1.0.1
kind: Scheduled
Stages and Predicates
Parameters
let s_threshold = 3;
Stage 1: source
Cloudflare
Stage 2: where
| where HttpRequestMethod in~ ('POST', 'PUT')
Stage 3: extend
| extend susp_ch = countof(ClientRequestURI, '%00')
Stage 4: where
| where ClientRequestURI matches regex @'(alert\()|(alert\%28)|(String\.fromCharCode\()|(expression\(alert)' or susp_ch > s_threshold
Stage 5: extend
| extend CompleteUrl = strcat(HttpRequestHeaderHost,ClientRequestPath)
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ClientRequestURI | regex_match |
| field:"ClientRequestURI" kind:regex_match |
HttpRequestMethod | in |
| field:"HttpRequestMethod" kind:in |
susp_ch | gt |
| field:"susp_ch" kind:gt value:"3" |
Output fields
These fields are emitted when the rule matches.
| Field | Source |
|---|---|
susp_ch | extend |
CompleteUrl | extend |