Categories
How To...

How To install NetHunter Lite (part 2)

Having downloaded a ROM image and Rooting our Android device, we now turn to installing Kali Linux NetHunter Lite. This will give us a smartphone or tablet that is a dedicated and fully-featured mobile Pentesting platform.

In our previous article, How To install NetHunter Lite (part 1), we downloaded a pre-built ROM of Kali Linux NetHunter Lite matching the specification of our Android device. We then proceeded to Root this device. In this follow-up article we will perform the installation and initial run of NetHunter.

The instructions and screenshots during this How To will be from an Ubuntu 20.10 computer. An upcoming article will cover differences when performing this How To using Mac and Windows computers.

Important

The steps covered in this article involve flashing and modifying the ROM (Read-Only Memory) of our device with new software. This comes with inherent risk in that if it fails then the device ‘can’ be rendered unusable or unrecoverable.

Warning: Proceed with caution and at your own risk!

NetHunter Lite on a Nexus 7 …continued

We are installing Kali Linux NetHunter Lite on a 32 Gb Nexus 7 (2012 – WiFi only). These steps should be similar to installing on a different Android device e.g. Nexus 4 / 5 / 6 / 9 / 10 or OnePlus One.

Here are the main steps being carried out:

  1. Prerequisites
  2. Download pre-built image
  3. Rooting the device
  4. Verify device is Rooted
  5. Install NetHunter Lite
  6. Run NetHunter

Advisory: It is strongly suggest to read through the all of this article before performing any actions described.

In part 1 of this article we covered Steps 1-4, the remaining Steps will now be covered here in part 2.

Step 5 – Install NetHunter Lite

Now that we have successfully rooted our device we can now proceed to install our pre-built NetHunter Image:

  1. Copy the file from Step 3 (e.g. nethunter-2020.4-generic-armhf-kalifs-full.zip) into the Download folder on our device.
  2. Reboot the device using the Restart -> Bootloader via the Power button for LineageOS or ADB from our computer terminal:
adb reboot bootloader
  1. Start up TWRP via ‘Recovery mode’ from within the Bootloader.
  2. Click Wipe -> Advanced Wipe.
  3. Tick ‘Dalvik / ART Cache’ & ‘Cache’ and Swipe right to Wipe.
  4. Click back to main menu once done.
  5. Click Install, select NetHunter image file and Swipe right to Flash.
  6. Once complete Reboot System.
Successful flash of image onto Nexus 7.

Performing an Install of the image file causes the following if performed without first of all doing a Wipe:

Generic pre-built NetHunter image fails to flash.
LineageOS space issue

Installing NetHunter onto a stock Android device was straight forward, however the same cannot be said with LineageOS.

During the installation TWRP reported that there was insufficient space within ‘/system’. NetHunter needed 50Mb free whilst our device only had 43Mb available:

Not enough free space on ‘/system’ whilst installing NetHunter on LineageOS.

To free up space within ‘/system’ we are going to move some of the LineageOS pre-installed apps from ‘/system/app/’ to ‘/sdcard/Documents/’ temporarily:

  1. Boot device into TWRP.
  2. Click Mount and tick ‘System’. ‘Cache’ & ‘Data’ should already be ticked.
  3. Go back to main menu then click Advanced -> Terminal.
  4. First of all let’s check the size of the ‘/system/app’ folder (including sub-folders & files) prior to making space. The ‘du‘ command will give a total for each sub-folder then a grand total at the end:
du -shc /system/app/*
Size of ‘/system/app’ folders on LineageOS.
  1. Running the ‘df‘ command shows us that before freeing up space we have 85.7Mb available on the ‘system’ partition:
    • df -h /system
  2. Run the following commands (case sensitive) to free up space:
cd /system/app

cp -rcf Calendar DeskClock Email HTMLViewer PhotoTable WallpaperPicker /sdcard/Documents

ls -la /sdcard/Documents/*
  1. If the last command lists all the folders copied and each contains an associated .apk file then issue the following commands:
rm -r Calendar DeskClock Email HTMLViewer PhotoTable WallpaperPicker

du -shc /system/app/*

exit
  1. The ‘du‘ command will check the new size of the ‘/system/app’ folder (e.g. 115.4Mb in our case) and ‘df -h /system‘ confirms our available space is now 106.6Mb.
  2. Return to main menu then click Mount and untick ‘System’.
  3. Click back to main menu then click Wipe -> Advanced Wipe.
  4. Tick ‘Dalvik / ART Cache’ & ‘Cache’ and Swipe right to Wipe.
  5. Click back to main menu then Install, select the NetHunter image file and Swipe right to Flash. If you get an error with the handling of the ZIP file then reboot back into TWRP and try again.
  6. Once complete go back to the main menu then Mount and tick ‘System’.
  7. Click back to main menu then Advanced -> Terminal and issue the following commands:
cd /sdcard/Documents

cp -rcf Calendar DeskClock Email HTMLViewer PhotoTable WallpaperPicker /system/app

rm -r Calendar DeskClock Email HTMLViewer PhotoTable WallpaperPicker

exit
  1. Return to main menu then click Mount and untick ‘System’.
  2. Back in the main menu next select Reboot -> System.
NetHunter Lite installing once space freed up in ‘/system’.

Step 6 – Run NetHunter

Upon first startup of the device following a successful installation the NetHunter logo should appear:

NetHunter logo upon booting device after install.

After the logo the stock Android version proceeds to optimize 100+ apps which takes a while. The LineageOS version does not do this.

Once fully started there will be some additional apps installed namely NetHunter, NetHunter KeX, NetHunter Store, and NetHunter Terminal:

  1. Click the NetHunter app.
  2. During startup Root Access will be requested so click ‘Allow’.
NetHunter Lite main menu upon startup.
ISSUES ENCOUNTERED:

Android performance – whilst LineageOS has decent performance given the device hardware, the Android device was slow and lagged. This is down to the Google Account synching and can be address via:

  1. Settings -> Accounts.
  2. Click on account logged in as or the default ‘Google’ one.
  3. Click the account email and turn off the services you no longer want to sync. If you only want to use this device for NetHunter then disable all of them.

An even better option is to not even log into a Google Account and just download the .apk file for any apps you want to install.

NetHunter permissions on LineageOS – clicking the NetHunter app within the LineageOS version did not prompt for Root Access and hung with a blank screen. There is clearly an issue which needs further investigation as NetHunter Startup reported this error:

  • No root access is granted.
  • Busybox: OK.
  • Chroot: OK.
  • Make sure the above requirements are met.

This post may be a solution for this issue?

NetHunter Terminal problem – both Android and LineageOS versions encountered issues when starting NetHunter Terminal. Selecting ‘Android’ or ‘AndroidSU’ worked fine but selecting ‘Kali’ gave the following error:

  • No SU binary found! Missing root!

In upcoming articles we will examine installing a Custom ROM for NetHunter as well as demonstrate how to configure, navigate and use the NetHunter suite of apps. The last two issues above will also be investigated and hopefully resolved for NetHunter Lite.


Have you tried installing a pre-built NetHunter ROM? Do you have any suggested solutions for the issues encountered after installation? If so please let us know in the comments below.

Leave a Reply