• caglararli@hotmail.com
  • 05386281520

Metasploit over WAN (ngrok) – Specify different LHOST and LPORT for payload and listener in an exploit

Çağlar Arlı      -    12 Views

Metasploit over WAN (ngrok) – Specify different LHOST and LPORT for payload and listener in an exploit

I am testing some exploits over WAN with a port-forwarded server and am attempting to use a specific exploit module with the payload being a windows/meterpreter/reverse_tcp shell. This is all executed within the metasploit console and not by physically generating a payload using msfvenom.

Since I do not want to port-forward my own router to my computer's IP on the 'attacker' side, I have chosen to use ngrok's IP and port as LHOST and LPORT for my payload.

However, I am not able to run the exploit as the handler fails to bind to ngrok's IP. Is it possible to specify 2 different LHOSTS for the payload and the handler so that I am able to listen on my own correct IP while telling the payload to connect back to ngrok's forwarding IP?