Detection rules › Kusto

Zscaler - Unexpected event count of rejects by policy

Status
available
Severity
high
Time window
1h
Group by
DstUserName, EventResult
Source
github.com/Azure/Azure-Sentinel

'Detects unexpected event count of rejects by policy.'

MITRE ATT&CK coverage

Rule body kusto

id: 593e3e2a-43ce-11ec-81d3-0242ac130003
name: Zscaler - Unexpected event count of rejects by policy
description: |
  'Detects unexpected event count of rejects by policy.'
severity: High
status: Available
requiredDataConnectors:
  - connectorId: CustomLogsAma
    datatypes:
      - ZPA_CL
queryFrequency: 1h
queryPeriod: 1h
triggerOperator: gt
triggerThreshold: 0
tactics:
  - InitialAccess
relevantTechniques:
  - T1078
  - T1133
query: |
  let threshold = 1000;
  ZPAEvent
  | where EventResult has "REJECTED_BY_POLICY"
  | summarize rejected = count() by EventResult, DstUserName
  | where rejected > threshold
  | extend AccountCustomEntity = DstUserName
entityMappings:
  - entityType: Account
    fieldMappings:
      - identifier: Name
        columnName: AccountCustomEntity
version: 1.0.2
kind: Scheduled

Stages and Predicates

Parameters

let threshold = 1000;

Stage 1: source

ZPAEvent

Stage 2: where

| where EventResult has "REJECTED_BY_POLICY"

Stage 3: summarize

| summarize rejected = count() by EventResult, DstUserName
Threshold
gt 1000

Stage 4: where

| where rejected > threshold

Stage 5: extend

| extend AccountCustomEntity = DstUserName

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
EventResultmatch
  • REJECTED_BY_POLICY transforms: term
rejectedgt
  • 1000 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
DstUserNamesummarize
EventResultsummarize
rejectedsummarize
AccountCustomEntityextend