[Kernel+][Exynos] Kali NetHunter for the Galaxy S7

Search This thread

jcadduono

Recognized Developer
Jan 17, 2014
1,490
6,218
30
Thunder Bay
adduono.com

WARNING: When using custom kernels on the S7, never turn off developer options or OEM unlock. If you do, you will lose all your data and have to flash a full stock firmware restore to use your device again!

OKAY SO

This is Kali NetHunter 3.15.2 for the Galaxy S7.

If you don't know what Kali NetHunter is, well, it's the entire Kali Linux operating system in a chroot on your phone, plus a bunch of awesome apps for executing exploits, fixing things, doing cool things. It goes on, I suppose.
I'm gonna be honest guys, I'm not a security person. When it comes to security, I'm more of a Paul Blart.
What I do know though, is that there is apt-get, and apt-get is life.

Find much more information here: https://github.com/offensive-security/kali-nethunter/wiki
The answer to all your questions, generally the answer is YES, IT CAN DO THAT.

Most ROMs should be supported, as our installer uses a dynamic patching method on your current boot image!

The NetHunter installer zip will add a few files to your /system partition, and install all of the NetHunter apps to your /data partition.
The chroot is located in /data/local/nhsystem, so you don't have to worry about your system partition being full. It's full read/write capable.
Understand that the zip will replace your current kernel with a completely different one.
This is necessary because most stock or custom kernels don't provide the drivers needed to operate most of Kali NetHunter's features.

NetHunter also includes its own Busybox that gives you full large file support and some extra applets.
It will not overwrite your current one, and will happily install alongside it as busybox_nh.

DOWNLOAD

Current version: 3.15.2 (stable, 2016-11-04)

Please be careful to download the right version based on this table:
SM-G930F, SM-G930FD, SM-G930W8, SM-G930X: kernel-nethunter-herolte-*
SM-G930K, SM-G930L, SM-G930S: kernel-nethunter-heroltekor-*
S7 edge: You're in the wrong forum!
All others be sad.

For the apps, chroot, and everything other than just the kernel, you will also need to download:
nethunter-generic-arm64-*

See installation instructions before proceeding!

Downloads are available at: http://build.nethunter.com/nightly/

BEFORE INSTALLING

IMPORTANT: Kali NetHunter requires write access to your data partition!
This means that if your data partition is encrypted, you will need to use the [Format Data] button in TWRP to remove encryption.
This will delete all your data, including internal storage.
You should back everything up first before installing Kali NetHunter.
Samsung Smart Switch Mobile can be useful for this, and allows you to back up your apps to a location on an external SDcard.
Unfortunately it doesn't back up most app data.

The Kali chroot and apps are installed on your data partition (in /data/local/nhsystem for chroot). To initialize the chroot and install Kali Linux, you need to start the Kali NetHunter app.

The generic NetHunter installer will automatically install SuperSU. We try to keep it up to date, but it isn't always.
If you already have SuperSU or another root method installed, please simply delete the supersu.zip from the root of the zip file before installing it.

It's recommended that you restore or flash your ROM's original kernel before installing NetHunter.

It's become apparent that there may be issues with the stock ROM and this kernel, and that it might run best on a Note 7 port.

FULL INSTALLATION STEPS
  1. Install Team Win Recovery Project to your recovery partition.
    Transparent.gif
  2. Recommended: If you have a custom kernel or SuperSU installed, restore your stock kernel. (called Boot in TWRP)
    This isn't entirely necessary, but you may need to flash the NetHunter kernel again if SuperSU replaces it.
    Transparent.gif
  3. If your data partition doesn't mount in TWRP:
    Go to [Wipe] -> [Format Data] (not advanced wipe) -> type "yes".
    WARNING: This will wipe your internal storage, disable encryption, and factory reset your phone!
    Once your data partition is formatted, go to [Reboot] -> [Recovery].
    Transparent.gif
  4. Download the kernel-nethunter zip specific to your device.
    Without exiting TWRP, transfer the NetHunter kernel installer zip to your device over MTP* and flash it using [Install] in TWRP.
    Transparent.gif
  5. If you wiped your data partition in step 2:
    Go to [Reboot] -> [System].
    Set up your phone by following the Android setup wizard.
    Once it's set up, reboot back into recovery.
    Transparent.gif
  6. For new installations: Download the nethunter-generic-arm64-kalifs zip.
    For upgrades: Download the update-nethunter-generic-arm64 zip.
    Without exiting TWRP, transfer the NetHunter generic arm64 installer zip to your device over MTP* and flash it using [Install] in TWRP.
    Transparent.gif
  7. Go to [Reboot] -> [System].
    Transparent.gif
  8. Wait 2-5 minutes for your device to finish setting itself up.
    Transparent.gif
  9. Open the NetHunter app to initialize the environment
    Transparent.gif
  10. You're done!
