[Learning] Installing Kali NetHunter on Android Devices

[Learning] Installing Kali NetHunter on Android Devices
Photo by Denny Müller

This guide provides a detailed, step-by-step process for installing Kali NetHunter on an Android device. It includes the necessary commands and instructions to ensure that you can follow along and successfully install NetHunter on your chosen device.

1. Choosing the Right Device

Before diving into the installation process, ensure you have an Android device that is known for being root-friendly and compatible with Kali NetHunter. Recommended devices include:

  • OnePlus Series: OnePlus 7, 7T, 8, 8T.
  • Google Nexus/Pixel Series: Nexus 5, 6P, Pixel 1, 2.
  • Samsung Galaxy S Series: Galaxy S8, S9, S10 (Exynos versions).

2. Preparing Your Device

Before starting the installation, make sure to back up your device. Unlocking the bootloader will erase all data on your phone.

A. Enable Developer Options and OEM Unlocking
  1. Go to Settings > About Phone and tap on Build Number seven times to enable Developer Options.
  2. Go to Settings > Developer Options and enable OEM Unlocking and USB Debugging.
B. Install ADB and Fastboot on Your Computer

You'll need to install ADB (Android Debug Bridge) and Fastboot tools on your computer.

  • For Windows: Download the Minimal ADB and Fastboot or SDK Platform Tools and install them.
  • For macOS/Linux: Use Homebrew or apt to install ADB and Fastboot.
    # macOS
    brew install android-platform-tools
    
    # Ubuntu/Debian
    sudo apt-get install android-tools-adb android-tools-fastboot
    

3. Unlocking the Bootloader

Unlocking the bootloader is necessary to install a custom recovery and gain root access.

A. Reboot into Bootloader Mode
  1. Connect your device to the computer using a USB cable.
  2. Open a terminal or command prompt on your computer.
  3. Use the following command to reboot into bootloader mode:
    adb reboot bootloader
    
B. Unlock the Bootloader
  • For OnePlus/Google Nexus/Pixel Devices:

    fastboot oem unlock
    
  • For Samsung Devices:
    Use the Odin tool to flash a custom recovery that unlocks the bootloader.

After executing the command, confirm the unlock on your device (this will erase all data).

4. Installing TWRP Custom Recovery

TWRP (Team Win Recovery Project) is a custom recovery that allows you to install custom ROMs and gain root access.

A. Download TWRP

Download the TWRP image file (.img) for your device from TWRP's official website.

B. Flash TWRP Recovery
  1. While in bootloader mode, use the following command to flash TWRP:

    fastboot flash recovery <twrp-image-file>.img
    
  2. Once flashed, reboot into TWRP recovery:

    fastboot reboot
    

5. Rooting Your Device with Magisk

Magisk is a popular tool for gaining root access while allowing you to hide root from specific apps.

A. Download Magisk

Download the latest Magisk ZIP file from the official GitHub repository.

B. Flash Magisk via TWRP
  1. Reboot into TWRP recovery (if not already there):

    adb reboot recovery
    
  2. In TWRP, go to Install and select the Magisk ZIP file.

  3. Swipe to confirm the flash.

  4. Reboot your device.

6. Installing Kali NetHunter

With root access and TWRP installed, you're ready to install Kali NetHunter.

A. Download Kali NetHunter

Visit the Kali NetHunter download page and download the version compatible with your device.

B. Transfer NetHunter Files to Your Device

Connect your device to the computer and transfer the NetHunter ZIP file to your device’s internal storage.

C. Flash Kali NetHunter via TWRP
  1. Reboot into TWRP recovery:

    adb reboot recovery
    
  2. In TWRP, go to Install and select the Kali NetHunter ZIP file.

  3. Swipe to confirm the installation.

D. Install the NetHunter App

After flashing, reboot your device. Install the NetHunter app (APK) that matches the version you flashed. The APK can be found in the ZIP file or downloaded from the NetHunter website.

E. Configure Kali NetHunter
  1. Open the NetHunter app and follow the setup instructions.
  2. Update the repositories and install any additional tools required for your penetration testing tasks.

7. Post-Installation Steps

  • Verify Root Access:
    Use the Magisk Manager app or a root checker app to verify that your device has root access.
  • Update and Customize:
    Use the NetHunter app to update your toolset and customize your environment as needed.

Which Version of NetHunter Should You Install?

  • Lite Version: Minimal installation for devices with limited storage or lower-end hardware.
  • Full Version: Includes the complete set of tools and is recommended for most users.
  • Rootless Version: For those who prefer not to root their device, though it offers limited functionality.

Important Considerations

  • Backup Your Device: Rooting and flashing ROMs can void warranties and may brick your device if done incorrectly.
  • Proceed with Caution: Always double-check compatibility and follow instructions carefully.

The steps above will help transform your Android device into a powerful tool for penetration testing and security research. Whether you're a cybersecurity professional or an enthusiast, Kali NetHunter offers a versatile and mobile solution to meet your needs.