Suspicious Testing Use of Uncommonly Used Port (via ps_script)
This rule detects threat actors may communicate using a protocol and port paring that are usually 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.
SigmamediumWindowsv1
sigma
suspicious-testing-use-of-uncommonly-used-port-via-ps-script
title: Suspicious Testing Use of Uncommonly Used Port (via ps_script)
id: 40ac7bfc-92c5-5db6-9f50-f382822fb90e
status: stable
description: 'This rule detects threat actors may communicate using a protocol and port paring that are usually 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.'
references:
- https://attack.mitre.org/techniques/T1571/
- 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
author: Huntrule Team
date: 2026-06-14
tags:
- attack.command-and-control
- attack.t1571
logsource:
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 filter
falsepositives:
- Unknown
level: medium
Known false positives
- Unknown
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.