let threshold = 10;
PaloAltoCDLEvent
| where EventResourceId =~ 'TRAFFIC'
| where isnotempty(DstPortNumber) and isnotempty(SrcIpAddr)
| summarize PortSet = make_set(DstPortNumber) by SrcIpAddr, bin(TimeGenerated, 5m)
| where array_length(PortSet) > threshold
| extend IPCustomEntity = SrcIpAddr
version: 1.0.4
id: 3575a9c0-51c9-11ec-bf63-0242ac130002
relevantTechniques:
- T1595
requiredDataConnectors:
- connectorId: CefAma
dataTypes:
- CommonSecurityLog
triggerOperator: gt
entityMappings:
- fieldMappings:
- columnName: IPCustomEntity
identifier: Address
entityType: IP
name: PaloAlto - Possible port scan
queryFrequency: 1h
triggerThreshold: 0
description: |
'Detects possible port scan.'
status: Available
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/PaloAltoCDL/Analytic Rules/PaloAltoCDLPossiblePortScan.yaml
queryPeriod: 1h
severity: High
kind: Scheduled
tactics:
- Reconnaissance
query: |
let threshold = 10;
PaloAltoCDLEvent
| where EventResourceId =~ 'TRAFFIC'
| where isnotempty(DstPortNumber) and isnotempty(SrcIpAddr)
| summarize PortSet = make_set(DstPortNumber) by SrcIpAddr, bin(TimeGenerated, 5m)
| where array_length(PortSet) > threshold
| extend IPCustomEntity = SrcIpAddr