• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[ROM][Official] Kali NetHunter for the OnePlus One LineageOS 17.1 Q

Search This thread

yesimxev

Senior Member
May 8, 2017
178
66
I used both TWRP 3.4 and 3.5, same result. Sideload didn't work either. Managed to get Magisk flashed. That first had the same error as the rest. Last it went well. So, I thought, lets go for NH too. Nope. Error again.

Tomorrow I will download everything fresh again from the web, and see if it works. Maybe the USB stick got corrupted somehow? Got another one to try.

Which chipset is supported on the OPO, if not 8812au?
Is the NetHunter my generic fs installer zip is messed up? Can you flash if you adb push the file onto /sdcard/?
Mostly these:
ATH9K_HTC (AR9271, AR7010)
Ralink
  • RT73
  • RT2800USB
  • RT3070
Realtek
  • RTL8188EUS
  • RTL8188CU
  • RTL8188RU
  • RTL8192CU
  • RTL8192EU
  • RTL8723AU
 

yesimxev

Senior Member
May 8, 2017
178
66
Alfa AWUS036ACH with Realtek rtl8812au chip (have the latest drivers)

Can we make it really work?

(mind you, pentesters at $ 200K a year are probably not willing to spent so much time on getting a tool to work. I'm just a student in pentesting and still learning, so economics are not that much of an issue, yet).
I wish to be a pentester, in progress ;)
 

Ween Dwijler

Member
Feb 6, 2021
32
2
Thailand
I wish to be a pentester, in progress ;)

Part 1

Ok, here we go.

System = LineageOS 17.1, TWRP 3.5 (or 3.4, problem is the same)

Problem 1 -- "Updater process ended with ERROR: 1"

Problem 2 -- after using setprop an extra message occured "failing to map /usb_otg etc."

Problem 1 was fixed with re-flashing the boot.img, however, it only worked for Magisk. Nethunter kept having the same messages: ERROR 1 and Failing to map.

It turns out that TWRP doesn't work well on LineageOS 17.1, causing those messages.

To test this, I re-flashed LineageOS 16.1, flashed Magisk, and after flashed nethunter-2020.4-oneplus1-pie-kalifs-full.zip. No errors occurred.

But... now the next error popped up, in Nethunter chroot.

"sdcard/lib/modules/3.4.113-yesimxev-lineageos-ga06023c36fa-dirty doesn't exist or isn't mounted. "

I've seen that one before. Update && Upgrade didn't solve it. So, I will move on to install LineageOS 17 and see what happens than.

Part 2, about that, will follow later today.
 

Ween Dwijler

Member
Feb 6, 2021
32
2
Thailand
Is the NetHunter my generic fs installer zip is messed up? Can you flash if you adb push the file onto /sdcard/?
Mostly these:
ATH9K_HTC (AR9271, AR7010)
Ralink
  • RT73
  • RT2800USB
  • RT3070
Realtek
  • RTL8188EUS
  • RTL8188CU
  • RTL8188RU
  • RTL8192CU
  • RTL8192EU
  • RTL8723AU

I don't really understand it. Look at the screenshot of Kali Nethunter website, mentioning the alfa AWUS036ACH as being confirmed to be working with a Nethunter build.

?????
 

Attachments

  • Screen Shot 2021-02-07 at 17.09.52.png
    Screen Shot 2021-02-07 at 17.09.52.png
    46.7 KB · Views: 18

Ween Dwijler

Member
Feb 6, 2021
32
2
Thailand
Part 1

Ok, here we go.

System = LineageOS 17.1, TWRP 3.5 (or 3.4, problem is the same)

Problem 1 -- "Updater process ended with ERROR: 1"

Problem 2 -- after using setprop an extra message occured "failing to map /usb_otg etc."

Problem 1 was fixed with re-flashing the boot.img, however, it only worked for Magisk. Nethunter kept having the same messages: ERROR 1 and Failing to map.

It turns out that TWRP doesn't work well on LineageOS 17.1, causing those messages.

To test this, I re-flashed LineageOS 16.1, flashed Magisk, and after flashed nethunter-2020.4-oneplus1-pie-kalifs-full.zip. No errors occurred.

But... now the next error popped up, in Nethunter chroot.

"sdcard/lib/modules/3.4.113-yesimxev-lineageos-ga06023c36fa-dirty doesn't exist or isn't mounted. "

I've seen that one before. Update && Upgrade didn't solve it. So, I will move on to install LineageOS 17 and see what happens than.

Part 2, about that, will follow later today.

Part 2

Reinstalled LineageOS 17.1 and it indeed turns out that TWRP doesn't like to work in LOS 17.1 Got the same ERROR 1 as before. So that's it for this combination of agony. At least for me. No 17.1 with TWRP 3.4 or 3.5.

I will see if a lower version will work on it.

To be continued
 

