Detailed Guide About Termux Answering All Questions About Installation, Usage, Doing Hacking, Best Hacking Tools For Termux.
In today’s article, I’m going to discuss every single detail about termux. Also, I’ll clear all the misconceptions about Termux. We’ll find out whether it is a hacking machine or just a normal command line utility. So let’s begin:
What is Termux?
Termux is a Linux Terminal Emulator application for Android. A terminal emulator is a program that allows the user to access the command line interface (CLI) in a graphical environment. If you’ve studied the basics of computer, you must know about the shell and command line interface. If not here is a short definition of shells for you to clear your concept.
What is Shell?
A shell is a command line interface, or you can say a program that takes commands from the user and instructs the operating system to perform tasks on the basis of these commands. There are many shells used in different operating systems like Bourne shell, C shell, Bourne Again shell. All have a different set of features and command behavior. Most of the Linux distributions have Bourne Again shell also known as bash as their default command line.
Why Termux?
Now we know that termux is a Linux Terminal Emulator. But why it is so famous and sometimes called a hacking machine. Well, that’s somehow true and sometimes a piece of false information also. Termux is not a standalone hacking application. As we discussed, it’s a program that takes instructions and runs scripts. In some Linux distributions like Kali, Parrot OS, we find a lot of tools for penetration testing. Most of them are CLI based and run through the terminal. We can also install various other tools and run different scripts made for Pentesting.
So on Android, obviously you get a complete GUI environment. Where these tools won’t work without any command line utility. That is where termux is used to install such tools on your Android Platform. Our Android is also based on a modified Linux kernel. That’s why we can use Bash scripting in it. That’s why termux can easily connect to the file system to perform the majority of the set of features. Which allows you to use the Linux command line to install and run various scripts.
So that was a wrap on introduction to Termux. Let’s move to installation and basic usage.
Installation:
There is no complicated process to install termux on your smartphone. Termux app is available on Google PlayStore. You can download the app and directly install it on your Android Phone. Also, there is an alternative way to install termux through F-Droid. It is actually the failsafe way to install termux with less built-in packages. The process is the same as you install any other application on your Android device. Just download, install and run the application.
Usage:
When you open the app, you’ll see a terminal interface. But Termux always gives you a basic graphical user interface. The interface is not that good but if you want to check the graphical environment in termux must use it. The GUI is based on the X11 Windows System.
Package management:
Termux provides APT and dpkg for package management and installation. Termux is similar in usage to most of the modern Linux distributions, especially Ubuntu and Debian based distros. The only major difference is that you won’t find the Filesystem Hierarchy Standard (FHS). The FHS is found in most of the Linux distributions. Which means you won’t find some directories on the same locations as they are in Linux distros.
Installing Packages:
Let’s install some basic packages. To install packages in termux, the command used is: pkg install
Update and upgrade:
pkg updatepkg update && pkg upgrade
Installing Python:
pkg install python
For Python2
pkg install python2
For Python3
pkg install python3
Installing pip:
pkg install python-pip
Installing Git:
pkg install git
Installing wget:
pkg install wget
Uninstalling Packages:
pkg uninstall pkg-name
List all install packages:
pkg list-all
Installing Deb files:
You can similarly manage dpkg too. In case you’ve got a .deb file, you can’t install it using pkg install command. To install such a file, dpkg is used.
Installing:
dpkg -i ./package.deb
Uninstalling:
dpkg –remove [package name]
Listing all installed packages:
dpkg -l
Rest of the commands are almost the same as basic Debian Linux command line.
Graphical Environment setup:
To enable GUI support in termux, make sure you’ve VNC viewer or Xserver support installed on your device. I’d suggest a VNC viewer. It’s stable and a better choice for GUI. For a better experience use any third party hardware acceleration app as there is no such support available in termux by default.
As I mentioned above, the GUI support uses X11. The X11 packages are available in a separate repository. To enable X11 for GUI support run the following command:
pkg install x11-repo
And for further setup instructions, check this official wiki of termux.
Hacking on Termux:
Now let’s discuss how to use termux for Hacking. Termux allows you to install many useful hacking tools on your Android phone. These awesome hacking tools include Wireshark, Nmap, Metasploit framework, Sqlmap, etc. If I started covering all the tools, the article will become a booklet. That’s why I’ve going to share only the most used tools with the installation process.
for termux
Installing the Metasploit framework on Termux:
Metasploit is one of the best and most used hacking tools right now. It is a complete framework that finds vulnerabilities, finds exploits related to those vulnerabilities and other hacking works. To install the metasploit framework on your termux follow these commands:
pkg install unstable-repopkg install metasploit
Installing Nmap:
Nmap is a complete network mapping tool used for scanning ports and vulnerabilities in a network. To install Nmap simply use the following command:
pkg install nmap
Installing Hydra:
Hydra is one of the best password cracking and brute-forcing tool. It supports different services like telnet, ssh, ftp, etc. To install hydra in termux use this command:
pkg install hydra
Installing SQLMAP:
Sqlmap is a tool used to find and inject SQL injection vulnerabilities in a database/web application. The process of installing sqlmap is a little more complex because you can’t install it directly from the pkg install command. Here is the installation process:
- Updatepkg update
- Install Python2pkg install python2
- Install Gitpkg install git
- Clone sqlmap git repository:
- Now list all the directories in the current location and change to the sqlmap directoryls (to list all directories)
cd sqlmap (if you find the sqlmap directory in the list then type this command) - Now find sqlmap.py and run itls (to list all directories/files to find sqlmap)
python2 sqlmap.py (to run the sqlmap.py script)
That’s it. Now you can use sqlmap.
Installing Tool X to get 200+ hacking tools in termux:
Tool-X is a python script which includes about 260+ hacking tools available in Kali Linux. This script can help you install most of these tools. But before proceeding, let me tell you I haven’t used this script so I don’t know the accuracy of it. So if it doesn’t work try to install the tools manually. Here is how to install Tool X:
- Update, install git (if you haven’t installed git package, skip this if you’re already done this)
- Clone the git repository of Tool X
- Now move to Tool-X directory using the cd command
- Use the python install.py command to install the tool. If it doesn’t work
- Run chmod +x install.aex
- Run./install.aex
Or sh install.aex
So these were 5 hacking tools I thought you must need in Termux. For other tools, just keep doing Google search and find the installation process. We’ve so far discussed the majority of installation processes for different tools. The last one was through bash. And sqlmap through python. Most of the Hacking tools and scripts use these two languages. Comment down if we missed anything. Share this article so more people can gain some knowledge.
By Kartik.....
Post a Comment