Categories
How To...

How To install NetHunter Rootless Edition

Can a smartphone or tablet be turned into a real mobile Pentesting platform? Here we look at installing Kali Linux NetHunter Rootless Edition on Nexus devices.

In the Cyber Security and Hacking themed TV series, Mr Robot, there are a variety of cyber attacks carried out as part of the story line. One of those supposedly featured is a Nexus 5 smartphone running NetHunter. Where does reality end and Hollywood takeover?

NetHunter is a real piece of software and Nexus is a range of mobile devices supporting this Kali Linux distribution. In this series of articles we will investigate what NetHunter is, the options available, and find out how well they work together.

What is Kali Linux NetHunter?

NetHunter is an Open Source project for delivering a Pentesting platform for Android-based Nexus devices. The NetHunter platform is built this Kali Linux and supports the following features:

  • Wireless 802.11 frame injection
  • ‘one-click’ MANA* Evil Access Points (AP) setups
  • HID (Human Interface Device) keyboard
  • BadUSB MITM (Man-In-The-Middle) attacks
  • USB OTG (On The Go) or Y-cable
  • SDR (Software-Defined Radio)
  • Full Kali Linux toolset

* MitM and Authenticated Network Attack

What devices does NetHunter support?

NetHunter is built to run on the following hardware devices:

  • Nexus 4 – Android smartphone manufactured by LG:
    • 4.7″ screen
    • 2 Gb memory
    • 8 or 16 Gb internal storage
    • 2100 mAh battery
    • Android 4.2 then 5.1.1 operating system
    • Released 2012
  • Nexus 5 – Android smartphone manufactured by LG:
    • 5″ screen
    • 2 Gb memory
    • 16 or 32 Gb internal storage
    • 2300 mAh battery
    • Android 4.4 then 6.0.1 operating system
    • Released 2013
    • Successor was Nexus 5x released in 2015 which supported Android 6.0 and had 2700 mAh battery
  • Nexus 6 – Android smartphone manufactured by Motorola:
    • 6″ screen
    • 3 Gb memory
    • 32 or 64 Gb internal storage
    • 3200 mAh battery
    • Android 5.0 then 7.1.1 operating system
    • Released 2014
    • Successor was Nexus 6P released in 2015 which supported Android 6.0, 3450 mAh battery and 128 Gb storage option.
  • Nexus 7 – Android mini-tablet manufactured by ASUS:
    • 7″ screen
    • 2 Gb memory
    • 16 or 32 Gb internal storage
    • 3950 mAh battery
    • Android 4.3 then 6.0.1 operating system
    • Released 2013
  • Nexus 9 – Android tablet manufactured by HTC:
    • 9″ screen
    • 2 Gb memory
    • 16 or 32 Gb internal storage
    • 6700 mAh battery
    • Android 5.0 then 7.1.1 operating system
    • Released 2014
    • Optional keyboard cover.
  • Nexus 10 – Android tablet manufactured by Samsung:
    • 10″ screen
    • 2 Gb memory
    • 16 or 32 Gb internal storage
    • 9000 mAh battery
    • Android 4.2 then 5.1 operating system
    • Released 2012
  • OnePlus One – Android smartphone manufactured by OnePlus:
    • 5.5″ screen
    • 3 Gb memory
    • 16 or 64 Gb internal storage
    • 3100 mAh battery
    • Android 4.2 then 5.1.1 operating system
    • Released 2014

As can be seen from the above there is a wide range of smartphone and tablet sizes supported with variations in specifications, not just what is listed above but also processor speeds, cameras and more.

The Nexus 7 & 9 tablets come as WiFi only or WiFi with LTE versions.

NetHunter versions

There are 3 alternatives for installing NetHunter onto a device:

  • NetHunter Rootless Edition – installs on any unrooted device without voiding the warranty. Given the release date of most of the compatible devices, chances are the warranty has expired. This option provides “maximum flexibility with no commitment“.
  • NetHunter Lite – provides the full package for rooted devices without a custom kernel.
  • NetHunter – provides the full package for rooted devices with a custom kernel.

The key differences are that the Rootless Edition does not include:

  • Metasploit with database (only without)
  • NetHunter App
  • WiFi Injection
  • HID attacks

