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 connectorsZscalerPrivateAccess
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.0
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
status: Available
id: 2859ad22-46c8-4cc7-ad7b-80ce0cba0af3
name: Zscaler - ZPA connections outside operational hours
requiredDataConnectors:
- connectorId: ZscalerPrivateAccess
  dataTypes:
  - ZPAEvent
severity: Medium
triggerThreshold: 0
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Zscaler Private Access (ZPA)/Analytic Rules/ZscalerZPAConnectionsOutsideOperationalHours.yaml
kind: Scheduled
description: |
    'Detects ZAP connections outside operational hours.'
relevantTechniques:
- T1190
- T1133
queryPeriod: 1h
triggerOperator: gt
queryFrequency: 1h
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  
version: 1.0.0
tactics:
- InitialAccess
entityMappings:
- fieldMappings:
  - identifier: Name
    columnName: AccountCustomEntity
  entityType: Account
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "apiVersion": "2023-02-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",
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "InitialAccess"
        ],
        "techniques": [
          "T1133",
          "T1190"
        ],
        "templateVersion": "1.0.0",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}