Skip to content

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

Siemphony’s repertoire

Port-relay tool invoked with a listener or SOCKS address

Matches a socat or ncat process started with an address or flag that only makes sense when the tool is bridging two connections, which is the executable half of MITRE's AN1230. The analytic pairs the tool with an uncommon outbound destination; the destination is a second event, so this rule keeps the part a single execve record can carry and gates the tool list against a relay-shaped argument rather than alerting on every invocation. MITRE's CommandLinePattern knob names socat, ncat and openssl; the address keywords listed here are authored from those tools' own syntax. The analytic also names ssh and iptables, which are left out on purpose: their forwarding flags are single letters that collide with routine administration, and a rule keyed on them would be noise rather than detection. Bare nc is left out for a different reason — Debian and Ubuntu route it through the alternatives system, so the binary auditd records is nc.openbsd or nc.traditional and an endswith on '/nc' would silently never fire. Prerequisite: auditd ships no execve rule by default, so without an explicit -a always,exit -F arch=b64 -S execve there is no process_creation telemetry on the host at all and this rule returns zero rows regardless of what ran. CommandLine is reconstructed from the a0..aN fields, and auditd hex-encodes any single argument containing whitespace; the keywords here appear inside whitespace-free arguments, so they survive that encoding, but a keyword added later might not. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0445, 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: Port-relay tool invoked with a listener or SOCKS addressid: b6c49897-9d56-45ee-a096-5eaa8c8fc76estatus: experimentaldescription: |  Matches a socat or ncat process started with an address or flag that only  makes sense when the tool is bridging two connections, which is the executable  half of MITRE's AN1230. The analytic pairs the tool with an uncommon outbound  destination; the destination is a second event, so this rule keeps the part a  single execve record can carry and gates the tool list against a relay-shaped  argument rather than alerting on every invocation. MITRE's CommandLinePattern  knob names socat, ncat and openssl; the address keywords listed here are  authored from those tools' own syntax. The analytic also names ssh and  iptables, which are left out on purpose: their forwarding flags are single  letters that collide with routine administration, and a rule keyed on them  would be noise rather than detection. Bare nc is left out for a different  reason — Debian and Ubuntu route it through the alternatives system, so the  binary auditd records is nc.openbsd or nc.traditional and an endswith on  '/nc' would silently never fire. Prerequisite: auditd ships no execve rule by  default, so without an explicit -a always,exit -F arch=b64 -S execve there is  no process_creation telemetry on the host at all and this rule returns zero  rows regardless of what ran. CommandLine is reconstructed from the a0..aN  fields, and auditd hex-encodes any single argument containing whitespace;  the keywords here appear inside whitespace-free arguments, so they survive  that encoding, but a keyword added later might not.  UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0445, 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/T1090  - https://attack.mitre.org/detectionstrategies/DET0445author: Siemphony pipeline (machine-derived from MITRE ATT&CK v19.2)date: 2026-08-16tags:  - attack.command-and-control  - attack.t1090logsource:  category: process_creation  product: linuxdetection:  selection_tool:    Image|endswith:      - '/socat'      - '/ncat'  selection_relay:    CommandLine|contains:      - 'TCP-LISTEN'      - 'TCP4-LISTEN'      - 'TCP6-LISTEN'      - 'UDP-LISTEN'      - 'OPENSSL-LISTEN'      - 'SOCKS4'      - 'SOCKS5'      - 'PROXY:'      - '--proxy'      - '--broker'  condition: selection_tool and selection_relayfalsepositives:  - "Kubernetes port-forwarding, which has historically shelled out to socat with a TCP4-LISTEN address for every forwarded port. On a worker node this fires continuously and drowns the rule, so cluster nodes need the kubelet parent excluded before the rule is usable at all."  - "Container and CI tooling that uses socat as a deliberate TCP relay to reach a service inside another network namespace, for example a health check or a database tunnel in a build job. These runs look exactly like a proxy because they are one."  - "An administrator reaching a host through a jump box with ncat --proxy during troubleshooting, or standing up a temporary socat relay to test a firewall change. MITRE's ProcessUserContext knob is where this narrows, by restricting the rule to accounts that have no operational reason to relay traffic."level: medium

Sentinel · KQL

Run this as a search.

DeviceProcessEvents| where ((FolderPath endswith "/socat" or FolderPath endswith "/ncat") and (ProcessCommandLine contains "TCP-LISTEN" or ProcessCommandLine contains "TCP4-LISTEN" or ProcessCommandLine contains "TCP6-LISTEN" or ProcessCommandLine contains "UDP-LISTEN" or ProcessCommandLine contains "OPENSSL-LISTEN" or ProcessCommandLine contains "SOCKS4" or ProcessCommandLine contains "SOCKS5" or ProcessCommandLine contains "PROXY:" or ProcessCommandLine contains "--proxy" or ProcessCommandLine contains "--broker"))

Splunk · SPL

Run this as a search.

index=* ((Image="*/socat" OR Image="*/ncat") AND (CommandLine="*TCP-LISTEN*" OR CommandLine="*TCP4-LISTEN*" OR CommandLine="*TCP6-LISTEN*" OR CommandLine="*UDP-LISTEN*" OR CommandLine="*OPENSSL-LISTEN*" OR CommandLine="*SOCKS4*" OR CommandLine="*SOCKS5*" OR CommandLine="*PROXY:*" OR CommandLine="*--proxy*" OR CommandLine="*--broker*"))

Elastic · ES|QL

Run this as a search.

FROM logs-*| WHERE ((TO_LOWER(process.executable) LIKE "*/socat" OR TO_LOWER(process.executable) LIKE "*/ncat") AND (TO_LOWER(process.command_line) LIKE "*tcp-listen*" OR TO_LOWER(process.command_line) LIKE "*tcp4-listen*" OR TO_LOWER(process.command_line) LIKE "*tcp6-listen*" OR TO_LOWER(process.command_line) LIKE "*udp-listen*" OR TO_LOWER(process.command_line) LIKE "*openssl-listen*" OR TO_LOWER(process.command_line) LIKE "*socks4*" OR TO_LOWER(process.command_line) LIKE "*socks5*" OR TO_LOWER(process.command_line) LIKE "*proxy:*" OR TO_LOWER(process.command_line) LIKE "*--proxy*" OR TO_LOWER(process.command_line) LIKE "*--broker*"))

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="7">    <!-- Set <if_sid> to the decoder/base rule for linux so this only evaluates relevant events. -->    <field name="Image" type="pcre2">(?i)(/socat$|/ncat$)</field>    <field name="CommandLine" type="pcre2">(?i)(TCP-LISTEN|TCP4-LISTEN|TCP6-LISTEN|UDP-LISTEN|OPENSSL-LISTEN|SOCKS4|SOCKS5|PROXY:|--proxy|--broker)</field>    <description>Port-relay tool invoked with a listener or SOCKS address</description>    <mitre>      <id>T1090</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.