Zscaler - ZPA connections from new IP
Id | 24f0779d-3927-403a-aac1-cc8791653606 |
Rulename | Zscaler - ZPA connections from new IP |
Description | Detects ZPA connections from new IP. |
Severity | Medium |
Tactics | InitialAccess |
Techniques | T1078 T1133 |
Required data connectors | CustomLogsAma ZscalerPrivateAccess |
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/ZscalerZPAConnectionsFromNewIP.yaml |
Version | 1.0.1 |
Arm template | 24f0779d-3927-403a-aac1-cc8791653606.json |
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
kind: Scheduled
relevantTechniques:
- T1078
- T1133
description: |
'Detects ZPA connections from new IP.'
queryPeriod: 14d
queryFrequency: 1h
tactics:
- InitialAccess
name: Zscaler - ZPA connections from new IP
requiredDataConnectors:
- connectorId: ZscalerPrivateAccess
dataTypes:
- ZPAEvent
- connectorId: CustomLogsAma
datatypes:
- ZPA_CL
entityMappings:
- entityType: Account
fieldMappings:
- identifier: Name
columnName: AccountCustomEntity
- entityType: IP
fieldMappings:
- identifier: Address
columnName: IPCustomEntity
triggerThreshold: 0
version: 1.0.1
id: 24f0779d-3927-403a-aac1-cc8791653606
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
status: Available
triggerOperator: gt
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Zscaler Private Access (ZPA)/Analytic Rules/ZscalerZPAConnectionsFromNewIP.yaml
severity: Medium
{
"$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.1",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0
},
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
}
]
}