Metasploit has an amazing number of modules that can help you achieve your goals, but sometimes you may want to leverage a session and run different or even your own tools. We can do this by routing the traffic through the session and then setting up a socks proxy.
- First, we need to route the traffic through the session; in previous recipes, we used the
route
command. So, this time, we will check the Multi Manage Network Route via the Meterpreter Session post-exploitation module by setting the session to run this module on the subnet we wish to access through this session:
msf > use post/multi/manage/autoroute msf post(autoroute) > set SESSION 1 SESSION => 1 msf post(autoroute) > set SUBNET 10.0.0.0/24 SUBNET => 10.0.0.0/24 msf post(autoroute) > run [!] SESSION may not be compatible with this module. [*] Running module against VAGRANT-2008R2 [*] Searching for subnets to autoroute. [+] Route added to subnet 10.0.0.0/255.255...