Install Kali Linux on your Android device and develop a portable penetration testing environment
Kali Linux, a secure distribution of Linux, is one of the most widely used OS among ethical hackers (and unethical hackers). The reason is that Kali Linux has almost every tool required for pentesting pre-installed. And a great back end support from Offensive Security make it a great platform for beginners as well as professionals. Kali Linux is a successor of BackTrack OS which was also developed by Offensive Security.
The developers at Offensive Security have been working extensively for developing a dedicated operating system for cyber-security researchers. Along with ARM devices, Kali Linux is available for Android too.
The installation process is very simple and straightforward. If you have a rooted Android phone having at least 5GB of free storage and a fast internet connection (to download repository files), then everything else is just a matter of few taps on your smartphone.
First of all install Linux Deploy app from Play Store.
Now make sure that your phone is in the required state for installation. That is, make sure that your phone is rooted, having 5GB of free space, an internet connection with decent speed (and you are patient enough to wait for Kali to bootstrap from the network).
Root privilege is required because Kali will install itself in chroot mode. Which means that allowed access will be restricted to specified directory (acting as root directory) and their children.
Step 2 is running the app, and selecting Kali Linux in the distribution tab. Optionally, you can choose your architecture, verify that the Kali mirror is correct, set your installation type and location on your Android device, etc. Generally speaking, the defaults provided by Linux Deploy are good to begin with.
Once all the settings are at place, hit the “install” button and app will start a Kali Linux bootstrap directly from repositories of Offensive Security. Depending on your Internet connection speed, this process could take a while. You’ll be downloading a base install of Kali Linux (with no tools) at minimum.
When the installation is complete, you can have Linux Deploy automatically mount and load up your Kali Linux chroot image. This also includes the starting of services such as SSH and VNC for easier remote access. All of this is automatically done by hitting the “start” button. You should see Linux Deploy setting up your image with output similar to the following:
At this stage, Linux Deploy has started a VNC and SSH server inside your chrooted Kali image. You can connect to the Kali session remotely using the IP address assigned to your Android device (in my case, 10.0.0.10).
You can now access your Kali Linux instance with either VNC or Secure Shell(SSH). The required credentials are-
For VNC password is “changeme”
For SSH username is “android” and password is again “changeme”
This is what it all looks like on your device:
Linux localhost 3.4.5-447845 #1 SMP PREEMPT Fri Apr 12 17:22:34 KST 2013 armv7l
Kali GNU/Linux 1.0 [running on Android via Linux Deploy]
android@localhost:~$ sudo su
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop3 4180944 667268 3304012 17% /
tmpfs 952708 80 952628 1% /dev
tmpfs 952708 0 952708 0% /dev/shm
root@localhost:/home/android# apt-get update
Hit https://http.kali.org kali Release.gpg
Hit https://http.kali.org kali Release
Hit https://http.kali.org kali/main Sources
Hit https://http.kali.org kali/contrib Sources
Hit https://http.kali.org kali/non-free Sources
Hit https://http.kali.org kali/main armel Packages
Hit https://http.kali.org kali/contrib armel Packages
Hit https://http.kali.org kali/non-free armel Packages
Ign https://http.kali.org kali/contrib Translation-en_US
Ign https://http.kali.org kali/contrib Translation-en
Ign https://http.kali.org kali/main Translation-en_US
Ign https://http.kali.org kali/main Translation-en
Ign https://http.kali.org kali/non-free Translation-en_US
Ign https://http.kali.org kali/non-free Translation-en
Reading package lists… Done
If left unchanged, Linux Deploy will automatically set an image size of around 4 GB, for a “naked” installation of Kali. If you would like to install additional Kali tools down the road, you might want to consider using a larger image size, which is configurable via the settings in Linux Deploy.
Quick Tip: Prefer SSH over VNC while logging into your OS. This will save you a lot of time.
Post your further queries in the comment box to get them resolved.