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 from new country

Back
Idc4902121-7a7e-44d1-810b-88d26db622ff
RulenameZscaler - ZPA connections from new country
DescriptionDetects ZPA connections from new country.
SeverityMedium
TacticsInitialAccess
TechniquesT1190
T1133
Required data connectorsCustomLogsAma
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/ZscalerZPAConnectionsFromNewCountry.yaml
Version1.0.2
Arm templatec4902121-7a7e-44d1-810b-88d26db622ff.json
Deploy To Azure
let listCountries =
ZPAEvent 
| where TimeGenerated > ago(14d)
| where DvcAction == 'open'
| summarize ListofCountries = make_set(SrcGeoCountry) by DstUserName
| project ListofCountries;
ZPAEvent
| where isnotempty(SrcGeoCountry)
| where SrcGeoCountry !in (listCountries)
| summarize EventCount = count() by DstUserName, SrcGeoCountry
| project-away EventCount
| extend AccountCustomEntity = DstUserName
entityMappings:
- entityType: Account
  fieldMappings:
  - identifier: Name
    columnName: AccountCustomEntity
queryFrequency: 1h
name: Zscaler - ZPA connections from new country
kind: Scheduled
tactics:
- InitialAccess
triggerThreshold: 0
query: |
  let listCountries =
  ZPAEvent 
  | where TimeGenerated > ago(14d)
  | where DvcAction == 'open'
  | summarize ListofCountries = make_set(SrcGeoCountry) by DstUserName
  | project ListofCountries;
  ZPAEvent
  | where isnotempty(SrcGeoCountry)
  | where SrcGeoCountry !in (listCountries)
  | summarize EventCount = count() by DstUserName, SrcGeoCountry
  | project-away EventCount
  | extend AccountCustomEntity = DstUserName  
relevantTechniques:
- T1190
- T1133
triggerOperator: gt
queryPeriod: 14d
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Zscaler Private Access (ZPA)/Analytic Rules/ZscalerZPAConnectionsFromNewCountry.yaml
severity: Medium
status: Available
id: c4902121-7a7e-44d1-810b-88d26db622ff
requiredDataConnectors:
- connectorId: CustomLogsAma
  datatypes:
  - ZPA_CL
version: 1.0.2
description: |
    'Detects ZPA connections from new country.'
{
  "$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/c4902121-7a7e-44d1-810b-88d26db622ff')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/c4902121-7a7e-44d1-810b-88d26db622ff')]",
      "properties": {
        "alertRuleTemplateName": "c4902121-7a7e-44d1-810b-88d26db622ff",
        "customDetails": null,
        "description": "'Detects ZPA connections from new country.'\n",
        "displayName": "Zscaler - ZPA connections from new country",
        "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/ZscalerZPAConnectionsFromNewCountry.yaml",
        "query": "let listCountries =\nZPAEvent \n| where TimeGenerated > ago(14d)\n| where DvcAction == 'open'\n| summarize ListofCountries = make_set(SrcGeoCountry) by DstUserName\n| project ListofCountries;\nZPAEvent\n| where isnotempty(SrcGeoCountry)\n| where SrcGeoCountry !in (listCountries)\n| summarize EventCount = count() by DstUserName, SrcGeoCountry\n| project-away EventCount\n| extend AccountCustomEntity = DstUserName\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "P14D",
        "severity": "Medium",
        "status": "Available",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "InitialAccess"
        ],
        "techniques": [
          "T1133",
          "T1190"
        ],
        "templateVersion": "1.0.2",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}