Kali Linux NetHunter on Android: why and how to install
Kali Linux NetHunter on Android: why and how to install, Hello, my inquisitive friend! Surely you have thought about how to hack everything around without attracting too much attention to the security guards and others, to be like movie characters who hack into systems simply from a mobile device, or how to upgrade your mobility with minimal loss of functionality
? I have good news for you.
Kali Linux NetHunter is an Offensive Security project. The one that develops the Kali Linux distribution. This is a set of programs and utilities from Kali with the ability to run on Android. It will allow you to take a different look at your favorite device on the “green robot” and always be, if not fully armed, then with a set of master keys familiar to you.
NetHunter is not a full-fledged firmware for devices but is a software add-on. Supported by many devices: almost everything from the Nexus line, to some other devices from Sony, OnePlus, ZTE, and Samsung. The full list is here.
In this case, it is better to use the standard kernel.
But before we start brute-forcing the neighbor’s wi-fi, let’s talk more about the installation. Users who have never flashed devices may experience difficulties.
The preparatory stage of installation
Therefore, we need to get root and install recovery (for example, TWRP or CM)
Rooting a device is not a trivial task. The process is very different depending on the device. There are cases where unlocking the bootloader and getting root is impossible or extremely difficult. Therefore, when choosing a device, immediately pay attention to the possibility of these actions.
Consider the installation process on Nexus 10.
We need a high-quality cable, USB ports directly from the motherboard (to minimize the possibility of getting a “brick” from the device), access to the developer menu, and the device itself with a computer. There we turn on USB debugging. A pop-up window will appear with permission to debug – we agree.
USB debugging permission
To unlock, I used a special program Nexus Root Toolkit, where everything happens with a few clicks.
1. Run the program. It is worth paying attention to its code name – “manta”. It will be useful to us.
Nexus Root Toolkit
2. Click the “Unlock Bootloader – Unlock” button, this will delete all data on the device. The program log will inform us about the successful unlocking and reboot of the device.
Nexus Root Toolkit v2.1.9
The next step is to get root and immediately install custom recovery (I installed TWRP 3.0.2). Put a tick on “Custom Recovery” and press the “Root” button. The program will give us a link to the latest version of TWRP, go ahead, download and specify the path in the program to the image file “twrp*.img”.
Nexus Root Toolkit v2.1.9
If not installed, you can download them from the Play Market. Next, manually install the BusyBox package through the appropriate application. BusyBox will ask for root rights – be sure to agree!
Installing Kali Linux NetHunter
NetHunter consists of kernel components (kernel-nethunter) and the software add-on itself (nethunter-generic). To install Nethunter OS, you need to install the kernel first through recovery, and then software add-ons, or install everything at once using an archive that includes all components.
But, if you are unlucky, you will have to compile the installation archive yourself. For this, the developers made a utility from fresh components. You need to download the “nethunter-installer” directory from the GitLab repository. Following the instructions, we initialize the device storage with the command:
After that, using a Python script,
we collect the installation archive.
Consider several build options using this script: Full build with kernel and chroot for Google Nexus 10 (manta) device on Android 5.1.1 Lollipop.
python build.py -d manta -l --rootfs full I used this build option to install Nethunter OS. I couldn’t find any information on whether the components used for the build are the latest release version or just the latest versions of the components (probably unstable), but I’m having trouble. For example, some NetHunter OS applications did not install, but their icons (in the form of a green robot) were in the application menu.
Full build with kernel and chroot, but with release indication.
python build.py -d manta -l --rootfs full --release 2019.2
Assembly to update the kernel and applications.
python build.py -d manta -l
The build to update the kernel.
python build.py -d manta -l -k
Assembly for updating applications without a kernel.
python build.py -d manta -l -nk
. For each device, loading recovery occurs differently.
Nexus 10: “Volume +” + “Volume -” + lock button.
In TWRP recovery, select “Install”, select our installer zip file and drag the slider to the right. The installation went, after completion we reboot the device.
Installation process via TWRP.
Android will boot up and app optimization will begin.
Incorrectly installed programs.
The fix is easy: unpack the zip archive and install applications manually using apk files that are in *unpacked zip archive*/data/app. Before doing this, you should enable the ability to install applications from unknown sources. Now we install nethunter.apk first, and then all other applications. We reboot the device and see that the icons started to display normally. I advise you to further configure HackerKeyboard, as it is more adapted to work with the terminal.
Launch the terminal, and select the Kali terminal. And install updates:
apt update apt upgrade
Fixing problems with the Microsoft repository:
wget https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
Note that the home directory of the Kali root user is located on the Root partition: /data/local/nhsystem/kali-armhf/root.
This completes the installation of Nethunter OS, and in the next article, we will look at the practical use of our cool-hacker device.
Z.Y. And here is the promised link to the packages