Detection rules › Kusto

Zscaler - ZPA connections outside operational hours

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

'Detects ZAP connections outside operational hours.'

MITRE ATT&CK coverage

Rule body kusto

id: 2859ad22-46c8-4cc7-ad7b-80ce0cba0af3
name: Zscaler - ZPA connections outside operational hours
description: |
  'Detects ZAP connections outside operational hours.'
severity: Medium
status: Available
requiredDataConnectors:
  - connectorId: CustomLogsAma
    datatypes:
      - ZPA_CL
queryFrequency: 1h
queryPeriod: 1h
triggerOperator: gt
triggerThreshold: 0
tactics:
  - InitialAccess
relevantTechniques:
  - T1190
  - T1133
query: |
  ZPAEvent 
  | where DvcAction == 'open'
  | where datetime_part("Hour", todatetime(LogTimestamp)) between (datetime_part("Hour", todatetime('19:01:00.7654321')) .. datetime_part("Hour", todatetime('08:01:00.7654321')))
  | summarize count() by DstUserName 
  | project DstUserName
  | extend AccountCustomEntity = DstUserName
entityMappings:
  - entityType: Account
    fieldMappings:
      - identifier: Name
        columnName: AccountCustomEntity
version: 1.0.2
kind: Scheduled

Stages and Predicates

Stage 1: source

ZPAEvent

Stage 2: where

| where DvcAction == 'open'

Stage 3: where

| where datetime_part("Hour", todatetime(LogTimestamp)) between (datetime_part("Hour", todatetime('19:01:00.7654321')) .. datetime_part("Hour", todatetime('08:01:00.7654321')))

Stage 4: summarize

| summarize count() by DstUserName

Stage 5: project

| project DstUserName

Stage 6: 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
DvcActioneq
  • open 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
DstUserNameproject
AccountCustomEntityextend