Code Monkey home page Code Monkey logo

nethunter-installation's Introduction

NetHunter installation

Intro

We'll install it with Linux Deploy

This instruction is for OnePlus6(T), but can be reproduced on the other devices (btw you need special nethunter kernel)

Stage 0: Installing dependences

Install DJY's Android 9 kernel (click to download - Magisk v20.1 included) OR kimocoder's Android 10 kernel (click to download)

Install Magisk module by DJY or modified one by me from Magisk Manager

Install BusyBox from Magisk repo or from GitHub

You're ready!

Stage 1: Downloading rootfs & Linux Deploy

Download & install Linux Deploy

Download kalifs and place in at /sdcard/kalifs-armhf-full.tar.xz (/storage/emulated/0/kalifs-armhf-full.tar.xz)

Using any root file explorer, create folders at "/data/local/nhsystem/kali-armhf"

Stage 2: Installing Nethunter

Open Linux Deploy and set settings as shown on the pictures (click)

Click on 3 dots in top right corner -> Install

Wait 5-7 minutes

Then click STOP, wait, START

Stage 3: Configuring Nethunter

Open Terminal -> Android SU

Click on 3 dots in top right corner -> Config Chroot Path and replace "arm64" with "armhf"

Restart Terminal -> Kali

Finally, write "apt update && apt upgrade -y && apt dist-upgrade -y" to update Nethunter

Now you can safely delete Linux Deploy

Troubleshooting

apt update

If you'll try to "apt update" - you may get an error

To fix that write "apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys 7D8D0BF6", but if it doesn't works - replace "7D8D0BF6" with key that can't be verified (specified in "apt update" error)

ssh

If you need to start ssh - "service ssh start"

But you may can't connect to your phone

To fix that write "nano /etc/ssh/sshd_config" and find "PermitRootLogin yes" - uncomment it. Now find "UsePAM yes" and replace it with "UsePAM no"

Now "passwd" to change root password if needed & "service ssh restart"

iptables

Nethunter contains 2 versions of "iptables", so default doesn't works for me

Simply write "mkdir -p /root/scripts && mv /usr/sbin/iptables /root/scripts/ && ln -s /usr/sbin/iptables-legacy /usr/sbin/iptables"

VNC Server & Terminal window

P.S. Thanks to @SymbianSyMoh

For the people who were asking regarding the packages that breaks the terminals title window and other windows title bars, just avoid installing ANYTHING related to XFCE window manager, this need some careful as some related packages can be installed without your consent for example (when installing kali-linux-nethunter package), so the suggestion is to have a clean Linux Deploy installation with LXDE window manager and then to be careful with the anything packages related to XFCE-* window manager.

As the other issue of why sometimes the VNC is breaking, also avoid anything related to TigerVNC, just don’t install it or anything related and if installed, just remove it (apt-get purge tiger* -y)

/etc/profile: Required key not available

Just write "source /etc/profile && source /root/.bash_profile"

HID

Open Nethunter app -> USB Army -> USB Interface -> hid -> Set USB interface

or

Open Terminal -> Android SU and write:

setprop sys.usb.config win,hid
setprop sys.usb.config win,mass_storage
setprop sys.usb.config win,rndis
setprop sys.usb.config win,hid,mass_storage
setprop sys.usb.config win,rndis,hid
setprop sys.usb.config win,rndis,mass_storage
setprop sys.usb.config win,rndis,hid,mass_storage
setprop sys.usb.config mac,hid
setprop sys.usb.config mac,mass_storage
setprop sys.usb.config mac,ecm
setprop sys.usb.config mac,hid,mass_storage
setprop sys.usb.config mac,ecm,hid
setprop sys.usb.config mac,ecm,mass_storage
setprop sys.usb.config mac,ecm,hid,mass_storage
setprop sys.usb.config win,hid,adb
setprop sys.usb.config win,mass_storage
setprop sys.usb.config win,rndis
setprop sys.usb.config win,hid,adb,mass_storage
setprop sys.usb.config win,rndis,hid,adb
setprop sys.usb.config win,rndis,mass_storage
setprop sys.usb.config win,rndis,hid,adb,mass_storage
setprop sys.usb.config mac,hid,adb
setprop sys.usb.config mac,mass_storage
setprop sys.usb.config mac,ecm
setprop sys.usb.config mac,hid,adb,mass_storage
setprop sys.usb.config mac,ecm,hid,adb
setprop sys.usb.config mac,ecm,mass_storage
setprop sys.usb.config mac,ecm,hid,adb,mass_storage

HID interface may not be displayed in Nethunter, but it does exists :)

Decorations

Zsh

Installation

Do "apt install zsh -y"

Then we need to install Oh-my-zsh - "git clone https://github.com/robbyrussell/oh-my-zsh.git && cd oh-my-zsh && ./oh-my-zsh.sh"

Install it as default shell

dikiaap's dot files

I've installed this dot files, so they're working almost perfect.

"git clone https://github.com/dikiaap/dotfiles", then "cd dotfiles && ./install.sh && zsh"

You can add your functions in "~/.functions", for example:

# Update
apt-update() {
    sudo apt update
    sudo apt upgrade -y
    sudo apt dist-upgrade -y
    apt-clean
}

If there'll be any problems:

z

Run "wget https://raw.githubusercontent.com/rupa/z/master/z.sh && mkdir ~/.zsh/plugins/z && mv z.sh ~/.zsh/plugins/z/z.sh"

.functions_private && .exports_private

Just create these files ("touch ~/.functions_private && touch ~/.aliases_private") or remove their references in ~/.zshrc

Numpad buttons (PuTTY)

Run "touch ~/.numpad", add in end of "~/.zshrc" "source ~/.numpad" add in this file these lines:

# Keypad
# 0 . Enter
bindkey -s "^[Op" "0"
bindkey -s "^[Ol" "."
bindkey -s "^[OM" "^M"
# 1 2 3
bindkey -s "^[Oq" "1"
bindkey -s "^[Or" "2"
bindkey -s "^[Os" "3"
# 4 5 6
bindkey -s "^[Ot" "4"
bindkey -s "^[Ou" "5"
bindkey -s "^[Ov" "6"
# 7 8 9
bindkey -s "^[Ow" "7"
bindkey -s "^[Ox" "8"
bindkey -s "^[Oy" "9"
# + -  * /
bindkey -s "^[Ok" "+"
bindkey -s "^[Om" "-"
bindkey -s "^[Oj" "*"
bindkey -s "^[Oo" "/"

Source

nethunter-installation's People

Contributors

alexeyzavar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

nethunter-installation's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.