* MTP, known as Media Transfer Protocol, is the same way you transfer files from your PC to your device when booted into system.

UPDATING TO A NEWER BUILD OR UPDATING YOUR ROM

Follow the installation steps above. NetHunter can be installed over itself as many times as you'd like.
If you don't want to lose your chroot, flash the smaller update-nethunter-generic-arm64 zip instead.

THE KERNEL

The NetHunter kernel for the Galaxy S7 is based on Samsung's OSRC N930SKSU2BPID Note 7 kernel sources.
It has the following changes:
  • Carefully updated to Linux 3.18.44 (with dirtycow vulnerability patched)
  • SELinux permissive
  • F2FS updated to Jaeguek Kim's latest kernel.org f2fs-stable sources
  • F2FS formatted data partition support
  • Enabled USB (OTG) Atheros, Ralink, and Realtek WiFi drivers
  • FIOPS IO scheduler as default IO scheduler, SIO available
  • USB HID Gadget keyboard & mouse support
  • mac80211 packet injection support
  • DriveDroid compatibility
  • Additional drivers built in for the full Kali NetHunter experience
  • Data partition encryption disabled (not supported by custom kernels at the moment)
  • Kernel module support, insert your own modules!
  • CIFS, NFS available through included kernel modules

RAN INTO AN ISSUE OR BUG?

In order for me to help you, you have to at minimum reply with:
  • The link to the exact zip you downloaded
  • Your device model
  • The name of the ROM you're flashing it on
  • The version and build date of the ROM you're flashing it on
  • A complete description of your problem
If your issue is with a specific app, it might be better to contact the developer of that app.

For Kali NetHunter bugs/issues, you can open a ticket at: https://github.com/offensive-security/kali-nethunter/issues

If your issue is during the installation (ex. flashing the NetHunter zip), then please collect a TWRP recovery.log for me.

If you found a problem and were able to fix it, and no one's mentioned it in the thread already, it would be kind to state the issue and your fix for others to make use of as well.

You can join me and the other NetHunter developers on IRC at the #nethunter room on freenode to more handily diagnose problems together.
I apologize, but I can't do house calls at this time.

KNOWN ISSUES

  • USB Keyboard - The keyboard is unusable when using Google Keyboard as your input method. Switch to Hacker's Keyboard.
  • Reboot after 60 seconds - Sometimes when you boot your device it could reboot after 60 seconds because of a Samsung secure service not responding. Unresolved, but rare, and only happens within 60 seconds of a boot.
DEVELOPMENT

You can see the main branch of NetHunter's development on the Offensive Security GitHub: https://github.com/offensive-security/kali-nethunter
Galaxy S7 NetHunter kernel source: https://github.com/jcadduono/android_kernel_samsung_universal8890/tree/nethunter-6.0

SCREENSHOTS
25c63e26e3.jpg
9bbb4c055b.jpg

c52cfc8ea6.jpg
57e87e32cb.jpg

f3d2a6f8e9.jpg
3968525d48.jpg

DISCLAIMER

I am not affiliated with Offensive Security. They seem like cool guys though.
I'm not even a novice when it comes to security and penetration. I'm just a simple system administrator with a passion for breaking Android.
Please restrain yourselves from asking me security related questions.

XDA:DevDB Information
Kali NetHunter for the Galaxy S7, Kernel for the Samsung Galaxy S7

Contributors
jcadduono, The Kali NetHunter team
Source Code: https://github.com/offensive-security/kali-nethunter

