[ROM][Official] Kali NetHunter for the Huawei Nexus 6P LOS17.1

Search This thread

yesimxev

Senior Member
May 8, 2017
489
166
I did

I need to recheck if I did, kinda forgot if I did or not xd

Edit: nope, is there a download link for it?
What zip you used to flash NetHunter? I usually say go to kali.org/get-kali#kali-mobile and find your device (so release images links won't die every 3 monts)

But since you asked now for WN722, I just added the support for that driver :)

Luckily it built with no errors. Flash this kernel in TWRP https://www.androidfilehost.com/?fid=4279422670115730196
 

underworld737

Senior Member
Feb 17, 2022
72
10
OnePlus 9
What zip you used to flash NetHunter? I usually say go to kali.org/get-kali#kali-mobile and find your device (so release images links won't die every 3 monts)

But since you asked now for WN722, I just added the support for that driver :)

Luckily it built with no errors. Flash this kernel in TWRP https://www.androidfilehost.com/?fid=4279422670115730196
Thanks, the external adapter works, and properly goes into monitor mode on the external adapter
 
  • Like
Reactions: yesimxev

underworld737

Senior Member
Feb 17, 2022
72
10
OnePlus 9
That's awesome! Will push for next release 🎉
Hey, came back for a different problem now, everytime I open nethunter terminal, it would give me an error "su warning: cannot change directory to /root: Operation not permitted" I've looked around the Kali forums, but couldn't find an exact answer.
 

Attachments

  • Screenshot_20230324-200400_Gallery.png
    Screenshot_20230324-200400_Gallery.png
    610.9 KB · Views: 11

sebskies

Member
Feb 24, 2012
16
0
That's awesome! Will push for next release 🎉
Hey there! So same spot here (using WN722*V2*) I flashed this kernel just fine but for me I could not get monitor mode to work strangely enough. So I ended up downloading Wireless Firmware for Nethunter using fox's MMM into Magisk(Latest version) and to my surprise I could get airmon-ng and everything working, monitor mode, seeing AP's around me, and receiving packets. I didn't test much further but the other weird part is while doing most of the commands I would constantly get the error (ERROR adding monitor mode inferface: command failed: operation not supported (-95) but it was still working? So not sure what's going on there 😅

Realizing as I'm typing this I never did "nexutil -m2" and then the export. But this was because I never had the kalilibnexmon.so file in the first place. Whenever I downloaded the nexmon_draco.zip it was not in there, only 3 files (nex, libnexmonkali, libnexmon) Was kalilibnexmon.so supposed to be in there or am I missing something? So I stopped the tutorial at that, never getting to the "wget" part of course. Perhaps if I could get that file I could uninstall the firmware and try again.

Nevertheless I think I'm at a pretty good working point but I did have one final question. This one isn't that big of a deal if it doesn't work but do you know a way of getting the zsh syntax highlighting and autosuggestions to work? I tried everything that I could find online but just can't seem to get it. Editing the bash file, creating new user, copying to the root, editing the files with nano to enable syntax but nothing unfortunately. I just got so used to it on my laptop using a live USB, especially the autosuggestion. I actually tried nethunter on a oneplus 8 and I swear it was working there, but could not get that phone to work for me(Verizon version) so I switched to this one.

Apologies for the wall of text but I really appreciate your work, you are awesome! 😁

Thank you for any help!
 

sebskies

Member
Feb 24, 2012
16
0
Hey, came back for a different problem now, everytime I open nethunter terminal, it would give me an error "su warning: cannot change directory to /root: Operation not permitted" I've looked around the Kali forums, but couldn't find an exact answer.
So I actually ran into this issue many times, many wipes, many reboots, exhausting.. 😭

But this is because you're still encrypted. What I "believe" did the trick for me was during the step "- Copy fstab to /system_root/, and format data" I also flashed the file Disable_Dm-Verity_ForceEncrypt_11.02.2020.zip and no-verity-opt-encrypt-6.1.zip Probably just need to do the first one but did both because of so many attempts lol. Only problem is I can't remember if I did it before or after "format data" But something did the trick there and I was left decrypted and didn't have that issue again.

