Wednesday, January 6, 2016

NetHunter 3.0

Version 3 is out for NetHunter and it supports Android Marshmallow 6.0.1!  Now I can finally get rid of that annoying update notification.  Don't know if my OCD came before of after those damn "notifications".  

Offensive Security installation script is brilliant and certainly makes the entire process much easier.


BTW this step-by-step is based on the Linux/OSX install process.  Adjust as needed.

Kali NetHunter Linux Root Toolkit (LRT)

1.0  Prep

NOTE: Don't rename or decompress the downloaded files or images. The scripts will handle it for you.

Goto http://tools.android.com/download/ and download sdk-repo-darwin-platform-tools-2219242.zip
Extract the file to your home directory - /Users/$(whoami)


1.0.1 Setting environment variables on the Mac OS x 

To set an environment variable, enter the following command:
launchctl setenv variable "PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/$(whoami)/platform-tools"
export PATH=$PATH:/Users/[username]platform-tools/
To find out if an environment variable is set, use the following command:
launchctl getenv variable
To clear an environment variable, use the following command:
launchctl unsetenv variable


launchctl unsetenv variable

Do a git clone of nethunter-LRT

git clone https://github.com/offensive-security/nethunter-LRT.git
cd into nethunter-LRT
Download the correct Factory Image for your device from https://developers.google.com/android/nexus/images?hl=en


cp image /Users/$(whoami)/nethunter-LRT/stockImage

Download the correct TWRP image for your device from https://twrp.me/Devices/
Copy/move the file to /Users/<name>/nethunter-LRT/twrpImage.

cp image /Users/$(whoami)/nethunter-LRT/twrpImage

Download the latest SuperSu (BETA) from http://forum.xda-developers.com/showpost.php?p=64161125&postcount=3

Copy/move the file to /Users/<name>/nethunter-LRT/superSu.

launchctl unsetenv variable
Download the correct version of NetHunter from https://www.offensive-security.com/kali-linux-nethunter-download/
Copy/move the file to /Users/<name>/nethunter-LRT/kaliNethunter


    launchctl unsetenv variable
    1.1 OEM Unlock Skip over this if your phone bootloader is already unlocked.

    Launch the unlock script using the following script - oemUnlock.sh



    1.2 Flash Stock

    To flash your Nexus device back to the stock image, use the stockNexusFlash.sh script. This way, you will get a clean phone to install NetHunter on. This will delete all existing device data.

    Launch the unlock script using the following script - stockNexusFlash.sh.

    Once your phone is flashed, don't forget to make sure it's in Developer mode, USB Debugging is enabled and you have accepted the RSA Key Dialog.


    UPDATE


    Going through the newly installed version of Nethunter, noticed that a few of the "features" won't register the devices I had attached.  However, during the installation process nothing came up as an issue.  So, instead of troubleshooting each and every application, I actually fix many of the problems just by simply restoring the stock images.

    Two things to keep in mind for this to successfully get installed.   The first trick is to keep checking the build number and ensuring the right build is being applied.  The second is to apply the stock image update (i.e., 6.0.0 to 6.0.1) over the air versus using the stock image.   I did this over and over again until everything (appears) to be functional.  (Approx. 5 times)
    1. Check the device build number
    2. Remove any images left in /Users/<name>/nethunter-LRT/stockImage
    3. Download the factory image according to the build number 
    4. Copy/move the file to /Users/<name>/nethunter-LRT/stockImage
    5. Run the stockNexusFlash.sh script
    6. Go all the way through the configuration setup for the device
    7. Check the System Update status
    8. If the System Update is installed properly
      1. Verify the device is successfully updated to version 6.0.1
        1. If no, repeat steps 5 through 8
        2. If yes, go to step 10
    9. If the System Update fails, repeat 1 through 8, else step 10
    10. Now check the build number and repeat steps 1 through 8
      1. If on version 6.0 find the factory stock image for 6.0.1
      2. Repeat steps 5 through 8

    1.3 Custom Recovery (TWRP) + Kali Linux NetHunter

    This script will install TWRP, and flash Kali NetHunter on your Nexus device. 

    NOTE: This should be run on top of a clean ROM install.


    Launch the rooting slash NetHunter installation script using the following - twrpFlash.sh.


    1.4 Fin

    Is just that easy!

    No comments:

    Post a Comment