Kernel Special Features:

Version Information
Status: Stable
Current Stable Version: 3.15.2
Stable Release Date: 2016-11-04

Created 2016-10-06
Last Updated 2016-11-04
 

jcadduono

Recognized Developer
Jan 17, 2014
1,490
6,218
30
Thunder Bay
adduono.com
I cannot test this today, but i ****in love you !

Yeah I just hope it's all working fine this time :p Last time I opened a thread for NetHunter on S7 it was a little embarrassing as I didn't own any recent Galaxy phones I had no idea they'd be such a challenge to get custom development going on.
I still haven't exactly tested this, but I do have the Note 7 now so I'm really hoping that everything done to make it work on the Note 7 makes it work on the S7 and S7 edge too... *crosses fingers*

We've got a few issues to fix before an actual release but they're all related to the apps.
1. The NetHunter Terminal app is quite buggy, so you might want to use JuiceSSH local terminal for now. (type su -c bootkali_login to enter Kali environment)
2. The NetHunter app's scripts are all hardcoded for armhf right now. I've actually completed arm64 support in the installer and we can build working arm64 rootfs and install it, just the NetHunter app can't see it yet so we're using armhf on arm64 instead for now.

Anyways, hope to hear some good news from ya! These remaining issues shouldn't take long for us to overcome... :)
 
  • Like
Reactions: heblu

XanSama

Senior Member
Aug 20, 2009
122
77
Has anyone else been able to get DriveDroid working bootabley (definitely a real word) on this build / Galaxy S7?

I can get the device to show in Windows, but none of the configuration options seem to make it show up as a boot option.

I've tried with both the DriveDroid apk in the nethunter installer, and the latest one from the DriveDroid website.