One strange thing I noticed is that even after wiping data, factory reset, etc (except for LOS17 of course) all the nethunter apps would still be there. Didn't mess up the process but thought that was interesting. I couldn't find any other way to get out of that error other than starting from the start unfortunately.
 

yesimxev

Senior Member
May 8, 2017
489
166
Hey there! So same spot here (using WN722*V2*) I flashed this kernel just fine but for me I could not get monitor mode to work strangely enough. So I ended up downloading Wireless Firmware for Nethunter using fox's MMM into Magisk(Latest version) and to my surprise I could get airmon-ng and everything working, monitor mode, seeing AP's around me, and receiving packets. I didn't test much further but the other weird part is while doing most of the commands I would constantly get the error (ERROR adding monitor mode inferface: command failed: operation not supported (-95) but it was still working? So not sure what's going on there 😅

Realizing as I'm typing this I never did "nexutil -m2" and then the export. But this was because I never had the kalilibnexmon.so file in the first place. Whenever I downloaded the nexmon_draco.zip it was not in there, only 3 files (nex, libnexmonkali, libnexmon) Was kalilibnexmon.so supposed to be in there or am I missing something? So I stopped the tutorial at that, never getting to the "wget" part of course. Perhaps if I could get that file I could uninstall the firmware and try again.

Nevertheless I think I'm at a pretty good working point but I did have one final question. This one isn't that big of a deal if it doesn't work but do you know a way of getting the zsh syntax highlighting and autosuggestions to work? I tried everything that I could find online but just can't seem to get it. Editing the bash file, creating new user, copying to the root, editing the files with nano to enable syntax but nothing unfortunately. I just got so used to it on my laptop using a live USB, especially the autosuggestion. I actually tried nethunter on a oneplus 8 and I swear it was working there, but could not get that phone to work for me(Verizon version) so I switched to this one.

Apologies for the wall of text but I really appreciate your work, you are awesome! 😁

Thank you for any help!
Use monitor mode for wlan1 in NH app, it should put into monitor mode properly. Not sure about autosuggestion, it works for me out of the box. Is it definitely running zsh, not bash?

For nexmon, yes follow my instructions on the end if first post. using nexutil in androidsu, exporting kalilibnexmon in each kali terminal. Export with full path eg. /root/kalilibnexmon.so
 

yesimxev

Senior Member
May 8, 2017
489
166
So I actually ran into this issue many times, many wipes, many reboots, exhausting.. 😭

But this is because you're still encrypted. What I "believe" did the trick for me was during the step "- Copy fstab to /system_root/, and format data" I also flashed the file Disable_Dm-Verity_ForceEncrypt_11.02.2020.zip and no-verity-opt-encrypt-6.1.zip Probably just need to do the first one but did both because of so many attempts lol. Only problem is I can't remember if I did it before or after "format data" But something did the trick there and I was left decrypted and didn't have that issue again.

One strange thing I noticed is that even after wiping data, factory reset, etc (except for LOS17 of course) all the nethunter apps would still be there. Didn't mess up the process but thought that was interesting. I couldn't find any other way to get out of that error other than starting from the start unfortunately.
When you replace fstab, there won't be an instruction for the OS to encrpyt storage on boot. When you format, you get rid of the old encrypted data structure. So when you reboot, it's not encrypted, and thanks to patched fstab, it won't be encrypted at boot
 

sebskies

Member
Feb 24, 2012
16
0
When you replace fstab, there won't be an instruction for the OS to encrpyt storage on boot. When you format, you get rid of the old encrypted data structure. So when you reboot, it's not encrypted, and thanks to patched fstab, it won't be encrypted at boot
Appreciate the quick reply! Going to reply to the other post here too. But I have some interesting things going.. I would like to note I reverted any changes earlier/edits to files trying to get it working so everything should be back to default. Also I when I first began I originally flashed the most recent nethunter on kali's website nethunter-2023.1-angler-los-ten-kalifs-full but I that's where I was having the most issues in so most recently I used nethunter-20201002_013915-angler-los-ten-kalifs-full.zip from your host site and then used the kernel from the above and had most success.

