MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Initial Access | T1078 Valid Accounts, T1133 External Remote Services |
Rule body kusto
id: 24f0779d-3927-403a-aac1-cc8791653606
name: Zscaler - ZPA connections from new IP
description: |
'Detects ZPA connections from new IP.'
severity: Medium
status: Available
requiredDataConnectors:
- connectorId: CustomLogsAma
datatypes:
- ZPA_CL
queryFrequency: 1h
queryPeriod: 14d
triggerOperator: gt
triggerThreshold: 0
tactics:
- InitialAccess
relevantTechniques:
- T1078
- T1133
query: |
let listIPs =
ZPAEvent
| where TimeGenerated > ago(14d)
| where DvcAction == 'open'
| summarize ListofIPs = make_set(SrcIpAddr) by DstUserName
| project ListofIPs;
ZPAEvent
| where isnotempty(SrcIpAddr)
| where SrcIpAddr !in (listIPs)
| summarize EventCount = count() by DstUserName, SrcIpAddr
| project-away EventCount
| extend IPCustomEntity = SrcIpAddr, AccountCustomEntity = DstUserName
entityMappings:
- entityType: Account
fieldMappings:
- identifier: Name
columnName: AccountCustomEntity
- entityType: IP
fieldMappings:
- identifier: Address
columnName: IPCustomEntity
version: 1.0.2
kind: Scheduled
Stages and Predicates
Let binding: listIPs
let listIPs = ZPAEvent
| where TimeGenerated > ago(14d)
| where DvcAction == 'open'
| summarize ListofIPs = make_set(SrcIpAddr) by DstUserName
| project ListofIPs;
Stage 1: source
ZPAEvent
Stage 2: where
| where isnotempty(SrcIpAddr)
Stage 3: where
| where SrcIpAddr !in (listIPs)
References listIPs (defined above).
Stage 4: summarize
| summarize EventCount = count() by DstUserName, SrcIpAddr
Stage 5: project-away
| project-away EventCount
Stage 6: extend
| extend IPCustomEntity = SrcIpAddr, AccountCustomEntity = DstUserName
Exclusions
Top-level NOT(...) conjuncts: predicates this rule actively suppresses.
| Field | Kind | Excluded values |
|---|---|---|
SrcIpAddr | eq | listIPs |
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 |
|---|---|---|
SrcIpAddr | is_not_null |
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 |
SrcIpAddr | summarize |
AccountCustomEntity | extend |
IPCustomEntity | extend |