Blog: Android

DIY dual boot Nexus tablet; make your own mobile test rig with NetHunter

Antonio Cassidy 24 Mar 2015

test-rig

Our previous post on setting up your very own Pwn Pad was really well received so we figured it would be a good idea to give an update for the newer hardware and NetHunter software. NetHunter is an android based pen test platform and it supports a range of Nexus devices (5/7/10), there is also apt support so you can pull down any console based application.

The Nexus 7 (2013) supports the latest android 5.X software, however NetHunter requires android 4.4.4. As I use my Nexus 7 for application testing downgrading is not really an option so I had to look into other alternatives.

Enter MultiROM

MultiROM is a multi-boot manager for the Nexus 7, it supports booting any Android ROM and it even has support for Ubuntu Touch. It also supports booting from an external USB drive connected via an OTG cable, so if you’re running low on disk space on your Nexus you can utilise an external drive.

MultiROM

So let’s get cracking with the steps to get up and running:

1. Root your Nexus 7 device, this has been documented a load of times so I’m not going to reinvent the wheel- Google is your friend here!
2. Install MultiROM from the Google Play store. When MultiROM is run for the first time it will check a number of things:
a. Is MultiROM up to date
b. Does the loaded kernel have kexec enabled (kexec is needed to run the rom kernel over the native)?
c. Is the recovery application the modified MultiROM version?
3. MultiROM will set all of the above up, when it prompts you to select the kernel version make sure you select the correct one!

The NetHunter OS is somewhat of a misleading name, it’s not actually an OS but rather a flashable file which is applied to a base ROM. So we are going to need a pre rooted stock ROM for our nexus device. For my 2013 Nexus 7 (WiFi) I used this ROM. The XDA forum will have a stock pre rooted imaged for your device so use the search function.

4. Once downloaded put this in the /sdcard/ directory on your device.

5. Next we need the corresponding NetHunter zip for your device, these can be downloaded here. Again stick this in the /sdcard/ directory on your device.

Your Android device has a number of different “boot levels”

System – This boots us into the main Android OS

Bootloader – This is code which is executed before the OS starts to run, think of it like the BIOS on your PC

Recovery – This is a low level boot mode which allows users to re-flash the ROM and recover (as the name suggests) from any system errors (like when someone accidently picks the wrong kernel in MultiROM!!)

MultiROM loads in a modified version of the custom TWRP recovery application, these modifications add a MultiROM menu and allows us to install our custom ROMS to dual boot.

6. Reboot your device into recover mode (this can be done from within MultiROM)
7. Install the pre rooted ROM:
a. Go to Advanced > MultiROM > Add ROM
b. Make sure Android is selected and click Next
c. Zip file, and browse to our pre-rooted 4.4.4 ROM zip on /sdcard/
d. Reboot your device when the install is finished and you should be presented with the MultiROM boot loader which should have:
i. Internal – Our stock Android OS
ii. Stock-Root-DeOdex.xxx – Our secondary ROM
e. Boot into the secondary ROM to make sure everything loads as normal

Now for NetHunter

8. Install NetHunter:
a. Reboot back into Recovery
b. Got to Advanced > MultiROM > List ROMs and select your secondary ROM
c. Select “Flash Zip” and select your NetHunter Zip on /sdcard/
d. Reboot when finished and select the secondary ROM from the MultiROM boot menu.
9. Enjoy NetHunter on your Nexus 7!

Notes

I found the menus within the NetHunter application gave me random errors when launching menus, it seems the Application had some issues so it’s best to download the latest APK (filename: nethunter.apk), and install it on your device.

My Alfa AWUS051NH (see below) worked right off the bat without the need to mess around with any custom Kernels.

Alfa AWUS051NH

I picked up the following eBay special for under £4:

MicroUSBHub

…it supports multiple USB devices (wificard + external drive) and has a mini USB adapter so you can connect an external power supply for power hungry devices. A Google search for “OTG hub nexus 7” should bring up a range of devices.

Further reading

MultiROM on XDA Dev:
http://forum.xda-developers.com/showthread.php?t=2011403

NetHunter Forum:
https://forums.kali.org/forumdisplay.php?14-NetHunter-Forums