Once we have complete control over one computer in the system, our next step should be to pivot into the network and try exploiting and gaining access to as many machines as possible. In this recipe, we will learn the easy way to do this: by using Metasploit.
Pivoting
How to do it...
Metasploit has a built-in Meterpreter script that allows us to add routes and enables us to attack other machines in the network using the current one. Follow these steps to get started:
- The concept is really simple; all we have to do is run the following command:
run autoroute -s <IP subnet>
The output of running the preceding command can be seen in the following screenshot:
- Once we're done, we can simply exploit the machines using...