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 IP

Back
Id24f0779d-3927-403a-aac1-cc8791653606
RulenameZscaler - ZPA connections from new IP
DescriptionDetects ZPA connections from new IP.
SeverityMedium
TacticsInitialAccess
TechniquesT1078
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/ZscalerZPAConnectionsFromNewIP.yaml
Version1.0.2
Arm template24f0779d-3927-403a-aac1-cc8791653606.json
Deploy To Azure
let listIPs =
ZPAEvent 
| where TimeGenerated > ago(14d)
| where DvcAction == 'open'
| summarize ListofIPs = make_set(SrcIpAddr) by DstUserName
| project ListofIPs;
ZPAEvent
| where isnotempty(SrcIpAddr)
| where SrcIpAddr !in (listIPs)
| summarize EventCount = count() by DstUserName, SrcIpAddr
| project-away EventCount
| extend IPCustomEntity = SrcIpAddr, AccountCustomEntity = DstUserName
entityMappings:
- entityType: Account
  fieldMappings:
  - identifier: Name
    columnName: AccountCustomEntity
- entityType: IP
  fieldMappings:
  - identifier: Address
    columnName: IPCustomEntity
queryFrequency: 1h
name: Zscaler - ZPA connections from new IP
kind: Scheduled
tactics:
- InitialAccess
triggerThreshold: 0
query: |
  let listIPs =
  ZPAEvent 
  | where TimeGenerated > ago(14d)
  | where DvcAction == 'open'
  | summarize ListofIPs = make_set(SrcIpAddr) by DstUserName
  | project ListofIPs;
  ZPAEvent
  | where isnotempty(SrcIpAddr)
  | where SrcIpAddr !in (listIPs)
  | summarize EventCount = count() by DstUserName, SrcIpAddr
  | project-away EventCount
  | extend IPCustomEntity = SrcIpAddr, AccountCustomEntity = DstUserName  
relevantTechniques:
- T1078
- T1133
triggerOperator: gt
queryPeriod: 14d
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Zscaler Private Access (ZPA)/Analytic Rules/ZscalerZPAConnectionsFromNewIP.yaml
severity: Medium
status: Available
id: 24f0779d-3927-403a-aac1-cc8791653606
requiredDataConnectors:
- connectorId: CustomLogsAma
  datatypes:
  - ZPA_CL
version: 1.0.2
description: |
    'Detects ZPA connections from new IP.'
{
  "$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/24f0779d-3927-403a-aac1-cc8791653606')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/24f0779d-3927-403a-aac1-cc8791653606')]",
      "properties": {
        "alertRuleTemplateName": "24f0779d-3927-403a-aac1-cc8791653606",
        "customDetails": null,
        "description": "'Detects ZPA connections from new IP.'\n",
        "displayName": "Zscaler - ZPA connections from new IP",
        "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/ZscalerZPAConnectionsFromNewIP.yaml",
        "query": "let listIPs =\nZPAEvent \n| where TimeGenerated > ago(14d)\n| where DvcAction == 'open'\n| summarize ListofIPs = make_set(SrcIpAddr) by DstUserName\n| project ListofIPs;\nZPAEvent\n| where isnotempty(SrcIpAddr)\n| where SrcIpAddr !in (listIPs)\n| summarize EventCount = count() by DstUserName, SrcIpAddr\n| project-away EventCount\n| extend IPCustomEntity = SrcIpAddr, AccountCustomEntity = DstUserName\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "P14D",
        "severity": "Medium",
        "status": "Available",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "InitialAccess"
        ],
        "techniques": [
          "T1078",
          "T1133"
        ],
        "templateVersion": "1.0.2",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}