port forward & pivoting with meterpreter

Categories: Security, tech

Let’s assume u attacked machine with 2 nic cards

our IP is 10.0.0.5

first, one ip is 10.0.0.10 that you reach it from

and in ifconfig shows, the machine has a different  IP 10.0.2.30

you can scan the network 10.0.2.x via meterpreter

arp_scan

we can connect to the RDP server of the machine 10.0.2.30

via adding a route from out local port 9389 to the machine 10.0.2.30:3389

so now we can connect to our local port 0.0.0.0:9389 and it will redirect us to 10.0.2.30:3389

 

pivoting is easier to do with Metasploit  session

the last number is the session id

so now u can attack the machine  10.0.2.30 directly

 

have fun!

«
»

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    *

    This site uses Akismet to reduce spam. Learn how your comment data is processed.