Ween Dwijler

Member
Feb 6, 2021
32
2
Thailand
Part 2

Reinstalled LineageOS 17.1 and it indeed turns out that TWRP doesn't like to work in LOS 17.1 Got the same ERROR 1 as before. So that's it for this combination of agony. At least for me. No 17.1 with TWRP 3.4 or 3.5.

I will see if a lower version will work on it.

To be continued

Part 3

Indeed TWRP 3.1.1 did work.

First flashed the file nethunter-2020.4-generic-armhf-kalifs-full.zip (downloaded from the link you provided in the beginning of this thread) and after flashed the file kernel-nethunter-20210206_204827-oneplus1-ten.zip (from your last link).

Unfortunately, icons don't show up in program slide. What did I do wrong? Did I first had to install the previous kernel, the one from 20210117_044828? Or the original kernel and than patch these ones on it?
 

yesimxev

Senior Member
May 8, 2017
178
66
Hmmm...... I just spent about a full week to get Nethunter functional on an Oneplus One. It was a very revealing journey, lots of flashing, bricking, flashing, upgrading, downgrading,I've learned a lot.

Tried CM and LOS 16 and 17 with NH for Marshmallow and for Pie. Used the ones from Kali's download site and the ones you linked above. Followed all instructions to the letter and comma, and all variations on it that I could imagine.

The end result is always the samel No bluetooth, no usb.

And since the whole idea is to have a compact mobile to do pentesting on wireless setups and devices in the field, for which we need usb and bluetooth, it seems to be pretty useless. It really puzzles me why the Oneplus One is the preferred device, other than it is a nice Mr. Robot gadget to show of in the bar?

However, I truly want to be proven wrong in my conclusion and work with you to get this sorted out. If you like. I get the idea there are many with similar problems that never got solved and they might have given up and moved on to another device. But I am not afraid of a good challenge, so....... lets do it.

This is what I have:

Oneplus One 16GB
Alfa AWUS036ACH with Realtek rtl8812au chip (have the latest drivers)

Can we make it really work?

