Installing Nethunter on android with termux
In this guide you will learn how to mount nethunter on an Android device, nethunter on an operating system based on Kali Linux. Of course this allows us to have inside our mobile device a virtualized operating system, collective computing and informaticaoficial, we have developed a series of steps to install it on your system in a safe 100% way because we do not require elevated access to modify the main operating system. So this procedure will NOT HARM YOUR MOBILE AT ANY TIME. However, we must mention that it will require resources to run it. So we invite you to read the whole procedure.
Tools to install nethunter:
- termux: In short, Termux is a terminal emulator for Android, which allows us to execute Linux commands through the shell. First, we can install and use it on Android without root authority. So this environment is secure and allows us to test open source repositories.
- nethunter store: Kali NetHunter App Store is an installable directory for Android applications used for penetration testing and forensic analysis. The client makes it easy for you to check for, install and track updates on your device.
- Kali NetHunter App Store for Android
- nethunter Kex: Kali NetHunter KeX: allows you to connect your Android device with a Bluetooth keyboard and mouse to the HDMI output and get a full Kali desktop on your smartphone, in this case it will do the connection of NetHunter-termux.
Download tools needed to install kali linux nethunter
- Once termux is installed, download and install nethunter store
Download NetHunterStore.apk
- Once downloaded NetHunterStore.apk we execute it, we give the necessary permissions to install downloaded applications.
- We open nethunter store, we will find it under the name of F-Droid
- We search within nethunter store the application called Nethunter Kex and we install it and ready we already have the necessary components.
- We also installed termux from the nethunter store:
Install Kali Linux nethunter on our Android device
The installation of kali linux nethunter depends on Android termination using termux
- We removed some repositories that cause problems:
rm -rf $PREFIX
- close the termux application with the command:
exit
- We open the termux application again and change the repository version with:
termux-change-repo
Now we leave selected where it says Main repository? and press Enter to select OK
- Several versions appear, we select Mirrors by Grimler Hosted on grimler.se?
- We will start updating the repository and wait.
- We install termux storage which allows us to access shared and external storage:
termux-setup-storage
- We update the core, it is important so that the directories are updated correctly. If a message appears we give the letter Y and enter, it will ask you several times, and it is important that we place in this order the commands even if they are repeated:
apt-get update
apt-get upgrade
apt-get update
- we install pkg install wget Wget is a free GNU command line utility tool used to download files from the Internet. It retrieves files using HTTP, HTTPS and FTP protocols:
pkg install wget
- we download and install the package and the complete image of nethunter for the termux terminal with the following command:
wget -O install-nethunter-termux https://offs.ec/2MceZWr
- We will be asked if we want to download the file, we press the key Y, and we give you enter.
- With Chmod +x we assign all permissions and privileges to the downloaded file named install-nethunter-termux
chmod +x install-nethunter-termux
- to verify that the permissions have been assigned correctly, we type dir if the file appears green, the permissions have been changed correctly.
- We install nethunter for termux:
./install-nethunter-termux
- It will then download a 1.7GB ISO file.
- It will take some time, this depends on the Internet speed.
- Now, after downloading kali Linux ISO from the Internet, it will extract the ISO files and install on our Android device.
- This process will take more than 20 minutesalso depends on the performance of your device.
- At the end it will ask us if we want to keep the downloaded file:
- in this case I will keep it, but it is already installed.
Starting nethunter from termux
- We open nethunter:
nethunter
- Once nethunter is open, we will assign a user and password so that it can connect to Nethunter Kex
- We assign a password of at least 6 digits, in my case ?123456?as it will allow us to connect with Nethunter Kex.
kex passwd
- Set password: 123456 (in my case)
- Log in again to confirm it:
- Now, we will see the port number and a process number
kex
- We open the Nethunter Kex
- enter the password we have assigned: "123456"
- we leave the username blank
- and we will give it at the top ?connect?
10.- The kali Linux operating system will be opened.
- At the end of the process we will select in the widget of the Nethunter Kex, disconnect.
- In termux we select:
kex stop
- Then we write in termux
exit
until it leaves the terminal
- To restart Nethunter kali linux:
- Open termux and type
nethunter
- Again we write
kex
- We open the Nethunter Kex and set again the port that we get when we execute the command kex
- Ready
- Open termux and type
NetHunter commands:
nethunter | start Kali NetHunter command line interface |
nethunter kex passwd | set KeX password (only needed before first use) |
nethunter kex & | start Kali NetHunter Desktop Experience user sessions |
nethunter kex stop | stop Kali NetHunter Desktop Experience |
nethunter | run |
nethunter -r | start Kali NetHunter cli as root |
nethunter -r kex passwd | set the KeX password for root |
nethunter -r kex & | Kali NetHunter Desktop Experience as root |
nethunter -r kex stop | stop Kali NetHunter Desktop Experience root sessions |
nethunter -r kex kill | Kill all KeX sessions |
nethunter -r | run <command> in the NetHunter environment as root |
SOLUTION: KALI NETHUNTER FIREFOX TAB CRASHED
Nethunter in an operating system to run from our mobile. However, in recent days we have seen browser crashers and it does not let you access the internet, but solving it is very simple. So we just need to follow the steps below:
- First open the termux terminal.
- Now run nethunter -r or nh -r to access the terminal as a super user.
- Inside the terminal we modify the file resolv.confg
- Now with kex we run the virtual machine and then open Firefox.
- Restart the browser and that's it.
How to upgrade Kali linux nethunter From Termux
To modify the resolv.conf file
nano /etc/resolv.config
add: nameserver 8.8.8.8.8
Ctrl + O (enter) to overwrite the file
Ctrl + X (enter) to exit nano editor
To solve the problem in the browser
- Open the browser
- We write about:config
- We accept the risk and click on continue
- In preferences we are looking for media.cubeb.sandbox and mark as false
- We are looking for security.sandbox.content.level we modify the value to 0
- Close Firefox and open it again
Conclusion: To finish this process successfully, we must take into account that we must update the repositories. This problem basically happens because the developers when compiling the nethunter image had a bad browser configuration. However, you can try resetting the browser configuration or installing another one and it may work.