Skip to content

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

Siemphony’s repertoire

Suspicious one-line command executed as a direct child of sshd

Siemphony@siemphonylowT1021.004unverified
Matches the non-interactive half of AN1638: `ssh host 'command'` makes sshd exec the user's shell directly with `-c "command"`, so the whole remote command lands on one audited execve whose ParentImage is sshd — a shape RDP and SMB lateral movement cannot produce. Gating on a shell launcher plus suspicious content, rather than the parent alone, keeps an ordinary interactive login (a bare shell with no arguments) out of scope. The content list is authored from MITRE's SuspiciousProcessList knob ("nc, base64, bash -i") extended with the bash `/dev/tcp/` reverse-shell idiom; the login-to-execution correlation AN1638 also asks for is a cross-event join Sigma cannot express. OpenSSH 9.8 split the post-authentication session out of sshd into a separate sshd-session binary, so on current distributions the shell's parent is sshd-session and a gate on '/sshd' alone would be dead; both names are listed. Coverage limit, stated plainly: an interactive SSH login is not detected. Commands typed at a shell prompt are children of the login shell rather than of sshd, several hops from what this rule inspects, so interactive lateral movement over SSH passes unseen and only the `ssh host 'command'` shape is caught. Prerequisite: auditd does not record execve by default, so an empty result here means the syscall isn't audited rather than the estate being quiet. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0596, 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 (((InitiatingProcessFolderPath endswith "/sshd" or InitiatingProcessFolderPath endswith "/sshd-session") and (FolderPath endswith "/bash" or FolderPath endswith "/sh" or FolderPath endswith "/dash" or FolderPath endswith "/zsh")) and (ProcessCommandLine contains "base64 -d" or ProcessCommandLine contains "base64 --decode" or ProcessCommandLine contains "/dev/tcp/" or ProcessCommandLine contains "nc -e" or ProcessCommandLine contains "ncat -e" or ProcessCommandLine contains "socat exec" or ProcessCommandLine contains "mkfifo" or ProcessCommandLine contains "0>&1"))

Splunk · SPL

Run this as a search.

index=* (((ParentImage="*/sshd" OR ParentImage="*/sshd-session") AND (Image="*/bash" OR Image="*/sh" OR Image="*/dash" OR Image="*/zsh")) AND (CommandLine="*base64 -d*" OR CommandLine="*base64 --decode*" OR CommandLine="*/dev/tcp/*" OR CommandLine="*nc -e*" OR CommandLine="*ncat -e*" OR CommandLine="*socat exec*" OR CommandLine="*mkfifo*" OR CommandLine="*0>&1*"))

Elastic · ES|QL

Run this as a search.

FROM logs-*| WHERE (((TO_LOWER(process.parent.executable) LIKE "*/sshd" OR TO_LOWER(process.parent.executable) LIKE "*/sshd-session") AND (TO_LOWER(process.executable) LIKE "*/bash" OR TO_LOWER(process.executable) LIKE "*/sh" OR TO_LOWER(process.executable) LIKE "*/dash" OR TO_LOWER(process.executable) LIKE "*/zsh")) AND (TO_LOWER(process.command_line) LIKE "*base64 -d*" OR TO_LOWER(process.command_line) LIKE "*base64 --decode*" OR TO_LOWER(process.command_line) LIKE "*/dev/tcp/*" OR TO_LOWER(process.command_line) LIKE "*nc -e*" OR TO_LOWER(process.command_line) LIKE "*ncat -e*" OR TO_LOWER(process.command_line) LIKE "*socat exec*" OR TO_LOWER(process.command_line) LIKE "*mkfifo*" OR TO_LOWER(process.command_line) LIKE "*0>&1*"))

Wazuh · XML rule

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

<group name="sigma,linux,process_creation,">  <!-- Rule ids must be unique on your manager; 100000+ is the user range. -->  <rule id="100000" level="5">    <!-- Set <if_sid> to the decoder/base rule for linux so this only evaluates relevant events. -->    <field name="ParentImage" type="pcre2">(?i)(/sshd$|/sshd-session$)</field>    <field name="Image" type="pcre2">(?i)(/bash$|/sh$|/dash$|/zsh$)</field>    <field name="CommandLine" type="pcre2">(?i)(base64 -d|base64 --decode|/dev/tcp/|nc -e|ncat -e|socat exec|mkfifo|0&gt;&amp;1)</field>    <description>Suspicious one-line command executed as a direct child of sshd</description>    <mitre>      <id>T1021.004</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.