Detection rules › Kusto

Cisco WSA - Unexpected uploads

Status
available
Severity
high
Time window
10m
Group by
AmpFileName, SrcUserName
Source
github.com/Azure/Azure-Sentinel

'Detects unexpected file uploads.'

MITRE ATT&CK coverage

TacticTechniques
ExfiltrationT1567 Exfiltration Over Web Service

Rule body kusto

id: 32c460ad-2d40-43e9-8ead-5cdd1d7a3163
name: Cisco WSA - Unexpected uploads
description: |
  'Detects unexpected file uploads.'
severity: High
status: Available
requiredDataConnectors:
  - connectorId: SyslogAma
    datatypes:
      - Syslog
queryFrequency: 1h
queryPeriod: 1h
triggerOperator: gt
triggerThreshold: 0
tactics:
  - Exfiltration
relevantTechniques:
  - T1567
query: |
  let f_cnt_upload_threshold = 5;
  let f_upload_size_threshold = 5000000;
  CiscoWSAEvent
  | where HttpRequestMethod in~ ('POST', 'PUT')
  | where isnotempty(AmpFileName)
  | where UrlCategory in~ ('IW_fts', 'IW_osb')
  | where DstBytes > f_upload_size_threshold
  | summarize count() by AmpFileName, SrcUserName, bin(TimeGenerated, 10m)
  | where count_ >= f_cnt_upload_threshold
  | extend AccountCustomEntity = SrcUserName
entityMappings:
  - entityType: Account
    fieldMappings:
      - identifier: Name
        columnName: AccountCustomEntity
version: 1.0.3
kind: Scheduled

Stages and Predicates

Parameters

let f_cnt_upload_threshold = 5;
let f_upload_size_threshold = 5000000;

Stage 1: source

CiscoWSAEvent

Stage 2: where

| where HttpRequestMethod in~ ('POST', 'PUT')

Stage 3: where

| where isnotempty(AmpFileName)

Stage 4: where

| where UrlCategory in~ ('IW_fts', 'IW_osb')

Stage 5: where

| where DstBytes > f_upload_size_threshold

Stage 6: summarize

| summarize count() by AmpFileName, SrcUserName, bin(TimeGenerated, 10m)

Stage 7: where

| where count_ >= f_cnt_upload_threshold

Stage 8: extend

| extend AccountCustomEntity = SrcUserName

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
AmpFileNameis_not_null
  • (no value, null check)
DstBytesgt
  • 5000000 transforms: cased
HttpRequestMethodin
  • POST
  • PUT
UrlCategoryin
  • IW_fts
  • IW_osb
count_ge
  • 5 transforms: cased

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
AmpFileNamesummarize
SrcUserNamesummarize
AccountCustomEntityextend