Detection rules › Sigma
Communication To Uncommon Destination Ports
Detects programs that connect to uncommon destination ports
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Command & Control | T1571 Non-Standard Port |
Event coverage
| Provider | Event | Title |
|---|---|---|
| Sysmon | Event ID 3 | Network connection |
Rule body yaml
title: Communication To Uncommon Destination Ports
id: 6d8c3d20-a5e1-494f-8412-4571d716cf5c
related:
- id: 4b89abaa-99fe-4232-afdd-8f9aa4d20382
type: similar
status: test
description: Detects programs that connect to uncommon destination ports
references:
- https://docs.google.com/spreadsheets/d/17pSTDNpa0sf6pHeRhusvWG6rThciE8CsXTSlDUAZDyo
author: Florian Roth (Nextron Systems)
date: 2017-03-19
modified: 2024-03-12
tags:
- attack.persistence
- attack.command-and-control
- attack.t1571
logsource:
category: network_connection
product: windows
detection:
selection:
Initiated: 'true'
DestinationPort:
- 8080
- 8888
filter_main_local_ranges:
DestinationIp|cidr:
- '127.0.0.0/8'
- '10.0.0.0/8'
- '172.16.0.0/12'
- '192.168.0.0/16'
- '169.254.0.0/16'
- '::1/128' # IPv6 loopback
- 'fe80::/10' # IPv6 link-local addresses
- 'fc00::/7' # IPv6 private addresses
filter_optional_sys_directories:
Image|startswith:
- 'C:\Program Files\'
- 'C:\Program Files (x86)\'
condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
- Unknown
level: medium
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_main_* and not 1 of filter_optional_*Stage 1: selection
selection:
Initiated: 'true'
DestinationPort:
- 8080
- 8888
Stage 2: not filter_main_local_ranges
filter_main_local_ranges:
DestinationIp|cidr:
- '127.0.0.0/8'
- '10.0.0.0/8'
- '172.16.0.0/12'
- '192.168.0.0/16'
- '169.254.0.0/16'
- '::1/128'
- 'fe80::/10'
- 'fc00::/7'
Stage 3: not filter_optional_sys_directories
filter_optional_sys_directories:
Image|startswith:
- 'C:\Program Files\'
- 'C:\Program Files (x86)\'
Exclusions
Top-level NOT(...) conjuncts: predicates this rule actively suppresses.
| Field | Kind | Excluded values |
|---|---|---|
DestinationIp | cidr_match | 10.0.0.0/8 |
DestinationIp | cidr_match | 127.0.0.0/8 |
DestinationIp | cidr_match | 169.254.0.0/16 |
DestinationIp | cidr_match | 172.16.0.0/12 |
DestinationIp | cidr_match | 192.168.0.0/16 |
DestinationIp | cidr_match | ::1/128 |
DestinationIp | cidr_match | fc00::/7 |
DestinationIp | cidr_match | fe80::/10 |
Image | starts_with | C:\Program Files (x86)\ |
Image | starts_with | C:\Program Files\ |
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
DestinationPort | eq |
|
Initiated | eq |
|