Pivoting
Using Metasploit
First establist a meterpreter sessions, then
Run autoroute command to add a route
run autoroute -s <ip> <subnet>
Confirm by typing
run autoroute -p
Background session
route print
Now use auxillary scanners to target the new ip
After you find an open port in new target machine, you can use
portfwd
command inside meterpreter to forward that remote port to local port and continue your enumerations inside metasploitportfwd add -l <localport> -p <remoteport> -r <remotehost>
You can confirm by
portfwd list
Using Proxychains
First establish a meterpreter sessions, then background it
Add a route
route add ip/subnet <session_no>
Use
socks_proxy
auxiliary module to convert the meterpreter session to serve as a socks proxy:Now anything we sent over port 9050 would be sent over to the network we added to the route
Now you can add the port in proxychains and use it.
Last updated