Skip to content

Siemphony is in beta and still being built. How a rule earns its badge.

Siemphony’s repertoire

Remote Desktop listener moved to a non-standard port

Matches the configuration half of this technique — an adversary changing the port a standard protocol listens on — using the process-creation log source AN0633 lists alongside its connection source. The command line must carry both `RDP-Tcp` and `PortNumber`, the WinStations key and value under HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server that hold the Remote Desktop listening port, which is the change MITRE cites from the Conti playbook. Gating on the two strings rather than on an image catches the edit whichever tool performs it — reg.exe, PowerShell Set-ItemProperty, wmic — and needs no registry auditing enabled. The other half of AN0633 is not attempted, and the reason matters. Detecting "a protocol on a port not normally associated with it" needs two things Sigma cannot supply: protocol identification, which Security 5156/5157 does not do — the Filtering Platform records a five-tuple and an image, so HTTPS smuggled over 587 and ordinary mail submission on 587 are the same event there — and a per-organisation port baseline, which is exactly what MITRE's PortThresholds knob describes and what lib/sigma has no aggregation or baselining to express. A hardcoded list of "suspicious" ports would fire on the legitimate service that owns each one, so none is written. Limits of what is here: a port change made through the registry API by a compiled implant, or applied by importing a .reg file (the command line then names the file, not the key), produces no matching command line; a read of the same value matches identically to a write, since a process-creation event carries no notion of either; and only RDP is covered, not SSH, WinRM or a service moved by editing its own config file. Written in the Sysmon EventID 1 vocabulary (Image, CommandLine); where this category is fed by Security EventID 4688 instead, that channel needs *Audit Process Creation* plus the separate *Include command line in process creation events* policy before CommandLine is populated at all. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0227, not hand-written and not tested by its author. Any lab result is on this rule's own page.Full description

The detection

The 4 SIEM queries below are previews produced by Siemphony’s own translator, not pySigma, and none has been executed against a real backend — review before you deploy.

detection.yml

title: Remote Desktop listener moved to a non-standard portid: a8511692-961e-45bf-837c-640fa3b2a36estatus: experimentaldescription: |  Matches the configuration half of this technique — an adversary changing the  port a standard protocol listens on — using the process-creation log source  AN0633 lists alongside its connection source. The command line must carry both  `RDP-Tcp` and `PortNumber`, the WinStations key and value under  HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server that hold the Remote  Desktop listening port, which is the change MITRE cites from the Conti  playbook. Gating on the two strings rather than on an image catches the edit  whichever tool performs it — reg.exe, PowerShell Set-ItemProperty, wmic — and  needs no registry auditing enabled.  The other half of AN0633 is not attempted, and the reason matters. Detecting  "a protocol on a port not normally associated with it" needs two things Sigma  cannot supply: protocol identification, which Security 5156/5157 does not do —  the Filtering Platform records a five-tuple and an image, so HTTPS smuggled  over 587 and ordinary mail submission on 587 are the same event there — and a  per-organisation port baseline, which is exactly what MITRE's PortThresholds  knob describes and what lib/sigma has no aggregation or baselining to express.  A hardcoded list of "suspicious" ports would fire on the legitimate service  that owns each one, so none is written.  Limits of what is here: a port change made through the registry API by a  compiled implant, or applied by importing a .reg file (the command line then  names the file, not the key), produces no matching command line; a read of the  same value matches identically to a write, since a process-creation event  carries no notion of either; and only RDP is covered, not SSH, WinRM or a  service moved by editing its own config file. Written in the Sysmon EventID 1  vocabulary (Image, CommandLine); where this category is fed by Security  EventID 4688 instead, that channel needs *Audit Process Creation* plus the  separate *Include command line in process creation events* policy before  CommandLine is populated at all.  UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0227, not hand-written and not tested by its author. Any lab result is on this rule's own page.references:  - https://attack.mitre.org/techniques/T1571  - https://attack.mitre.org/detectionstrategies/DET0227author: Siemphony pipeline (machine-derived from MITRE ATT&CK v19.2)date: 2026-08-17tags:  - attack.command-and-control  - attack.t1571logsource:  category: process_creation  product: windowsdetection:  selection:    CommandLine|contains|all:      - 'RDP-Tcp'      - 'PortNumber'  condition: selectionfalsepositives:  - "Inventory, compliance and monitoring scripts that read the value back to report which port Remote Desktop is listening on — `reg query` or `Get-ItemProperty` against the same key. They match both substrings without changing anything, and where such a job runs estate-wide it is the top talker by a wide margin, which is what holds this rule at medium."  - "Hardening baselines and build automation that deliberately move Remote Desktop off 3389, including MSP onboarding scripts and imaging task sequences. These are the same command with the same key and value as the abuse case, separated only by who scheduled them, and they fire once on every newly built host."  - "Installers and upgrades for remote-support and remote-access products that reconfigure or restore the Remote Desktop listener port as part of setup."  - "An administrator resolving a port conflict on a host running another service on 3389, or reverting a previous change during a support call."level: medium

Sentinel · KQL

Run this as a search.

DeviceProcessEvents| where (ProcessCommandLine contains "RDP-Tcp" and ProcessCommandLine contains "PortNumber")

Splunk · SPL

Run this as a search.

index=* (CommandLine="*RDP-Tcp*" AND CommandLine="*PortNumber*")

Elastic · ES|QL

Run this as a search.

FROM logs-*| WHERE (TO_LOWER(process.command_line) LIKE "*rdp-tcp*" AND TO_LOWER(process.command_line) LIKE "*portnumber*")

Wazuh · XML rule

Deploy to your manager — this is a rule, not a search.

<group name="sigma,windows,process_creation,">  <!-- Rule ids must be unique on your manager; 100000+ is the user range. -->  <rule id="100000" level="7">    <!-- Set <if_sid> to the decoder/base rule for windows so this only evaluates relevant events. -->    <field name="CommandLine" type="pcre2">(?i)(?=.*(?:RDP-Tcp))(?=.*(?:PortNumber)).*</field>    <description>Remote Desktop listener moved to a non-standard port</description>    <mitre>      <id>T1571</id>    </mitre>  </rule></group>

Verdicts · reactions · comments

Community

Verdicts from engineers who actually deployed it, and the conversation around it.

Log in to react
Not yet reported on

Nobody has run this in a real environment and said what happened.

Verdicts from engineers who deployed it

0 cast

No verdicts reported yet. The first one is worth more than the tenth — say what you ran it against.

Log in to report a verdict.

Log in to join the discussion.

No comments yet. Someone who deploys this will have something to say about it.