And just to clarify the file kalilibnexmon.so is not in the zip, but it will be on the system once you get to the using AndroidSU step?

Makes sense about fstab, not sure why I was having issues but probably user error of course.

Now as far as the terminal, this is where I'm at a loss now. It was not running in zsh. I switched to zsh using chsh -s $(which zsh) but instead of gaining highlighted syntax and and autosuggestion.. well have a look (switched back to bash on last picture)

Thanks again!
 

Attachments

  • Net-Hunter-Terminalbash.png
    Net-Hunter-Terminalbash.png
    14.3 KB · Views: 15
  • switch to zsh.png
    switch to zsh.png
    11.6 KB · Views: 17
  • backtobash.png
    backtobash.png
    47.6 KB · Views: 17

yesimxev

Senior Member
May 8, 2017
489
166
Appreciate the quick reply! Going to reply to the other post here too. But I have some interesting things going.. I would like to note I reverted any changes earlier/edits to files trying to get it working so everything should be back to default. Also I when I first began I originally flashed the most recent nethunter on kali's website nethunter-2023.1-angler-los-ten-kalifs-full but I that's where I was having the most issues in so most recently I used nethunter-20201002_013915-angler-los-ten-kalifs-full.zip from your host site and then used the kernel from the above and had most success.

And just to clarify the file kalilibnexmon.so is not in the zip, but it will be on the system once you get to the using AndroidSU step?

Makes sense about fstab, not sure why I was having issues but probably user error of course.

Now as far as the terminal, this is where I'm at a loss now. It was not running in zsh. I switched to zsh using chsh -s $(which zsh) but instead of gaining highlighted syntax and and autosuggestion.. well have a look (switched back to bash on last picture)

Thanks again!
Old Kali had only bash, so if you want, switch to zsh manually. Kalilibnexmon is in the zip as you said. Place the file to kali /root
 

Attachments

  • Screenshot_20230329-170724_Opera.png
    Screenshot_20230329-170724_Opera.png
    157.1 KB · Views: 9

sebskies

Member
Feb 24, 2012
16
0
Old Kali had only bash, so if you want, switch to zsh manually. Kalilibnexmon is in the zip as you said. Place the file to kali /root
This is what I get when I open the zip. Where do you find kalilibnexmon.so or are you supposed to rename libnexmonkali.so? I'm sorry if this sounds so clueless 😭 Appreciate your patience and help again.
 

Attachments

  • Untitled.png
    Untitled.png
    35.3 KB · Views: 7

sebskies

Member
Feb 24, 2012
16
0
That is, libnexmonkali.so, sorry no one knows where to put kali 😂
So I was able to fix the bash_completion error with apt install --reinstall bash-completion

Removed the other firmware, did the last steps but unfortunately came to this error (cannot open shared object file) I wasn't able to get around that and never got to launch monitor mode/attempt anything further. Note I did not attempt a fresh install to get to the last step so that could be it but not sure honestly.

I went ahead back to the Wireless Firmware for Nethunter and got it all working again, got to the point where you start cracking the WPA key but I didn't want to mess with my wifi any further lol.

And lastly for the life of me I cannot figure out how to get the zsh syntax coloring/autosuggestions after many different attempts. Just want my colors back 😭 but if that's my only issue I'll take it haha.
 

Attachments

  • export.png
    export.png
    35.5 KB · Views: 4

riomenx

