Sigma rule: Testing Usage of Uncommonly Used Port
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-269ac1c66cf9, updated 2022-01-23T00:00:00.000Z.
Rule
- Title
- Testing Usage of Uncommonly Used Port
- Status
- test
- Level
- medium
- Author
- frack113
- Date
- 2022-01-23
- File
- rules/windows/powershell/powershell_script/posh_ps_test_netconnection.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
Adversaries may communicate using a protocol and port paring that are typically not associated.
For example, HTTPS over port 8088(Citation: Symantec Elfin Mar 2019) or port 587(Citation: Fortinet Agent Tesla April 2018) as opposed to the traditional port 443.
Log source
- product
- windows
- category
- ps_script
- definition
- Requirements: Script Block Logging must be enabled
Detection
selection:
ScriptBlockText|contains|all:
- Test-NetConnection
- '-ComputerName '
- '-port '
filter:
ScriptBlockText|contains:
- ' 443 '
- ' 80 '
condition: selection and not filterFalse positives (as the rule lists them)
- Legitimate administrative script
Tags
- attack.command-and-control
- attack.t1571
MITRE ATT&CK ids this rule names
References
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1571/T1571.md#atomic-test-1---testing-usage-of-uncommonly-used-port-with-powershell
- https://learn.microsoft.com/en-us/powershell/module/nettcpip/test-netconnection?view=windowsserver2022-ps
Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_test_netconnection.yml
Sources and licences
SigmaHQ
"Testing Usage of Uncommonly Used Port" by frack113 (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_test_netconnection.yml.
Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License
Cite this page
Dragons Eye Ransomware Tracker, "Sigma rule: Testing Usage of Uncommonly Used Port",
entity page, dataset version ref-269ac1c66cf9, updated 2022-01-23T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/adf876b3-f1f8-4aa9-a4e4-a64106feec06 (accessed 2026-11-03).
Underlying source: SigmaHQ rule adf876b3-f1f8-4aa9-a4e4-a64106feec06, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.
Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.