Zscaler - ZPA connections from new country
Id | c4902121-7a7e-44d1-810b-88d26db622ff |
Rulename | Zscaler - ZPA connections from new country |
Description | Detects ZPA connections from new country. |
Severity | Medium |
Tactics | InitialAccess |
Techniques | T1190 T1133 |
Required data connectors | CustomLogsAma |
Kind | Scheduled |
Query frequency | 1h |
Query period | 14d |
Trigger threshold | 0 |
Trigger operator | gt |
Source Uri | https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Zscaler Private Access (ZPA)/Analytic Rules/ZscalerZPAConnectionsFromNewCountry.yaml |
Version | 1.0.2 |
Arm template | c4902121-7a7e-44d1-810b-88d26db622ff.json |
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"
}
]
}