Zscaler - Forbidden countries
Id | b3d112b4-3e1e-11ec-9bbc-0242ac130002 |
Rulename | Zscaler - Forbidden countries |
Description | Detects suspicious ZPA connections from forbidden countries. |
Severity | High |
Tactics | InitialAccess |
Techniques | T1190 T1133 |
Required data connectors | CustomLogsAma |
Kind | Scheduled |
Query frequency | 1h |
Query period | 1h |
Trigger threshold | 0 |
Trigger operator | gt |
Source Uri | https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Zscaler Private Access (ZPA)/Analytic Rules/ZscalerUnexpectedCountries.yaml |
Version | 1.0.2 |
Arm template | b3d112b4-3e1e-11ec-9bbc-0242ac130002.json |
let bl_countries = dynamic(['CH', 'RU']); //List of countries from which you do not expect connections
ZPAEvent
| where DvcAction == 'open'
| where SrcGeoCountry in~ (bl_countries)
| extend IPCustomEntity = SrcIpAddr, AccountCustomEntity = DstUserName
entityMappings:
- entityType: Account
fieldMappings:
- identifier: Name
columnName: AccountCustomEntity
- entityType: IP
fieldMappings:
- identifier: Address
columnName: IPCustomEntity
queryFrequency: 1h
name: Zscaler - Forbidden countries
kind: Scheduled
tactics:
- InitialAccess
triggerThreshold: 0
query: |
let bl_countries = dynamic(['CH', 'RU']); //List of countries from which you do not expect connections
ZPAEvent
| where DvcAction == 'open'
| where SrcGeoCountry in~ (bl_countries)
| extend IPCustomEntity = SrcIpAddr, AccountCustomEntity = DstUserName
relevantTechniques:
- T1190
- T1133
triggerOperator: gt
queryPeriod: 1h
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Zscaler Private Access (ZPA)/Analytic Rules/ZscalerUnexpectedCountries.yaml
severity: High
status: Available
id: b3d112b4-3e1e-11ec-9bbc-0242ac130002
requiredDataConnectors:
- connectorId: CustomLogsAma
datatypes:
- ZPA_CL
version: 1.0.2
description: |
'Detects suspicious ZPA connections from forbidden countries.'
{
"$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/b3d112b4-3e1e-11ec-9bbc-0242ac130002')]",
"kind": "Scheduled",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/b3d112b4-3e1e-11ec-9bbc-0242ac130002')]",
"properties": {
"alertRuleTemplateName": "b3d112b4-3e1e-11ec-9bbc-0242ac130002",
"customDetails": null,
"description": "'Detects suspicious ZPA connections from forbidden countries.'\n",
"displayName": "Zscaler - Forbidden countries",
"enabled": true,
"entityMappings": [
{
"entityType": "Account",
"fieldMappings": [
{
"columnName": "AccountCustomEntity",
"identifier": "Name"
}
]
},
{
"entityType": "IP",
"fieldMappings": [
{
"columnName": "IPCustomEntity",
"identifier": "Address"
}
]
}
],
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Zscaler Private Access (ZPA)/Analytic Rules/ZscalerUnexpectedCountries.yaml",
"query": "let bl_countries = dynamic(['CH', 'RU']); //List of countries from which you do not expect connections\nZPAEvent \n| where DvcAction == 'open'\n| where SrcGeoCountry in~ (bl_countries)\n| extend IPCustomEntity = SrcIpAddr, AccountCustomEntity = DstUserName\n",
"queryFrequency": "PT1H",
"queryPeriod": "PT1H",
"severity": "High",
"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"
}
]
}