Member
Feb 2, 2020
22
3
Forgive me for the ridiculous questions.
- Reboot into TWRP
- Copy fstab to /system_root/
Code:
adb push fstab.angler /sdcard/
adb shell "twrp mount /system_root && twrp remountrw /system_root && cp /sdcard/fstab.angler /system_root/"
1)Are these commands executed in TWRP?
- copy Nexmon libs over to /system/lib64/ from the nexmon.zip (not in TWRP):
Code:
adb push libnexmon* /sdcard/ && adb push nexutil /sdcard/
- and copy using androidsu terminal:
Code:
mount -o rw,remount / && cp /sdcard/libnexmonkali.so /system/lib64/kalilibnexmon.so && cp /sdcard/libnexmon.so /system/lib64/ && cp /sdcard/nexutil /system/xbin/ && chmod a+x /system/xbin/nexutil
2)How should I do the copying via android su if Nethunter is not installed yet?
For devices which have no space left on system: you need to copy those files before flashing NetHunter. I didn't have this problem, maybe due to GApps pico. Then use the following commands in TWRP:
Code:
twrp mount /system_root && twrp remountrw /system_root && cp /sdcard/libnexmonkali.so /system_root/system/lib64/kalilibnexmon.so && cp /sdcard/libnexmon.so /system_root/system/lib64/ && cp /sdcard/nexutil /system_root/system/xbin/ && chmod a+x /system_root/system/xbin/nexutil
3)This code is executed for those who have no space left?
4)We take the last Nethunter image from here https://www .kali.org/get-kali/#kali-mobile?
5)What is this Bootanimation TWRP flashes file for - https://www.androidfilehost.com /?fid=10763459528675571003. I didn't see this file used in the instructions
6)What this code gives us:
echo LD_PRELOAD=/system/lib64/kalilibnexmon.so
Do I need to enter the code in the kali terminal?
 

riomenx

Member
Feb 2, 2020
22
3
I'm stuck on this step):
Copy fstab to /system_root/, and format data
The system boots into TWRP mode after formatting.
TWRP 3.3.1.0-FBE-10+-angler
 
Last edited:

riomenx

