I am an ethical hacker who learned hacking from youtube. I like to help people with the learning of necessary skills.
For hacking, you need a device with a Linux system – it can be any device that has the potential to run tools according to your requirements. For example, android phones are completely capable of being used as hacking machines as they can use Linux.
In this article, I discuss how you can convert an android phone into a fully working Kali Linux machine.
The most common Linux systems used in the android system’s are:
Points to cover
- Hardware requirements
- Software requirements
- Commands & installation
- Create a secure connection
- An android phone with a minimum of 50 GB of storage
- 4Gb of ram
- A network chip capable of monitor mode with packet injection
- USB to type c connector (depending on the charging port)
- A network adapter
- Windows 10 OS
- 4Gb of ram
- A good network connection system
- Enabled RDP
- 150 Mbps speed
- Enabled port forwarding
Userland is an android app that enables using of a Linux distro. It is really easy to set up.
Here’s how to install and initiate Kali session:
- Install userland and connectbot.
- After installing userland, open it and give all the permissions.
- Under distribution, select Kali Linux.
- It will show a menu – enter the username and the password.
- Now it will take about 20 min’s in 150 Mbps speed to download.
- After it downloads, installs the program.
- Under the sessions, you can find the Kali session.
- After you click on the Kali session, you can connect to the system using the connectbot ssh connection.
“Termux is an Android terminal emulator and Linux environment app that works directly with no rooting or setup required. A minimal base system is installed automatically – additional packages are available using the APT package manager.”- Copied from termux website
Now it’s very simple to use termux. Just install and update it; you are ready to use it as a Linux shell.
Using RDP with termux is not practical, so you have to use it on the phone. But if you are using the latest version of Samsung, you can use it as a desktop by connecting with a monitor.
Or install ssh and use it to connect with a pc; by using ssh or SFTP whatever you like, it works fine.
Copied from the Kali website
- NEXUS 10 tab
- NEXUS 7 mini tab
- NEXUS 5 phone
These three phones have the best functionality and are recommended for using Nethunter.
You have to install Nethunter from its image by fast-booting the system. You can execute a wide range of programs and attacks using this tool.
Start an ssh connection from the phone. You can use any play store app for this purpose and connect to the phone via putty or kitty connector.
Commands & installation
After setting the Kali distro:
Install the files and programs using the following command:
sudo apt-get update && sudo apt-get dist-upgrade and sudo apt-get install xsdl
Now install xrdp:
sudo apt-get install xrdp
Now start the xrdp server:
sudo service xrdp start
Now let’s connect to the server:
Type RDP in the search bar and enter the IP of your Linux distro in it. When you connect to it, you will be greeted with a password and username GUI. Enter your distro username and password. Now you have complete access to the Linux distro.
Install OpenSSH in termux:
pkg upgrade pkg install openssh
Setup a password:
$ passwd New password: Retype new password: New password was successfully set.
Set up public key:
ssh-keygen -t rsa -b 2048 -f id_rsa
Authorize your remote system:
ssh-copy-id -p 8022 -i id_rsa IP_ADDRESS
In the place of IP_ADDRESS, you have to enter the remote systems IP.
You can remotely connect to your system this way.
Create a secure connection
I am going to explain this for userland and termux only.
To create a secure connection is required so you must have a:
In userland, you need to execute the following command to set up a firewall in the Kali distro:
sudo apt-get install ufw
Enable the firewall:
Enable ssh port:
ufw allow 22/tcp
Enable RDP port:
ufw allow 3389/tcp
To create a secure shell, create a password of about 25 characters with ssh encryption. You can connect it using an RSA in various systems, which is a huge process. I shall explain it in another article.
Termux is a system that does not need any firewall as it restricts a lot of unauthorized connections to the system and does not support RDP.
That’s it; your android phone is now a hacking machine!
Some of the tools require root access, and some of them don’t. Also, if you use this information for malicious purposes, I am not responsible.
Create your free account to unlock your custom reading experience.