Detection rules › Kusto

Cloudflare - Unexpected POST requests

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

'Detects post requests to unusual extensions.'

MITRE ATT&CK coverage

TacticTechniques
PersistenceT1505 Server Software Component
Command & ControlT1071 Application Layer Protocol

Rule body kusto

id: 7313352a-09f6-4a84-88bd-6f17f1cbeb8f
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

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
DstBytesne
  • 0 transforms: cased
HttpRequestMethodin
  • POST
  • PUT
HttpStatusCodestarts_with
  • 2 transforms: tostring
SrcBytesne
  • 0 transforms: cased
fein
  • .doc
  • .docx
  • .gif
  • .ico
  • .icon
  • .jpeg
  • .jpg
  • .mov
  • .pdf
  • .png
  • .ppt
  • .pttx
  • .rtf
  • .svg
  • .swf
  • .tif
  • .xml
  • .zip

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
feextend