Installing NetHunter
Kali NetHunter was originally created for Google Nexus devices such as the Nexus 4 and Nexus 5 smartphones and the Nexus 7 and Nexus 10 tablets. It was later expanded to the OnePlus One smartphone, which Offensive Security stated is the preferred phone form factor NetHunter device. As of this writing, Kali NetHunter is supported on a variety of devices from various manufacturers, such as Google, OnePlus, Samsung, LG, HTC, and Sony. Let's look at how to install Kali NetHunter on an Android device (before installing Kali NetHunter on your device, whether it’s a smartphone or tablet, please check the list of supported devices at https://www.offensive-security.com/kali-linux-nethunter-download/ or the list of supported devices and ROMs at the Offensive Security Kali NetHunter GitHub repository at https://github.com/offensive-security/kali-nethunter/wiki):
- Download an official release of Kali NetHunter for your device from https://www.offensive-security.com/kali-linux-nethunter-download. The downloaded file should be zipped. Ensure you verify the hash values before proceeding. If the hash value does not match, do not use it. If you would like to create a custom build of Kali NetHunter, please see the Building Kali NetHunter for a specific device section.
- Unlock your Android device. When installing Kali NetHunter on an Android device, the installation takes place on top of the Android operating system. Please ensure the necessary Android drivers are installed and configured on your computer prior to executing the following steps. To do this, ensure you have a copy of Android Studioinstalled on your computer. This software can be found athttps://developer.android.com/studio. Android Studio will ensure the device drivers are properly installed and are compatible.
- Set your device to Developer mode. Navigate to
Settings
|About
and tap on theBuild number
a few times until you see a notification that says that the developer mode has been enabled. - Go to
Settings
|Developer options
and enable both theAdvanced reboot
and AndroidDebugging
options:
![](https://static.packt-cdn.com/products/9781788995177/graphics/9c05da51-c4f3-4734-938a-67f1025f5a6f.jpg)
- Root your device (applicable to Nexus and OnePlus). If you’re using a Nexusdevice, you can use theNexus Root Toolkit (http://www.wugfresh.com/nrt/). The root toolkit is anall-in-onetool for installing device drivers, unlocking you device bootloader, and installing a custom recovery such asTeam Win Recovery Project (TWRP):
![](https://static.packt-cdn.com/products/9781788995177/graphics/395d0103-7a21-460b-b70e-1ca658475b7f.png)
- Select the
Initial Setup
option, Full Driver Installation Guide, and follow the installer wizard. - Unlock the bootloader if your device is not unlocked. This process will wipe your entire device. Please be sure to create a backup of your device before executing this step.
- Let's root your Android device. Click on
Root
. If you’re using a Nexus, you'll see a checkbox on the screen next to Custom Recovery, ensure you unselect it.
- Your device will reboot automatically. To verify your device has been rooted successfully, you should see within your device’s menu a new icon/app named SuperSU. Opening the app will verify the status of your device, whether root access is granted or not.
Note
For OnePlus devices, there is specific rooting tool made just for this device, it's known as Bacon Root Toolkit (http://www.wugfresh.com/brt/). Additionally, the team at Offensive Security has provided a detailed procedure on installing Kali NetHunter using Windows and Linux. The guide can be found at https://github.com/offensive-security/kali-nethunter/wiki/Windows-install. If you’re using Linux, please visit https://github.com/offensive-security/nethunter-LRT.
- Go to the Google Play store and install the
BusyBox
application:
![](https://static.packt-cdn.com/products/9781788995177/graphics/8faa6ce3-1019-4d31-81a2-e413a755c8ec.jpg)
- Install the TWRP Manager app. You can also install TWRP using a downloadable APK from https://twrp.me
![](https://static.packt-cdn.com/products/9781788995177/graphics/9f3fa362-c45d-495c-a311-f4f3f9bb91a8.png)
Once both applications are installed, open each to ensure they are functioning fine. If superuser permission is required, simply select grant or allow.
- Copy the Kali NetHunter image and paste it in the root directory of the device. It’s time to install the custom recovery.
- Open the TWRP Manager app and select the Recovery Version to Install option. To begin the installation, click on Install Recovery.
- Reboot the device from the options provided:
![](https://static.packt-cdn.com/products/9781788995177/graphics/b0c3e472-be5e-4816-8f39-cd4e721ed0de.jpg)
- Click on Install and select the Kali NetHunter image ZIP file within the directory. At this point, the custom recovery will flash Kali NetHunter onto your device and reboot automatically.
Building Kali NetHunter for a specific device (optional)
Many smartphone manufacturers, such as OnePlus, Samsung, Google, and LG, produce a variety of phones every year. You may be wondering, Do I need to purchase another Android-based smartphone to host the Kali NetHunter platform? The answer is simple: you do not. One of the benefits provided to us is the ability to build a custom version of NetHunter for our Android device. In step 3, you'll be able to choose the type of device and the version of Android your smartphone is currently running; this is to ensure the output file is compatible with your Android phone.
If you would like to build your own Kali NetHunter image from the official GitHub repository, use the following steps:
- Download the repository using the
git clone https://github.com/offensive-security/kali-nethunter
command:
![](https://static.packt-cdn.com/products/9781788995177/graphics/a89c2ae2-849a-456c-a6b2-088fcb4630e8.jpg)
- Ensure you change the directory to the new folder using the
cd kali-nethunter/nethunter-installer
command. Next, run the./bootstrap.sh
command on the Terminal. There will be an interactive prompt that asks some questions before it attempts to download any of the device's folders on your system:
![](https://static.packt-cdn.com/products/9781788995177/graphics/978203e3-0332-4b66-99f1-af5e3ac84c59.png)
- Use the
python build.py –h
command to view the options available for building a custom Kali NetHunter image for your device:
![](https://static.packt-cdn.com/products/9781788995177/graphics/b56401a8-f147-4e57-9e57-e7c508479658.png)
To build an image, we can use the python build.py -d <device> --<android version>
syntax.
If you want to build Kali NetHunter for a Nexus 7 (2013) device running Android Kitkat, you can use the python build.py –d flo –kitkat
command.
- When the build is complete, the output will be a
.zip
file that is stored in thenethunter-installer
directory. Simply copy the.zip
file into the root folder of your Android device as it will be required to move into Kali NetHunter.
Note
To quickly locate the .zip
file within your directory, use the ls –l |grep .zip
command to view only ZIP files.