Skip to content

Instantly share code, notes, and snippets.

@binkybear
Last active September 14, 2026 13:31
Show Gist options
  • Select an option

  • Save binkybear/8f0f4eee292d5263372f47c3c3edd08e to your computer and use it in GitHub Desktop.

Select an option

Save binkybear/8f0f4eee292d5263372f47c3c3edd08e to your computer and use it in GitHub Desktop.
Nethunter ROM on Nexus 5 & 6P with Nexmon (testing only)

Nethunter OS on Nexus 5/Nexus 6P

Here are instructions to install Nethunter (as a ROM) with working native monitor mode in the chroot using Nexmon. The ROM is a modified CM 14.1 (nougat) base with custom kernel which supports: HID, Drivedroid, Kexec, and external wireless.

What you need

You will need the following 3 items (maybe 4):

Nexus 5 Devices:

Nexus 6P

All devices

SHA512 for Nethunter OS Nexus 5: 2da699575ffdf5310c498f526f8570f3594d89e5bbcf32d648fb4cd5d0dfb04d8b9a6e282e51a05bbbe63247e0037fe9aaf364ccdc393dfe54c5a531cc23aad2

SHA512 for Nethunter OS Nexus 6P:a2352000cc468888c515ae0c71fa7673542c1387fbff1e2682109da496b407c4a23f889a12434cd30f9dae8542e3b6a25c2c266be7e8a59f673314a312004eba

SHA512 for kalifs is updated and should match https://images.offensive-security.com/version.txt or version.txt on github https://github.com/offensive-security/kali-nethunter/blob/master/version.txt

How to unlock device & flash recovery

Have you flashed Cyanogenmod before? If you can flash CM or a ROM its exactly the same way.

There is the easy way:using the Nexus Root Toolkit

There is the harder way:

  1. Download ADB and fastboot (depends on OS/distro)
  2. Put phone into fastboot by holding down vol down + power
  3. Warning this will wipe device In terminal on computer: fastboot oem unlock && fastboot reboot
  4. Reboot back into fastboot
  5. In terminal on computer: fastboot flash recovery TWRP_multirom_hammerhead_20160210.img
  6. Now boot into recovery by either using menu in fastboot or holding volume up + power.

Flashing in TWRP

If you have made into recovery you will want to copy the NethunterOS zip file to your device and maybe also the radio zip file.

  • Always make a backup of a working OS under the backup tab. Select system/data/boot
  • Wipe any previous ROMs by going to wipe tab. Select Advanced Wipe & system/data/cache
  • Finaly go to install button and select NethunterOS zip file.

Setting Up

Reboot your device. When it starts up the first time it will reboot once, don't be nervours.

After your device loads go through the normal CM set up. Copy the kalifs-full.tar.xz from your computer to your device. Then:

  1. Go to the Nethunter app
  2. Go to "Kali Chroot Manger" after accepting permissions. If previous Chroot was found click "Remove Chroot" first.
  3. Click on "Install Chroot" > Use SDCARD > Use Full
  4. Exit out of app and run Nethunter terminal app and launch into Kali terminal

Monitor mode specifics

There is a specific binary file for loading mointior mode inside chroot. To run it inside Kali terminal:

source monstart-nh

To stop run:

source monstop-nh

Since we are using LD_PRELOAD the monitor mode is essentialy tied to the terminal window. So if you open a new window make sure you rerun script.

The technical explanation is we need to set LD_PRELOAD to our ioctl intercept that was compiled inside chroot. When the chroot is run we have to unset LD_PRELOAD and we are essentially telling the terminal to run LD_PRELOAD before each command.

It's a simple bash script and you can view it in /system/xbin/monstart-nh

Updating ROM

If new versions come out you can flash ROM without having to go through most of the early steps. You can just go straight into recovery and install the zip file over ROM.

Todo

Here are things that need to be done for Nethunter OS:

  • Add extra apks to Nethunter OS (drivedroid etc)
  • Add a native updater
  • Fix wallpaper offset

Sources

Source files can be found @:

https://github.com/nethunteros