For details on the differences check out the ‘1.0 NetHunter Editions’ section within the NetHunter Documentation.

NetHunter Rootless Edition on a Nexus 7

Kali Linux NetHunter Rootless Edition will now be installed on a 32 Gb Nexus 7 running a stock version of Android 5.1.1 with no additional apps i.e. following a system reset.

Nexus 7 running Android 5.1.1 following system reset and initial startup.

Installation

Step 1 – Install the NetHunter-Store app on the Nexus 7 (requires an Internet connection):

  • Open Chrome and visit https://store.nethunter.com.
  • Click on the ‘DOWNLOAD STORE APP’ button.
  • Go to the ‘Downloads’ folder and click on the ‘NetHunterStore.apk’ file. First time this is carried out it will be blocked so open ‘Settings’ and allow ‘Unknown sources’.
  • Once able to start the installation there will be a prompt regarding the permissions that will be accessible so read and click ‘INSTALL’.
  • After installation completes there will be a NetHunter Store icon.
NetHunter App Store with ‘DOWNLOAD STORE APP’ button during Step 1.

Step 2 – Install required apps by visiting the NetHunter Store via the newly installed app:

There will be further prompts regarding permissions during the installation of the above applications. Upon completion there will be a new icon for each app on the device:

NetHunter Rootless Edition app icons after Step 2.

Step 3 – Install NetHunter operating system via these commands:

pkg install wget

wget -O install-nethunter-termux https://offs.ec/2MceZWr

chmod +x install-nethunter-termux

./install-nethunter-termux

These 4 commands carry out the following actions:

  • Install the ‘wget’ package.
  • Downloads a batch script into file ‘install-nethunter-termux’.
  • Make file ‘install-nethunter-termux’ executable.
  • Execute the bash script to install the NetHunter operating system.

The final step may take a while.

Installation of NetHunter Rootless Edition on a Nexus 7 resulting in a ‘FATAL: kernel too old’ error.

The Nexus 7 was running Android 5.1.1 and having attempted this on two different tablets we suspect that the issue was down to the operating system version. Fortunately, we also had a Nexus 5x smartphone running Android 8.1.0 so we attempted the exact same installation steps with success:

Successful installation of NetHunter Rootless Edition on a Nexus 5x smartphone.

Usage

Once the installation is complete, one can use the following commands within Termux (courtesy of the Kali NetHunter documentation):

CommandPurpose
nethunterstart Kali NetHunter CLI (command line interface)
nethunter kex passwdconfigure KeX password prior to first use only
nethunter kex &start Kali NetHunter Desktop user sessions
nethunter kex stopstop Kali NetHunter Desktop
nethunter <command>run command in NetHunter environment
nethunter -rstart Kali NetHunter CLI as ‘root’
nethunter -r kex passwdconfigure KeX password for ‘root’
nethunter -r kex &start Kali NetHunter Desktop as ‘root’
nethunter -r kex stopstop Kali NetHunter Desktop ‘root’ sessions
nethunter -r kex killkill all KeX sessions
nethunter -r <command>run command in NetHunter environment as ‘root’
Note: Command ‘nethunter’ can be abbreviated to ‘nh’. Background (&) jobs can be brought back to the foreground using ‘fg <job id>’ and return to background using ‘bg <job id>’ or CTRL + z

The Tips section at the end of the NetHunter Rootless Edition page suggests performing an update:

apt update && apt full-upgrade

This only seems to update a limited set of package indexes and upgrades nothing which points to there being some kind of issue.

To install the Kali Linux toolkit, carry out the following:

apt install kali-linux-default

This gives an “Unable to locate package kali-linux-default” error.

Clearly there seem to be some issues around the Kali Linux Rootless Edition distribution which require further investigation.

In our next article we will investigate these issues as well as attempt to upgrade a Nexus 7 to a later version of Android. The Android upgrade will help us understand if whether or not this does indeed address some or all of the issues encountered in this article.


Have you used the Kali Linux NetHunter Rootless Edition on Nexus devices? Did you encounter the same issues? Did you find any fixes to these problems? If so, please share these in the comments below.

Leave a Reply