Detection rules › Kusto
Zscaler - Unexpected event count of rejects by policy
'Detects unexpected event count of rejects by policy.'
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Initial Access | T1078 Valid Accounts, T1133 External Remote Services |
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
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.
| Field | Kind | Values |
|---|---|---|
EventResult | match |
|
rejected | gt |
|
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.
| Field | Source |
|---|---|
DstUserName | summarize |
EventResult | summarize |
rejected | summarize |
AccountCustomEntity | extend |