(P.S. It's not a configuration issue on my laptop as it works with DriveDroid on a Nexus 5. )
 

jcadduono

Recognized Developer
Jan 17, 2014
1,490
6,218
30
Thunder Bay
adduono.com
Has anyone else been able to get DriveDroid working bootabley (definitely a real word) on this build / Galaxy S7?

I can get the device to show in Windows, but none of the configuration options seem to make it show up as a boot option.

I've tried with both the DriveDroid apk in the nethunter installer, and the latest one from the DriveDroid website.

(P.S. It's not a configuration issue on my laptop as it works with DriveDroid on a Nexus 5. )

I've never been able to boot from DriveDroid CDROM mode but always just mounted ISOs as USB Storage and booted off that, essentially the same as dd'ing an ISO to a flash drive.

Not sure what the Nexus 5 is doing differently... :( It is kernel related though, as actually mounting this stuff is very trivial and can be done through terminal.
 
Last edited:

XanSama

Senior Member
Aug 20, 2009
122
77
I've never been able to boot from DriveDroid CDROM mode but always just mounted ISOs as USB Storage and booted off that, essentially the same as dd'ing an ISO to a flash drive.

Not sure what the Nexus 5 is doing differently... :( It is kernel related though, as actually mounting this stuff is very trivial and can be done through terminal.

Doesn't seem to be working for me in USB RW, USB RO, or CDROM mode on this build; are you saying that the one of the USB modes -is- functioning for you currently? or none at all (same as me?)
 

ahamed.rafi135

Senior Member
Oct 9, 2015
131
12
Sharjah
dude pls tell me what is the best rom to have nethunter because i tried a lot of roms it keeps ending in bootloop. also pls tell me whether it works in stock rom...
 

ahamed.rafi135

Senior Member
Oct 9, 2015
131
12
Sharjah
recovery log...

doesnt make sense, by my calculations the resulting image should be close to 40953856 bytes and partition should fit it at *41943040‬ bytes :/
yeah dude just gimme a moment flashing stock rom, btw i just did all the setup in bobcat rom it is soooooo lagggy
and i would like to have this on stock rom. And one more thing thanks for your continuous support.
AND MY FIRMWARE IS G935FXXU1APB6 is it ok?
 
Last edited:

jcadduono

Recognized Developer
Jan 17, 2014
1,490
6,218
30
Thunder Bay
adduono.com
yeah dude just gimme a moment flashing stock rom, btw i just did all the setup in bobcat rom it is soooooo lagggy
and i would like to have this on stock rom. And one more thing thanks for your continuous support.
AND MY FIRMWARE IS G935FXXU1APB6 is it ok?

i have no idea...only tested on FXXU1BP firmware... maybe consider updating?
i will see about maybe removing ffu and signature checker binaries to reduce size, i dont think they are even able to run except by OTAs/stock anyway which are broken by custom kernels
 
Last edited:
  • Like
Reactions: heblu

jcadduono

Recognized Developer
Jan 17, 2014
1,490
6,218
30
Thunder Bay
adduono.com
also which rom do you recommend?

the one that matches your boot image...

i will always recommend stock over anything else though

ok try a build from here instead:

http://build.nethunter.com/test-builds/
update: tested myself and it worked fine, posted new nightly build with changes

it will remove the firmware upgrade service from boot image, which is useless anyway as we can't take OTAs with custom kernels ;)
 
Last edited:

Star316

Member
Oct 19, 2016
7
2
Hi, I have flashed both of the lastest kernels (kernel-nethunter-herolte-marshmallow-3.15.2-20161024-2241) and (kernel-nethunter-herolte-marshmallow-3.15.2-20161023-0148) but they are still laggy and are having poor CPU performance in geekbench tests. Any fix?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 12

    WARNING: When using custom kernels on the S7, never turn off developer options or OEM unlock. If you do, you will lose all your data and have to flash a full stock firmware restore to use your device again!

    OKAY SO

    This is Kali NetHunter 3.15.2 for the Galaxy S7.

    If you don't know what Kali NetHunter is, well, it's the entire Kali Linux operating system in a chroot on your phone, plus a bunch of awesome apps for executing exploits, fixing things, doing cool things. It goes on, I suppose.
    I'm gonna be honest guys, I'm not a security person. When it comes to security, I'm more of a Paul Blart.
    What I do know though, is that there is apt-get, and apt-get is life.

    Find much more information here: https://github.com/offensive-security/kali-nethunter/wiki
    The answer to all your questions, generally the answer is YES, IT CAN DO THAT.

    Most ROMs should be supported, as our installer uses a dynamic patching method on your current boot image!

    The NetHunter installer zip will add a few files to your /system partition, and install all of the NetHunter apps to your /data partition.
    The chroot is located in /data/local/nhsystem, so you don't have to worry about your system partition being full. It's full read/write capable.
    Understand that the zip will replace your current kernel with a completely different one.
    This is necessary because most stock or custom kernels don't provide the drivers needed to operate most of Kali NetHunter's features.

    NetHunter also includes its own Busybox that gives you full large file support and some extra applets.
    It will not overwrite your current one, and will happily install alongside it as busybox_nh.

    DOWNLOAD

    Current version: 3.15.2 (stable, 2016-11-04)

    Please be careful to download the right version based on this table:
    SM-G930F, SM-G930FD, SM-G930W8, SM-G930X: kernel-nethunter-herolte-*
    SM-G930K, SM-G930L, SM-G930S: kernel-nethunter-heroltekor-*
    S7 edge: You're in the wrong forum!
    All others be sad.

    For the apps, chroot, and everything other than just the kernel, you will also need to download:
    nethunter-generic-arm64-*

    See installation instructions before proceeding!

    Downloads are available at: http://build.nethunter.com/nightly/

    BEFORE INSTALLING

    IMPORTANT: Kali NetHunter requires write access to your data partition!
    This means that if your data partition is encrypted, you will need to use the [Format Data] button in TWRP to remove encryption.
    This will delete all your data, including internal storage.
    You should back everything up first before installing Kali NetHunter.
    Samsung Smart Switch Mobile can be useful for this, and allows you to back up your apps to a location on an external SDcard.
    Unfortunately it doesn't back up most app data.

    The Kali chroot and apps are installed on your data partition (in /data/local/nhsystem for chroot). To initialize the chroot and install Kali Linux, you need to start the Kali NetHunter app.

    The generic NetHunter installer will automatically install SuperSU. We try to keep it up to date, but it isn't always.
    If you already have SuperSU or another root method installed, please simply delete the supersu.zip from the root of the zip file before installing it.

    It's recommended that you restore or flash your ROM's original kernel before installing NetHunter.

    It's become apparent that there may be issues with the stock ROM and this kernel, and that it might run best on a Note 7 port.

    FULL INSTALLATION STEPS
    1. Install Team Win Recovery Project to your recovery partition.
      Transparent.gif
    2. Recommended: If you have a custom kernel or SuperSU installed, restore your stock kernel. (called Boot in TWRP)
      This isn't entirely necessary, but you may need to flash the NetHunter kernel again if SuperSU replaces it.
      Transparent.gif
    3. If your data partition doesn't mount in TWRP:
      Go to [Wipe] -> [Format Data] (not advanced wipe) -> type "yes".
      WARNING: This will wipe your internal storage, disable encryption, and factory reset your phone!
      Once your data partition is formatted, go to [Reboot] -> [Recovery].
      Transparent.gif
    4. Download the kernel-nethunter zip specific to your device.
      Without exiting TWRP, transfer the NetHunter kernel installer zip to your device over MTP* and flash it using [Install] in TWRP.
      Transparent.gif
    5. If you wiped your data partition in step 2:
      Go to [Reboot] -> [System].
      Set up your phone by following the Android setup wizard.
      Once it's set up, reboot back into recovery.
      Transparent.gif
    6. For new installations: Download the nethunter-generic-arm64-kalifs zip.
      For upgrades: Download the update-nethunter-generic-arm64 zip.
      Without exiting TWRP, transfer the NetHunter generic arm64 installer zip to your device over MTP* and flash it using [Install] in TWRP.
      Transparent.gif
    7. Go to [Reboot] -> [System].
      Transparent.gif
    8. Wait 2-5 minutes for your device to finish setting itself up.
      Transparent.gif
    9. Open the NetHunter app to initialize the environment
      Transparent.gif
    10. You're done!
    * MTP, known as Media Transfer Protocol, is the same way you transfer files from your PC to your device when booted into system.

    UPDATING TO A NEWER BUILD OR UPDATING YOUR ROM

    Follow the installation steps above. NetHunter can be installed over itself as many times as you'd like.
    If you don't want to lose your chroot, flash the smaller update-nethunter-generic-arm64 zip instead.

    THE KERNEL

    The NetHunter kernel for the Galaxy S7 is based on Samsung's OSRC N930SKSU2BPID Note 7 kernel sources.
    It has the following changes:
    • Carefully updated to Linux 3.18.44 (with dirtycow vulnerability patched)
    • SELinux permissive
    • F2FS updated to Jaeguek Kim's latest kernel.org f2fs-stable sources
    • F2FS formatted data partition support
    • Enabled USB (OTG) Atheros, Ralink, and Realtek WiFi drivers
    • FIOPS IO scheduler as default IO scheduler, SIO available
    • USB HID Gadget keyboard & mouse support
    • mac80211 packet injection support
    • DriveDroid compatibility
    • Additional drivers built in for the full Kali NetHunter experience
    • Data partition encryption disabled (not supported by custom kernels at the moment)
    • Kernel module support, insert your own modules!
    • CIFS, NFS available through included kernel modules

    RAN INTO AN ISSUE OR BUG?

    In order for me to help you, you have to at minimum reply with:
    • The link to the exact zip you downloaded
    • Your device model
    • The name of the ROM you're flashing it on
    • The version and build date of the ROM you're flashing it on
    • A complete description of your problem
    If your issue is with a specific app, it might be better to contact the developer of that app.

    For Kali NetHunter bugs/issues, you can open a ticket at: https://github.com/offensive-security/kali-nethunter/issues

    If your issue is during the installation (ex. flashing the NetHunter zip), then please collect a TWRP recovery.log for me.

    If you found a problem and were able to fix it, and no one's mentioned it in the thread already, it would be kind to state the issue and your fix for others to make use of as well.

    You can join me and the other NetHunter developers on IRC at the #nethunter room on freenode to more handily diagnose problems together.
    I apologize, but I can't do house calls at this time.

    KNOWN ISSUES

    • USB Keyboard - The keyboard is unusable when using Google Keyboard as your input method. Switch to Hacker's Keyboard.
    • Reboot after 60 seconds - Sometimes when you boot your device it could reboot after 60 seconds because of a Samsung secure service not responding. Unresolved, but rare, and only happens within 60 seconds of a boot.
    DEVELOPMENT

    You can see the main branch of NetHunter's development on the Offensive Security GitHub: https://github.com/offensive-security/kali-nethunter
    Galaxy S7 NetHunter kernel source: https://github.com/jcadduono/android_kernel_samsung_universal8890/tree/nethunter-6.0

    SCREENSHOTS
    25c63e26e3.jpg
    9bbb4c055b.jpg

    c52cfc8ea6.jpg
    57e87e32cb.jpg

    f3d2a6f8e9.jpg
    3968525d48.jpg

    DISCLAIMER

    I am not affiliated with Offensive Security. They seem like cool guys though.
    I'm not even a novice when it comes to security and penetration. I'm just a simple system administrator with a passion for breaking Android.
    Please restrain yourselves from asking me security related questions.

    XDA:DevDB Information
    Kali NetHunter for the Galaxy S7, Kernel for the Samsung Galaxy S7

    Contributors
    jcadduono, The Kali NetHunter team
    Source Code: https://github.com/offensive-security/kali-nethunter

    Kernel Special Features:

    Version Information
    Status: Stable
    Current Stable Version: 3.15.2
    Stable Release Date: 2016-11-04

    Created 2016-10-06
    Last Updated 2016-11-04
    2
    Does it requires an external WiFi adapter to test my internet security or does the WiFi adapter of the S7 can do the job ?
    Thank you :)
    You will need one of these supported wifi cards (https://github.com/offensive-security/kali-nethunter/wiki/Wireless-Cards) in order to test your internet security.
    1
    I cannot test this today, but i ****in love you !

    Yeah I just hope it's all working fine this time :p Last time I opened a thread for NetHunter on S7 it was a little embarrassing as I didn't own any recent Galaxy phones I had no idea they'd be such a challenge to get custom development going on.
    I still haven't exactly tested this, but I do have the Note 7 now so I'm really hoping that everything done to make it work on the Note 7 makes it work on the S7 and S7 edge too... *crosses fingers*

    We've got a few issues to fix before an actual release but they're all related to the apps.
    1. The NetHunter Terminal app is quite buggy, so you might want to use JuiceSSH local terminal for now. (type su -c bootkali_login to enter Kali environment)
    2. The NetHunter app's scripts are all hardcoded for armhf right now. I've actually completed arm64 support in the installer and we can build working arm64 rootfs and install it, just the NetHunter app can't see it yet so we're using armhf on arm64 instead for now.

    Anyways, hope to hear some good news from ya! These remaining issues shouldn't take long for us to overcome... :)
    1
    yeah dude just gimme a moment flashing stock rom, btw i just did all the setup in bobcat rom it is soooooo lagggy
    and i would like to have this on stock rom. And one more thing thanks for your continuous support.
    AND MY FIRMWARE IS G935FXXU1APB6 is it ok?

    i have no idea...only tested on FXXU1BP firmware... maybe consider updating?
    i will see about maybe removing ffu and signature checker binaries to reduce size, i dont think they are even able to run except by OTAs/stock anyway which are broken by custom kernels
    1
    yes note 7 ports work fine. That's why I was asking if anyone had a step by step tutorial or simply instructions to follow. I'm using hydra Rom 1.4.5 and have nethunter working but not external wifi adapter yet. have to buy one... if anyone who knows what they are doing it would be great if someone could publish a video on how yo prepare for install and run ;) but it's going without any lag on Hydra Rom...

    Sent from my SM-G935F using Tapatalk

    Flash stock in Odin if you can, probably better this way.

    Install TWRP using Odin
    Wipe Data
    Boot android and go through initial setup
    Install kernel
    Install Nethunter
    Boot android
    Install kernel again just in case
    Open the Nethunter app.

    Done

    I've tried this on Stock, SuperStock, and SuperMan.
    SM-G930 that is. You seem to be on the Edge version.