Try setting LHOST globally, i.e
Code:msf exploit(handler) > setg LHOST "public ip"
Hello,
I am having some difficulty with my setup that I hope someone here can lead me in the correct path. Here's the background:
[My Machine] --> ( Internet ) --> [ Compromised Machine ] --> [ Victim Machine ]
I am using proxychains to make a remote Victim Machine routeable through a machine I have compromised. I have initiated a meterpreter session and would like to issue certain commands that require new connections (run vnc, shell for example).
I notice that while attempting to make the call 'run vnc', it attempts to issue a reverse_tcp call, however to my Local IP (LHOST) which is local. Obviously this will fail. I am behind a NAT'ed network and would like to use my public IP where my router would then forward the connection to my internal IP.
How can I have meterpreter set LHOST to my Public IP? While configuring my payload options, I have my LHOST set to my public IP, but meterpreter seems to use my local IP when issuing commands within the session.
Appreciate any help and I can provide any more information on the set up if need be.
Try setting LHOST globally, i.e
Code:msf exploit(handler) > setg LHOST "public ip"
Sometimes I try to fit a 16-character string into an 8–byte space, on purpose.
Thanks killadaninja -- I will test this out and let you know. I expected this was just a shortcoming in my knowledge on msf.
Use iptables to redirect all that get in your public IP to your internal ip. You can configure your router for it too!
Take a look at this link, you can use DynDNS or No-IP also.
Metasploit: Persistent Meterpreter over Reverse HTTPS
Regards,
![]()
(gdb) disass m(y_br)ain
®
Is there some reason you aren't using the inbuilt Meterpreter functionality for port forwarding?
Capitalisation is important. It's the difference between "Helping your brother Jack off a horse" and "Helping your brother jack off a horse".
The Forum Rules, Forum FAQ and the BackTrack Wiki... learn them, love them, live them.