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
ZscalerPrivateAccess
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.1
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
relevantTechniques:
- T1190
- T1133
name: Zscaler - Forbidden countries
requiredDataConnectors:
- dataTypes:
  - ZPAEvent
  connectorId: ZscalerPrivateAccess
- datatypes:
  - ZPA_CL
  connectorId: CustomLogsAma
entityMappings:
- fieldMappings:
  - identifier: Name
    columnName: AccountCustomEntity
  entityType: Account
- fieldMappings:
  - identifier: Address
    columnName: IPCustomEntity
  entityType: IP
triggerThreshold: 0
id: b3d112b4-3e1e-11ec-9bbc-0242ac130002
tactics:
- InitialAccess
version: 1.0.1
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Zscaler Private Access (ZPA)/Analytic Rules/ZscalerUnexpectedCountries.yaml
queryPeriod: 1h
kind: Scheduled
queryFrequency: 1h
severity: High
status: Available
description: |
    'Detects suspicious ZPA connections from forbidden countries.'
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  
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/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.1",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}