Kernel Source

Device Source

@ComputerGuy99

Copy link
Copy Markdown

I finally got my hands on a nexus 5. Trying to get monitor mode working with the internal wireless controller so I can use wifite.
I flashed lineage-14.1-20190126-nightly-hammerhead-signed.zip, Magisk-v31.0-legacy.zip, and kali-nethunter-2026.2-hammerhead-los-nougat-full.zip
Unfortunately, when I run ifconfig wlan0 up I get the error SIOCSIFFLAGS: Operation not permitted
I tried installing nexmon from fdroid and installing the packages it provides. But after clicking enable monitor mode it caused my device to bootloop.
I did a dirty flash to get it back up an running. I then learned about the hammerheadmon.zip which is no longer hosted on lineageOS servers.
I found the google drive link above and flashed the 1st_zip_to_flash_-_kernel-nethunter-hammerheadmon-nougat-2019.03-13-0514.zip I downloaded from there.
Unfortunately I still can't get monitor mode working. Am I missing something?

@lsd2010

lsd2010 commented Sep 10, 2026 via email

Copy link
Copy Markdown

@lsd2010

lsd2010 commented Sep 10, 2026 via email

Copy link
Copy Markdown

@ComputerGuy99

Copy link
Copy Markdown

Hello,
Thank you for the quick reply.
Even when I start wifite and select wlan0, wifite quits and prints an error. I don't remember the exact error off the top of my head but I did research it and it is related to the wireless card not being able to enter monitor mode.
As for sharing files. Google drive is honestly one of the worst options out there since they scan files and take down anything they don't like.
Give https://anonfilesnew.com/ or https://wetransfer.com/ a try.
I am not sure what you mean by post phone to me?
If you are referring to sending the device to you. I don't think I would be able to do that.
Shipping in my country is outrageously expensive. Also, once I get my device working, I would also like to help a friend install wifite with monitor mode on the internal wireless card on his device as well.
I have a nexus 5. My friend has either a nexus 6 or 6p I think. Can't remember the exact model. Could you share the roms and instructions for both devices?
Thank You.

@NUMAflex

NUMAflex commented Sep 14, 2026 •

Copy link
Copy Markdown

I finally got my hands on a nexus 5. Trying to get monitor mode working with the internal wireless controller so I can use wifite. I flashed lineage-14.1-20190126-nightly-hammerhead-signed.zip, Magisk-v31.0-legacy.zip, and kali-nethunter-2026.2-hammerhead-los-nougat-full.zip Unfortunately, when I run ifconfig wlan0 up I get the error SIOCSIFFLAGS: Operation not permitted I tried installing nexmon from fdroid and installing the packages it provides. But after clicking enable monitor mode it caused my device to bootloop. I did a dirty flash to get it back up an running. I then learned about the hammerheadmon.zip which is no longer hosted on lineageOS servers. I found the google drive link above and flashed the 1st_zip_to_flash_-_kernel-nethunter-hammerheadmon-nougat-2019.03-13-0514.zip I downloaded from there. Unfortunately I still can't get monitor mode working. Am I missing something?

Yo! Sorry for the late reply, this was back then the easiest way to get hammerhead (nexus 5) to work flawlessly:
USE Magisk-v23.0.zip. Don't go any version higher than this. If something's wrong try v21 instead.

nethunteros-nethunter-hammerhead-cm-14.1-hammerhead.zip + kalifs-full.tar.xz and that's it. Everything setup already (monitor mode and injection)

https://www.mediafire.com/file/xl1qfne5b6bg21d/kalifs-full.tar.xz/file
https://www.mediafire.com/file/6a0d1v6mybnl8dy/kalifs-full.tar.xz.md5/file

https://www.mediafire.com/file/so8gyc9y3ssd366/nethunteros-nethunter-hammerhead-cm-14.1-hammerhead.zip/file
https://www.mediafire.com/file/76nprsa0ehkdlet/nethunteros-nethunter-hammerhead-cm-14.1-hammerhead.zip.md5/file

I also have the opengapps to work with it, a really old one. Shout if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment