Detection rules › Kusto

PaloAlto - Possible port scan

Status
available
Severity
high
Time window
5m
Group by
SrcIpAddr
Source
github.com/Azure/Azure-Sentinel

'Detects possible port scan.'

MITRE ATT&CK coverage

TacticTechniques
Reconnaissance

Rule body

id: 3575a9c0-51c9-11ec-bf63-0242ac130002
name: PaloAlto - Possible port scan
description: |
  'Detects possible port scan.'
severity: High
status: Available
requiredDataConnectors:
  - connectorId: CefAma
    dataTypes:
      - CommonSecurityLog
queryFrequency: 1h
queryPeriod: 1h
triggerOperator: gt
triggerThreshold: 0
tactics:
  - Reconnaissance
relevantTechniques:
  - T1595
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
entityMappings:
  - entityType: IP
    fieldMappings:
      - identifier: Address
        columnName: IPCustomEntity
version: 1.0.4
kind: Scheduled

Stages and Predicates

Parameters

let threshold = 10;

Stage 1: source

PaloAltoCDLEvent

Stage 2: where

| where EventResourceId =~ 'TRAFFIC'

Stage 3: where

| where isnotempty(DstPortNumber) and isnotempty(SrcIpAddr)

Stage 4: summarize

| summarize PortSet = make_set(DstPortNumber) by SrcIpAddr, bin(TimeGenerated, 5m)

Stage 5: where

| where array_length(PortSet) > threshold

Stage 6: extend

| extend IPCustomEntity = SrcIpAddr

Indicators

These rows show field, operator, and value matches.

Output fields

These fields are emitted when the rule matches.

FieldSource
PortSetsummarize
SrcIpAddrsummarize
IPCustomEntityextend