let threshold = 50;
SophosXGFirewall
| where Log_Type =~ "Firewall"
| where not(ipv4_is_match("10.0.0.0",Src_IP,8) or ipv4_is_match("172.16.0.0",Src_IP,12) or ipv4_is_match("192.168.0.0",Src_IP,16))
| summarize dcount(Dst_Port) by Src_IP, bin(TimeGenerated, 5m)
| where dcount_Dst_Port > threshold
entityMappings:
- entityType: IP
fieldMappings:
- identifier: Address
columnName: Src_IP
tactics:
- Discovery
requiredDataConnectors:
- datatypes:
- Syslog
connectorId: SyslogAma
id: 427e4c9e-8cf4-4094-a684-a2d060dbca38
severity: Medium
status: Available
query: |
let threshold = 50;
SophosXGFirewall
| where Log_Type =~ "Firewall"
| where not(ipv4_is_match("10.0.0.0",Src_IP,8) or ipv4_is_match("172.16.0.0",Src_IP,12) or ipv4_is_match("192.168.0.0",Src_IP,16))
| summarize dcount(Dst_Port) by Src_IP, bin(TimeGenerated, 5m)
| where dcount_Dst_Port > threshold
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Sophos XG Firewall/Analytic Rules/PortScanDetected.yaml
kind: Scheduled
queryPeriod: 1h
version: 1.0.4
name: Port Scan Detected
queryFrequency: 1h
triggerThreshold: 0
relevantTechniques:
- T1046
description: |
'This alert creates an incident when a source IP addresses attempt to communicate with a large amount of distinct ports within a short period.'
triggerOperator: gt