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 by new user

Back
Id236a7ec1-0120-40f2-a157-c1a72dde8bcb
RulenameZscaler - ZPA connections by new user
DescriptionDetects ZPA connections by new user.
SeverityMedium
TacticsPersistence
TechniquesT1078
Required data connectorsCustomLogsAma
ZscalerPrivateAccess
KindScheduled
Query frequency1h
Query period14d
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Zscaler Private Access (ZPA)/Analytic Rules/ZscalerZPAConnectionsByNewUser.yaml
Version1.0.1
Arm template236a7ec1-0120-40f2-a157-c1a72dde8bcb.json
Deploy To Azure
let listUsers =
ZPAEvent 
| where TimeGenerated > ago(14d)
| where DvcAction == 'open'
| summarize ListofUsers = make_set(DstUserName) by DstUserName
| project ListofUsers;
ZPAEvent
| where DstUserName !in (listUsers)
| summarize EventCount = count() by DstUserName
| project-away EventCount
| extend AccountCustomEntity = DstUserName
relevantTechniques:
- T1078
name: Zscaler - ZPA connections by new user
requiredDataConnectors:
- dataTypes:
  - ZPAEvent
  connectorId: ZscalerPrivateAccess
- datatypes:
  - ZPA_CL
  connectorId: CustomLogsAma
entityMappings:
- fieldMappings:
  - identifier: Name
    columnName: AccountCustomEntity
  entityType: Account
triggerThreshold: 0
id: 236a7ec1-0120-40f2-a157-c1a72dde8bcb
tactics:
- Persistence
version: 1.0.1
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Zscaler Private Access (ZPA)/Analytic Rules/ZscalerZPAConnectionsByNewUser.yaml
queryPeriod: 14d
kind: Scheduled
queryFrequency: 1h
severity: Medium
status: Available
description: |
    'Detects ZPA connections by new user.'
query: |
  let listUsers =
  ZPAEvent 
  | where TimeGenerated > ago(14d)
  | where DvcAction == 'open'
  | summarize ListofUsers = make_set(DstUserName) by DstUserName
  | project ListofUsers;
  ZPAEvent
  | where DstUserName !in (listUsers)
  | summarize EventCount = count() by DstUserName
  | project-away EventCount
  | 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/236a7ec1-0120-40f2-a157-c1a72dde8bcb')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/236a7ec1-0120-40f2-a157-c1a72dde8bcb')]",
      "properties": {
        "alertRuleTemplateName": "236a7ec1-0120-40f2-a157-c1a72dde8bcb",
        "customDetails": null,
        "description": "'Detects ZPA connections by new user.'\n",
        "displayName": "Zscaler - ZPA connections by new user",
        "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/ZscalerZPAConnectionsByNewUser.yaml",
        "query": "let listUsers =\nZPAEvent \n| where TimeGenerated > ago(14d)\n| where DvcAction == 'open'\n| summarize ListofUsers = make_set(DstUserName) by DstUserName\n| project ListofUsers;\nZPAEvent\n| where DstUserName !in (listUsers)\n| summarize EventCount = count() by DstUserName\n| project-away EventCount\n| extend AccountCustomEntity = DstUserName\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "P14D",
        "severity": "Medium",
        "status": "Available",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "Persistence"
        ],
        "techniques": [
          "T1078"
        ],
        "templateVersion": "1.0.1",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}