Microsoft Sentinel Analytic Rules
cloudbrothers.infoAzure Sentinel RepoToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Zscaler - ZPA connections outside operational hours

Back
Id2859ad22-46c8-4cc7-ad7b-80ce0cba0af3
RulenameZscaler - ZPA connections outside operational hours
DescriptionDetects ZAP connections outside operational hours.
SeverityMedium
TacticsInitialAccess
TechniquesT1190
T1133
Required data connectorsCustomLogsAma
ZscalerPrivateAccess
KindScheduled
Query frequency1h
Query period1h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Zscaler Private Access (ZPA)/Analytic Rules/ZscalerZPAConnectionsOutsideOperationalHours.yaml
Version1.0.1
Arm template2859ad22-46c8-4cc7-ad7b-80ce0cba0af3.json
Deploy To Azure
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
relevantTechniques:
- T1190
- T1133
name: Zscaler - ZPA connections outside operational hours
requiredDataConnectors:
- dataTypes:
  - ZPAEvent
  connectorId: ZscalerPrivateAccess
- datatypes:
  - ZPA_CL
  connectorId: CustomLogsAma
entityMappings:
- fieldMappings:
  - identifier: Name
    columnName: AccountCustomEntity
  entityType: Account
triggerThreshold: 0
id: 2859ad22-46c8-4cc7-ad7b-80ce0cba0af3
tactics:
- InitialAccess
version: 1.0.1
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Zscaler Private Access (ZPA)/Analytic Rules/ZscalerZPAConnectionsOutsideOperationalHours.yaml
queryPeriod: 1h
kind: Scheduled
queryFrequency: 1h
severity: Medium
status: Available
description: |
    'Detects ZAP connections outside operational hours.'
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  
triggerOperator: gt
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "apiVersion": "2024-01-01-preview",
      "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/2859ad22-46c8-4cc7-ad7b-80ce0cba0af3')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/2859ad22-46c8-4cc7-ad7b-80ce0cba0af3')]",
      "properties": {
        "alertRuleTemplateName": "2859ad22-46c8-4cc7-ad7b-80ce0cba0af3",
        "customDetails": null,
        "description": "'Detects ZAP connections outside operational hours.'\n",
        "displayName": "Zscaler - ZPA connections outside operational hours",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "Account",
            "fieldMappings": [
              {
                "columnName": "AccountCustomEntity",
                "identifier": "Name"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Zscaler Private Access (ZPA)/Analytic Rules/ZscalerZPAConnectionsOutsideOperationalHours.yaml",
        "query": "ZPAEvent \n| where DvcAction == 'open'\n| where datetime_part(\"Hour\", todatetime(LogTimestamp)) between (datetime_part(\"Hour\", todatetime('19:01:00.7654321')) .. datetime_part(\"Hour\", todatetime('08:01:00.7654321')))\n| summarize count() by DstUserName \n| project DstUserName\n| extend AccountCustomEntity = DstUserName\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "PT1H",
        "severity": "Medium",
        "status": "Available",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "InitialAccess"
        ],
        "techniques": [
          "T1133",
          "T1190"
        ],
        "templateVersion": "1.0.1",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}