(mind you, pentesters at $ 200K a year are probably not willing to spent so much time on getting a tool to work. I'm just a student in pentesting and still learning, so economics are not that much of an issue, yet).

I realise this is all free, open source software. But that doesn't mean it shouldn't be working perfect after proper installing everything.

I hope I can help to make it better.
Part 3

Indeed TWRP 3.1.1 did work.

First flashed the file nethunter-2020.4-generic-armhf-kalifs-full.zip (downloaded from the link you provided in the beginning of this thread) and after flashed the file kernel-nethunter-20210206_204827-oneplus1-ten.zip (from your last link).

Unfortunately, icons don't show up in program slide. What did I do wrong? Did I first had to install the previous kernel, the one from 20210117_044828? Or the original kernel and than patch these ones on it?

Please setprop before flashing and copy the nh installer zips to the device after lineage is flashed. I've uploaded a new zip, replaced the link above
 

Ween Dwijler

Member
Feb 6, 2021
32
2
Thailand
Ok, I'll go do it now.

Ok, did the setprop before flashing. Copied the zips from USB to local Download dir/map. Installed first nethunter-2020.4-generic-armhf-kalifs-full.zip and after that kernel-nethunter-20210206_204827-oneplus1-ten.zip (your latest).

Both installs went smooth, no interruptions. After that, rebooted the system. No program icons (NH Terminal, NH, etc.) anywhere.
 
  • Like
Reactions: yesimxev

yesimxev

Senior Member
May 8, 2017
178
66
Is it hard to write a patch for it?
The first patch is starting from kernel 3.10 but this is 3.4 and has to be modified a bit. I simply don't have time, @kimocoder is an expert in kernels, he created the patch. As I see it needs more time for me to backport.


This is what it looks like after installing.
As far as I know, the apps should have been flashed. It did on mine. However, the install script will be updated from next release. For now, please check if everything works fine. FYI only external BT adapter is supported.
Please download nethunter store app https://store.nethunter.com/ to install the apps
 
Last edited:
Feb 9, 2021
16
4
This is the version of Droid i'm looking.... LOS 17.1 with nethunter... but on the oneplus 6 and or 7 and or 7pro. I'm surprised there's so much recent development for such an old phone. Would this work on a OP6 or OP7? I'm guessing not, right? Any plans for that? Thanks.
 

Ween Dwijler

Member
Feb 6, 2021
32
2
Thailand
This is the version of Droid i'm looking.... LOS 17.1 with nethunter... but on the oneplus 6 and or 7 and or 7pro. I'm surprised there's so much recent development for such an old phone. Would this work on a OP6 or OP7? I'm guessing not, right? Any plans for that? Thanks.
Compare the hardware, if it is the same architecture, it should work. You'll have to try in that case.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    68747470733a2f2f6769746c61622e636f6d2f6b616c696c696e75782f6e657468756e7465722f6275696c642d736372697074732f6b616c692d6e657468756e7465722d70726f6a6563742f7261772f6d61737465722f696d616765732f6e657468756e7465722d6769742d6c6f676f2e706e67


    I present to you: Kali NetHunter for the OnePlus One LineageOS 17.1 Q

    This is the latest (experimental) version for the OnePlus One.

    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 ~
    - Lineage 17.1 - https://download.lineageos.org/bacon
    - Gapps if needed - https://opengapps.org
    - TWRP - https://twrp.me/oneplus/oneplusone.html
    - Magisk – https://forum.xda-developers.com/apps/magisk

    ~~ Downloads ~~
    - NetHunter: https://www.androidfilehost.com/?fid=17248734326145736621

    ~~ How to Install ~~
    Assuming you have unlocked bootloader
    - Flash TWRP
    - Copy Lineage, Magisk and NetHunter image to USB drive
    - Boot into TWRP, insert USB drive.
    - Flash Lineage, and Gapps if needed, reboot and do initial setup
    - Reboot into TWRP
    - Some old devices with new ROMs doesn't have a TWRP with system_root prop set, therefore do
    Code:
    adb shell setprop ro.build.system_root_image true
    - Flash Magisk, NetHunter

    - Reboot
    - Run NetHunter app
    - Reboot

    ~~~ Notes & Updates ~~~
    - wlan1 unplug reboot is solved
    - Y-cable is still supported, just need to have it as a Custom Command or in a script (AndroidSU)
    Code:
    bootkali ycable start
    To stop:
    Code:
    bootkali ycable stop
    - Bluetooth Arsenal is supported, but you need to downgrade Bluez to 4.101 by compiling it in Kali chroot and installing "on top of" current Bluez so the bluetooth service will be able to run
    - Mana is being replaced, for the time being you can downgrade iptables with the following :
    Code:
    wget http://old.kali.org/kali/pool/main/i/iptables/iptables_1.6.2-1.1_armhf.deb
    wget http://old.kali.org/kali/pool/main/i/iptables/libip4tc0_1.6.2-1.1_armhf.deb
    wget http://old.kali.org/kali/pool/main/i/iptables/libip6tc0_1.6.2-1.1_armhf.deb
    wget http://old.kali.org/kali/pool/main/i/iptables/libiptc0_1.6.2-1.1_armhf.deb
    wget http://old.kali.org/kali/pool/main/i/iptables/libxtables12_1.6.2-1.1_armhf.deb
    
    dpkg -i *.deb
    
    apt-mark hold iptables
    apt-mark hold libip4tc0
    apt-mark hold libip6tc0
    apt-mark hold libiptc0
    apt-mark hold libxtables12

    - To downgrade to bluez-4.101:
    Code:
    apt-get update && apt-get install libdbus-1-dev libglib2.0-dev
    apt-mark hold bluez
    wget http://www.kernel.org/pub/linux/bluetooth/bluez-4.101.tar.gz
    tar xvf bluez-4.101.tar.gz && cd bluez-4.101
    ./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var --libexecdir=/lib --build=arm
    make && make install

    Please not that BLE is not supported in bluez-4.x. If you prefer to use that, keep bluez-5.x

    Credits: The Offensive Security Team and the NetHunter community

    Android Version: 10.0

    XDA: DevDB Information
    Kali Nethunter, Kernel & ROM for the OnePlus One

    Contributors
    @yesimxev

    Source Code: https://gitlab.com/kalilinux/nethunter/
    Kernel Source: https://github.com/yesimxev/android_kernel_oppo_msm8974

    Follow me on Twitter!
    2
    Well done! I'm personally not interested in NetHunter but it's nice to see some development still happening for our good old Oneplus One :)
    1
    Ok, I'll go do it now.

    Ok, did the setprop before flashing. Copied the zips from USB to local Download dir/map. Installed first nethunter-2020.4-generic-armhf-kalifs-full.zip and after that kernel-nethunter-20210206_204827-oneplus1-ten.zip (your latest).

    Both installs went smooth, no interruptions. After that, rebooted the system. No program icons (NH Terminal, NH, etc.) anywhere.
    1
    I'll try to patch but my weeks are extremely busy now
    That would be very, very nice. I'm really looking forward to have this working and start to use it in the field.

    FYI attached the lsusb readings in kali terminal and android terminal. The realtek shows up, but I guess the drivers are missing.
    1
    So I tried, Large, everything, top10 and small. All of them crashed. I tried installing all packages manually and found out 5 are causing the phone to reboot and then not able to install other packages. If I just leave out those 5 it does seem to work without to many glitches or issues.
    Can you just simply do apt-get update && apt-get install kali-linux-nethunter in chroot? Is it crashing with that too? Do you have enough space on /data?