Skip to content

Siemphony is in beta and still being built. What ships today, and what does not.

Siemphony’s repertoire

RDP connection history or firewall state cleared via command line

Siemphony@siemphonylowT1070.007unverified
Matches process creation where a command line removes one of the artefacts that records an inbound or outbound remote-desktop connection, or wipes the local firewall configuration that would show the listener or rule an operator added. The first arm pairs an artefact gate — the `Terminal Server Client` registry path and cache folder, or a `Default.rdp` file — with a removal verb (`reg delete`, `Remove-Item`, `del`, `rd`, `rmdir`), because either half alone is far too common to stand on its own: the paths are read constantly by the RDP client itself, and the verbs appear in most maintenance scripts ever written. The second arm gates `netsh.exe` on `advfirewall` and then on a destructive sub-command (` reset` or `delete rule`), so ordinary `netsh advfirewall show` and `add rule` traffic does not match. The verbs are matched as substrings, so an unrelated token in the same command line can satisfy the verb gate; the artefact gate is what keeps that rare. MITRE's `TargetPathRegex` knob names the `Terminal Server Client` and `Default.rdp` paths; the verb and sub-command lists are authored here. The rule is written in the Sysmon EventID 1 vocabulary the brief names — `Image` and `CommandLine`. A Security 4688 feed carries the same behaviour under `NewProcessName`, and needs both Audit Process Creation and the separate Include command line in process creation events policy before `CommandLine` is populated at all, so 4688 cannot be substituted without a field mapping first; the brief's other legs (Security 4663 mapped onto `file_event`, and 4670/4656 on the raw security service) are likewise separate feeds with their own field names and are not combined here. Deletion performed through an API — `RegDeleteKey` from compiled code, a `.reg` import, or a firewall change via the `NetSecurity` COM/WMI provider — never reaches a command line and is invisible to this rule, and clearing the TerminalServices event channels themselves belongs to T1070.001 rather than here. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0049, 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

Sentinel · KQL

Run this as a search.

DeviceProcessEvents| where (((ProcessCommandLine contains "Terminal Server Client" or ProcessCommandLine contains "Default.rdp") and (ProcessCommandLine contains " delete " or ProcessCommandLine contains "del " or ProcessCommandLine contains "rd " or ProcessCommandLine contains "rmdir " or ProcessCommandLine contains "Remove-Item")) or ((FolderPath endswith "\\netsh.exe" and ProcessCommandLine contains "advfirewall") and (ProcessCommandLine contains " reset" or ProcessCommandLine contains "delete rule")))

Splunk · SPL

Run this as a search.

index=* (((CommandLine="*Terminal Server Client*" OR CommandLine="*Default.rdp*") AND (CommandLine="* delete *" OR CommandLine="*del *" OR CommandLine="*rd *" OR CommandLine="*rmdir *" OR CommandLine="*Remove-Item*")) OR ((Image="*\\netsh.exe" AND CommandLine="*advfirewall*") AND (CommandLine="* reset*" OR CommandLine="*delete rule*")))

Elastic · ES|QL

Run this as a search.

FROM logs-*| WHERE (((TO_LOWER(process.command_line) LIKE "*terminal server client*" OR TO_LOWER(process.command_line) LIKE "*default.rdp*") AND (TO_LOWER(process.command_line) LIKE "* delete *" OR TO_LOWER(process.command_line) LIKE "*del *" OR TO_LOWER(process.command_line) LIKE "*rd *" OR TO_LOWER(process.command_line) LIKE "*rmdir *" OR TO_LOWER(process.command_line) LIKE "*remove-item*")) OR ((TO_LOWER(process.executable) LIKE "*\\\\netsh.exe" AND TO_LOWER(process.command_line) LIKE "*advfirewall*") AND (TO_LOWER(process.command_line) LIKE "* reset*" OR TO_LOWER(process.command_line) LIKE "*delete rule*")))

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. -->  <!-- 2 rules: the Sigma condition ORs across different fields,       which one rule cannot express. Any one matching is a hit. -->  <rule id="100000" level="5">    <!-- Set <if_sid> to the decoder/base rule for windows so this only evaluates relevant events. -->    <field name="CommandLine" type="pcre2">(?i)(Terminal Server Client|Default\.rdp)</field>    <field name="CommandLine" type="pcre2">(?i)( delete |del |rd |rmdir |Remove-Item)</field>    <description>RDP connection history or firewall state cleared via command line (1/2)</description>    <mitre>      <id>T1070.007</id>    </mitre>  </rule>   <rule id="100001" level="5">    <!-- Set <if_sid> to the decoder/base rule for windows so this only evaluates relevant events. -->    <field name="Image" type="pcre2">(?i)\\netsh\.exe$</field>    <field name="CommandLine" type="pcre2">(?i)advfirewall</field>    <field name="CommandLine" type="pcre2">(?i)( reset|delete rule)</field>    <description>RDP connection history or firewall state cleared via command line (2/2)</description>    <mitre>      <id>T1070.007</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.