Microsoft Sentinel Analytic Rules
cloudbrothers.infoAzure Sentinel RepoToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Zscaler - Forbidden countries

Back
Idb3d112b4-3e1e-11ec-9bbc-0242ac130002
RulenameZscaler - Forbidden countries
DescriptionDetects suspicious ZPA connections from forbidden countries.
SeverityHigh
TacticsInitialAccess
TechniquesT1190
T1133
Required data connectorsCustomLogsAma
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/ZscalerUnexpectedCountries.yaml
Version1.0.2
Arm templateb3d112b4-3e1e-11ec-9bbc-0242ac130002.json
Deploy To Azure
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"
    }
  ]
}