Kali Linux is the most popular penetration testing and security auditing operating system in the world. Thanks to the NetHunter project, it is now possible to install Kali Linux on an Android phone.
NetHunter is the mobile version of Kali Linux and designed for Android devices. It’s a powerful tool for penetration testing. This tutorial shows how to install NetHunter on any unrooted Android phone.
Steps to Install Kali Linux NetHunter on Android
The only requirement for installing Kali Linux Nethunter is that the phone is running Android 7 or newer. We recommend an Android version before 12, as the latter monitors and kills the processes of apps when they consume too much processing power.
1. Install Termux on Your Phone
- While you can get the Termux app from Google Play Store, the variant is deprecated: it doesn’t receive updates and contains bugs and outdated repositories. We recommend that you install the latest version from its GitHub page.
Download the app by clicking on the option highlighted above. The download should take a few seconds, based on your Internet speed. Tap on the downloaded file to install it.
- By default, your phone does not allow you to install apps from unknown sources. In that case, you have to set up the permissions by tapping “Settings.”
- Your phone will redirect you to a settings page where you can opt to allow app installs from your browser, as shown:
- You’ll reach the Install option that will allow you to install the app.
2. Upgrade Repositories
Once the Termux app is installed, you should update the repositories. Debian Linux and most of its derived versions use APT (Advanced Package Tool) to install the software. Refer to this ultimate guide to apt and apt-get commands for your reference.
By running the update
command, we retrieve package source information from the configured resources. The upgrade
command will use the information to upgrade all packages to the latest versions.
You can also learn basic Linux commands to make better use of Termux.
First, run the update
command:
apt update
Enter the following command:
apt upgrade
When asked “Do you want to continue?” press Y and Enter.
Next, set up the storage permissions for the Termux app by using this command:
termux-setup-storage
It should trigger a pop-up that asks whether you want to allow Termux to access files on your device. Tap on “Allow.”
3. Install NetHunter
- Install Wget by running this command:
apt install wget
When asked, “Do you want to continue?” reply with Y.
- Download the NetHunter installation file by running the command below. Ensure that you enter the address correctly.
wget -O install-nethunter-termux https://offs.ec/2MceZWr
- Adjust the file permissions of the downloaded file, making it executable:
chmod +x install-nethunter-termux
- Execute NetHunter:
./install-nethunter-termux
The installation may take some time, depending on your Internet connection speed.
- When asked whether you want to delete the downloaded rootfs file, reply with N, as you may need it later.
4. Start Kali NetHunter
To start the Kali Linux NetHunter Command Line Interface, type in this command:
nethunter
You can also use the nh
command as a shortcut for NetHunter.
The next step is to set the NetHunter KeX password. Note that you have to exit the NetHunter CLI to run this command:
nethunter kex passwd
Start NetHunter KeX by running this command:
nethunter kex
Please take note of the RFB Port number, as you will use it later.
At this point, NetHunter is up and running, but you have to configure displays to use the software.
5. Install NetHunter KeX
NetHunter KeX is the App Store for NetHunter. This app store contains different tools that you may not get on your regular app store. Don’t confuse it with Samsung Dex.
- Visit the NetHunter App Store website.
- Download and install the NetHunter store app.
- Launch the app store, search for NetHunter KeX and install it.
- After the NetHunter Store app downloads the NetHunter KeX app, you will be asked whether you wish to install it. Tap “Install.”
- Launch NetHunter KeX. The app requires you to enter the KeX username and password. The user name is optional; in our case, we will not need it. Enter the password you set earlier and ensure that the port number is similar to what you had when you configured NetHunter KeX, then click “Connect.”
- If you followed all the steps correctly, you should have Kali NetHunter GUI running on your Android phone.