My previous article A Guide to Setting up a Development Environment on Android Devices talked about setting up a development environment on Android devices. In this article let’s continue the fun by setting up an ethical hacking environment on Android devices.
For the walk-through I am going to use
ssh to login to my Android phone. If you have not read the previous article, refer to the link below.
Kali Linux is a Debian-derived Linux distribution designed for digital forensics and penetration testing. There are several ways of getting it installed on Android to leverage the hacking tools in Termux.
From Termux terminal, let’s use Tool-X to install Kali Linux tools.
I log in to my Android phone using SSH. The user name and IP address are specific to my setup.
# ssh -p 8022 email@example.com
From the Termux shell, follow these instructions to install Tool-X
# apt-install git
# git clone https://github.com/rajkumardusad/Tool-X.git
# cd Tool-X
# chmod +x install
Once Tool-X is installed, to start it just enter
And now you can install all the tools for ethical hacking.
AnLinux provides various Linux distros including Kali Linux. I am going to use it to install Kali Linux with XFCE4 desktop environment.
From the Termux terminal, let’s install Kali Linux using the provided distro.
# pkg install wget openssl-tool proot -y && hash -r && wget https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Scripts/Installer/Kali/kali.sh && bash kali.sh
Once installed there will be a file called
start-kali.sh in the HOME folder. Run this file to start Kali Linux.
Once I am in the Kali Linux console, let’s proceed to install XFCE4 desktop environment. (Note: This way take awhile to install)
# wget https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Scripts/DesktopEnvironment/Apt/Xfce4/de-apt-xfce4.sh && bash de-apt-xfce4.sh
As part of the installation, I need to configure keyboard layout and password for VNC server.
The default VNC server script uses display no 1. You need to change it if necessary. The scripts are located at
Start VNC server and check the log file under
/root/.vnc to make sure there is no error.
Using TigerVNC viewer, I can then connect remotely to my Android device running Kali Linux.
To stop VNC server.
BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc
# pkg install busybox
See the man page on what BusyBox can do.
CMatrix is based on the screensaver from The Matrix website. It shows text flying in and out in a terminal like as seen in “The Matrix” movie.
# pkg install cmatrix
See a steam locomotive running across your screen.
# pkg install sl
Fancy Text Tools
Utilities to generate fancy text.
# pkg install toilet cowsay figlet
Set up termux-setup-storage to access Android storage from within Termux.
Install a text based browser.
# pkg install w3m
If you need Arch Linux, you can follow the instructions at the link below to setup TermuxArch.