How to Convert Your Android Device Into a Hacking Machine

Written by morpheuslord | Published 2021/07/20
Tech Story Tags: android | hacking | hack | hacker | android-hacks | kali-linux | kali | hacks | web-monetization

TLDR How to Convert Your Android Device Into a Hacking Machine: How to convert an android phone into a fully working Kali Linux machine. Android phones are completely capable of being used as hacking machines as they can use Linux. The most common Linux systems used in the android system's are:Debian,Ubuntu, Ubuntu, and Kali Linux. For Windows, 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.via the TL;DR App

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:
  • Debian
  • Ubuntu
Points to cover
  • Hardware requirements
  • Software requirements
  • Commands & installation
  • Create a secure connection

Hardware requirements

For Android:
  • 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
For Windows:
  • Windows 10 OS
  • 4Gb of ram
  • A good network connection system
  • Enabled RDP

Internet:

  • 150 Mbps speed
  • Enabled port forwarding

Software requirement

Userland:
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:
  1. Install userland and connectbot.
  2. After installing userland, open it and give all the permissions.
  3. Under distribution, select Kali Linux.
  4. It will show a menu - enter the username and the password.
  5. Now it will take about 20 min's in 150 Mbps speed to download.
  6. After it downloads, installs the program.
  7. Under the sessions, you can find the Kali session.
  8. After you click on the Kali session, you can connect to the system using the connectbot ssh connection.
Termux:
"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.
Kali Nethunter:
"The Kali NetHunter project is the first Open-source Android penetration testing platform for Android devices, created as a joint effort between a Kali community member, “BinkyBear”, and Kali Linux."
Phones supported:
  • 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.
ssh-connection:
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

Userland
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.
Turmux
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:
  • Firewall
  • SSH
  • RDP

Firewall:

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:
ufw enable
Enable ssh port:
ufw allow 22/tcp
Enable RDP port:
ufw allow 3389/tcp
ssh
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
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!

Sources

Disclaimer
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.

Written by morpheuslord | I am a red team operator, and a security enthusiast I write blogs and articles related to cyber-sec topics.
Published by HackerNoon on 2021/07/20