Member
Feb 2, 2020
22
3
I did the step like this:
reboot into recovery
download and unpack the fstab.zip archive into the phone's memory
in recovery, press Mount - select system, go back to the recovery menu
click advanced - file manager select the sdcard folder, find the fstab.angler file there, select it, click copy file, select the system root folder, and click the folder icon in the lower right corner.
return to the menu, select wipe - format data, wait for formatting, reboot into the system with the reboot button
wait for the system to load
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1

    yesimxev


    The squasfs mirror is down.

    Do you mind uploading it please?
  • 17
    https:_gitlab.com_kalilinux_nethunter_build-scripts_kali-nethunter-project_raw_master_images_n...png


    I present to you: Kali NetHunter for the Huawei Nexus 6P LOS17.1

    Kali NetHunter is an Android ROM overlay that turns an ordinary phone into the ultimate Mobile Penetration Testing Platform.
    The overlay includes a custom kernel, a Kali Linux chroot, an accompanying Android application, which allows for easier interaction with various security tools and attacks, as well as a client to the Kali NetHunter App Store.
    Beyond the penetration testing tools arsenal within Kali Linux and the Kali NetHunter App Store, NetHunter also supports several additional classes, such as HID Keyboard Attacks, BadUSB attacks, Evil AP MANA attacks, and much more. For more information about the moving parts that make up NetHunter, check out our NetHunter Components page.
    NetHunter is an open-source project developed by Offensive Security and the community.

    ~ Prerequisites ~
    - TWRP - https://drive.google.com/open?id=1axm3GVbTKypUdQAuYubNknJX4wKRFIec
    - Stock components - vendor, radio, & bootloader img's from the stock oreo 8.1 OPM7.181205.001 Dec 2018 factory image - https://androidfilehost.com/?w=files&flid=286833
    - Magisk – https://forum.xda-developers.com/apps/magisk

    ~~ Downloads ~~
    - NetHunter installer (find the latest release for Nexus 6P): https://www.kali.org/get-kali/#kali-mobile
    - fstab with disabled forceencrpyt - https://www.androidfilehost.com/?fid=4349826312261764572
    - vendor image with patched fw for nexmon - https://www.androidfilehost.com/?fid=8889791610682949885
    - nexmon zip with nexutil and libs - https://www.androidfilehost.com/?fid=8889791610682951480
    - Bootanimation TWRP flasher - https://www.androidfilehost.com/?fid=10763459528675571003

    ~~ How to Install ~~
    - Assuming you have flashed stock radio, vendor, bootloader, TWRP, and Lineage 17.1 (using the steps from https://forum.xda-developers.com/ne...t/rom-lineageos-17-0-nexus-6p-angler-t4012099)
    - Plug in to PC if you haven't done that yet
    - Reboot into TWRP
    - Format data
    - Copy Magisk, NetHunter image, and fstab to USB-C drive or adb push to /sdcard
    - Reboot into bootloader and flash vendor which was unzipped from zip
    Code:
    fastboot flash vendor vendor.squashfs
    - Reboot into TWRP
    - Copy fstab to /system_root/
    Code:
    adb push fstab.angler /sdcard/
    adb shell "twrp mount /system_root && twrp remountrw /system_root && cp /sdcard/fstab.angler /system_root/"
    - Format data
    - Reboot to system & do Android setup
    - Reboot into TWRP
    - Install Nexmon files through adb, from the zip above
    Code:
    twrp mount /system_root && twrp remountrw /system_root && cp /sdcard/libnexmonkali.so /system_root/system/lib64/kalilibnexmon.so && cp /sdcard/libnexmon.so /system_root/system/lib64/ && cp /sdcard/nexutil /system_root/system/xbin/ && chmod a+x /system_root/system/xbin/nexutil
    - Flash NetHunter image
    - Flash Magisk
    - Reboot
    - Run NetHunter app, update from NH Store
    - Reboot

    ~~~ Notes & Updates ~~~
    Nexmon is finally working with injection in Kali Chroot , although EAPOL data is still not (or malformed) in the captures.

    - copy Nexmon libs over to /system/lib64/ from the nexmon.zip (not in TWRP):
    Code:
    adb push libnexmon* /sdcard/ && adb push nexutil /sdcard/
    - and copy using androidsu terminal:
    Code:
    mount -o rw,remount / && cp /sdcard/libnexmonkali.so /system/lib64/kalilibnexmon.so && cp /sdcard/libnexmon.so /system/lib64/ && cp /sdcard/nexutil /system/xbin/ && chmod a+x /system/xbin/nexutil

    For devices which have no space left on system: you need to copy those files before flashing NetHunter. I didn't have this problem, maybe due to GApps pico. Then use the following commands in TWRP:
    Code:
    twrp mount /system_root && twrp remountrw /system_root && cp /sdcard/libnexmonkali.so /system_root/system/lib64/kalilibnexmon.so && cp /sdcard/libnexmon.so /system_root/system/lib64/ && cp /sdcard/nexutil /system_root/system/xbin/ && chmod a+x /system_root/system/xbin/nexutil

    Thanks @JaK3sT for discovering this!

    You have to make sure that wifi is on but you're not connected to an AP.
    Enable in AndroidSU terminal, I created a custom command with
    Code:
    nexutil -m2
    Export LD_PRELOAD for faking ioctl in every Kali Chroot terminal window you open
    Code:
    export LD_PRELOAD=/system/lib64/kalilibnexmon.so

    Hijacker is not fully supported as I've built one with aarch64 tools, but it randomly stops airodump although it's working. Will give it a shot in the future.

    - Mana is being replaced, for the time being you can downgrade iptables in chroot with the following :
    Code:
    wget http://old.kali.org/kali/pool/main/i/iptables/iptables_1.6.2-1.1_arm64.deb
    wget http://old.kali.org/kali/pool/main/i/iptables/libip4tc0_1.6.2-1.1_arm64.deb
    wget http://old.kali.org/kali/pool/main/i/iptables/libip6tc0_1.6.2-1.1_arm64.deb
    wget http://old.kali.org/kali/pool/main/i/iptables/libiptc0_1.6.2-1.1_arm64.deb
    wget http://old.kali.org/kali/pool/main/i/iptables/libxtables12_1.6.2-1.1_arm64.deb
    
    dpkg -i *.deb
    
    apt-mark hold iptables
    apt-mark hold libip4tc0
    apt-mark hold libip6tc0
    apt-mark hold libiptc0
    apt-mark hold libxtables12

    Credits: The Offensive Security Team and the NetHunter community, huge thanks to Re4son & kimocoder for patching the wlan1 insert reboot issue! Long time mystery.
    Another extremely big thanks for @draco42 for patching libnexmon and kalilibnexmon!

    Android Version: 10.0

    XDA: DevDB Information
    Kali Nethunter, Kernel & ROM for the Huawei Nexus 6P

    Contributors
    @Re4son, @kimocoder, @yesimxev, @draco42

    Source Code: https://gitlab.com/kalilinux/nethunter/
    Kernel Source: https://github.com/Re4son/android_kernel_huawei_angler
    5
    yes brother. but what about LOS ??? i'm facing issues with it.

    Beside the annoying forced encryption and the regarding usage of a compatible FBE recovery build of Twrp, which need endlessly to boot up by the way, couldn't I detect any major or even minor problems with the new release.

    I am not a particular fan of LineageOS, never was, but @Re4son hit it with this kernel definitely one wide over the fence. *gg*

    For future reference -

    Statments like "facing issues'" aren't particular information sources.

    I do normally not respond to such posts at all, but _if_ there are actually problems, you should provide logcats, dmesg or adb outputs.

    Otherwise nobody can help you. ;)

    Many heaps

    edit.

    I wanted to underline the above message.

    I waited a long time and two Nexus 6P for these releases.
    In the meantime did I try to help and supported several user all over the Nethunter related kernel releases on XDA over 3 years [no bragging, just fyi!].

    It would be a shame to see this thread overrun with statments like above, or dumb talk in which degree whatever.

    This phone is an old timer with huge hardware issues and the user who use it, didn't run into Blod/battery or complete meltdown failure yet, or are just Nexus addicts and massive fanbois ^^

    With a reference to post from developer like @yesimxev, @Re4son and @kimocoder, who are undoubtedly pros in various areas (kernel development, wireless technology, network, pen-testing..), with limited resources like time, energy and the graciousness of giving a crap^^(scnr), does it go (hopefully) without saying that every user behaves, provides the very easy to obtain, above mentioned, log reports and don't start with such nonsense, if someone "could hack a(sic!) wifi", "my gf's facebook" or any other of these kind of dumb requests.

    I hope we can try to treasure this amazing work for some time longer..

    With best wishes

    UsPdSr
    2
    For all those who suffered because of my booboo. To install fstab.angler, do:
    Code:
    adb push fstab.angler /sdcard/
    adb shell "twrp mount /system_root && twrp remountrw /system_root && cp /sdcard/fstab.angler /system_root/"
    Then continue with the step format /data
    I'll revise the instructions soon
    2
    @Re4son @kimocoder
    @yesimxev

    Wow, you guys are on fire.

    Congratulations to this great updates and foremost the long outstanding release for the Angler!
    Which under Oreo flawlessly works now.
    No nasty reboots while attempting to set your nic into monitor mode for sure. :good:

    Kimocoder did an amazing job with the port of the new driver.

    I could basically use every adapter. Especially the ac ones.

    You accidentally mixed up some of the links.

    This is the Angler (Huawei Nexus 6P) sub-forum and you posted a link for the installer to the Shamu (Motorola Nexus 6).

    Also did I try to look over the source and compiled it for myself, but after everything was set up, my kernel and chroot & everything else, the usb adapter plug in/out bug occurred again.

    Re4son worked on flair's source 16days ago.

    Where can I find the one you used in the new release?

    Here is the link to the correct one - >

    https://build.nethunter.com/contrib...er-2020.2-pre3-angler-los-ten-kalifs-full.zip

    For the user who aren't comfortable to use Android ten for other reasons, here the recommended stable release for Android Oreo stock - >

    https://build.nethunter.com/contrib...unter-2020.2-pre3-angler-oreo-kalifs-full.zip

    I had no time the last week(s), but I did see a couple of issues who need to be addressed.

    One of the main problems with the new Oreo kernel neither Nexmon or the new QUALCOMM patch from kimocoder and Co. are working.

    I will come back to this when I have the time..

    Firstly great work to the entire team and big thanks for this great contribution :):cowboy:
    2
    Yes looks right, but to be honest i personally haven't used the commands when copying😅. I literally used TWRP's file manager and copied them manually.