Detection rules › Kusto
Cloudflare - Unexpected POST requests
'Detects post requests to unusual extensions.'
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Command & Control |
Rule body
id: 7313352a-09f6-4a84-88bd-6f17f1cbeb88
name: Cloudflare - Unexpected POST requests
description: |
'Detects post requests to unusual extensions.'
severity: Medium
status: Available
requiredDataConnectors:
- connectorId: CloudflareDataConnector
dataTypes:
- Cloudflare
queryFrequency: 1h
queryPeriod: 1h
triggerOperator: gt
triggerThreshold: 0
tactics:
- Persistence
- CommandAndControl
relevantTechniques:
- T1505
- T1071
query: |
Cloudflare
| where HttpRequestMethod in~ ('POST', 'PUT')
| where tostring(HttpStatusCode) startswith '2'
| where DstBytes != 0 or SrcBytes != 0
| extend fe = extract(@'.*(\.\w+)$', 1, ClientRequestURI)
| where fe in~ ('.jpg', '.jpeg', '.gif', '.png', '.icon', '.ico', '.xml', '.swf', '.svg', '.ppt', '.pttx', '.doc', '.docx', '.rtf', '.pdf', '.tif', '.zip', '.mov')
entityMappings:
- entityType: IP
fieldMappings:
- identifier: Address
columnName: SrcIpAddr
version: 1.0.1
kind: Scheduled
Stages and Predicates
Stage 1: source
Cloudflare
Stage 2: where
| where HttpRequestMethod in~ ('POST', 'PUT')
Stage 3: where
| where tostring(HttpStatusCode) startswith '2'
Stage 4: where
| where DstBytes != 0 or SrcBytes != 0
Stage 5: extend
| extend fe = extract(@'.*(\.\w+)$', 1, ClientRequestURI)
Stage 6: where
| where fe in~ ('.jpg', '.jpeg', '.gif', '.png', '.icon', '.ico', '.xml', '.swf', '.svg', '.ppt', '.pttx', '.doc', '.docx', '.rtf', '.pdf', '.tif', '.zip', '.mov')
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
DstBytes | ne |
| field:"DstBytes" kind:ne value:"0" |
HttpRequestMethod | in |
| field:"HttpRequestMethod" kind:in |
HttpStatusCode | starts_with |
| field:"HttpStatusCode" kind:starts_with value:"2" |
SrcBytes | ne |
| field:"SrcBytes" kind:ne value:"0" |
fe | in |
| field:"fe" kind:in |
Output fields
These fields are emitted when the rule matches.
| Field | Source |
|---|---|
fe | extend |