Microsoft Sentinel Analytic Rules
cloudbrothers.infoAzure Sentinel RepoToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Port Scan Detected

Back
Id427e4c9e-8cf4-4094-a684-a2d060dbca38
RulenamePort Scan Detected
DescriptionThis alert creates an incident when a source IP addresses attempt to communicate with a large amount of distinct ports within a short period.
SeverityMedium
TacticsDiscovery
TechniquesT1046
Required data connectorsSyslogAma
KindScheduled
Query frequency1h
Query period1h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Sophos XG Firewall/Analytic Rules/PortScanDetected.yaml
Version1.0.4
Arm template427e4c9e-8cf4-4094-a684-a2d060dbca38.json
Deploy To Azure
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
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.'
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Sophos XG Firewall/Analytic Rules/PortScanDetected.yaml
queryFrequency: 1h
version: 1.0.4
requiredDataConnectors:
- datatypes:
  - Syslog
  connectorId: SyslogAma
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  
entityMappings:
- entityType: IP
  fieldMappings:
  - columnName: Src_IP
    identifier: Address
kind: Scheduled
severity: Medium
tactics:
- Discovery
id: 427e4c9e-8cf4-4094-a684-a2d060dbca38
triggerOperator: gt
relevantTechniques:
- T1046
queryPeriod: 1h
name: Port Scan Detected
triggerThreshold: 0