Ultimate Guide to Install and Use NMAP in Termux [Step-by-Step]

Hey there! 🙋🏻‍♂️ Ready to unlock the power of network scanning like a pro? In this post, I’m going to show you how to install and use Nmap, the ultimate Network Mapper, right on your Android device using Termux! 🚀 Whether you're an aspiring ethical hacker 🕵️‍♂️ or just someone who wants to explore and understand networks better, Nmap is a tool you need in your arsenal. It lets you scan networks, discover devices, identify open ports, and even detect operating systems—all with just a few commands! 💡

I’ll also throw in some cool example commands so you can get hands-on experience and see how powerful this tool really is! 🔥 By the end of this post, you’ll not only have Nmap installed in Termux, but you’ll also be ready to start scanning like a seasoned network security expert. 💻💥, So buckle up, because if you’re serious about becoming a better hacker (the good kind, of course 😎), learning Nmap is a must! Let’s get started! 🎯


What is Nmap?

Nmap is an Open Source Network mapper that allows you to scan your network and collect Important data about the network as well as all the devices connected to it. For becoming a good hacker you must know how to collect data about any device and network and with the help of the Nmap tool you can get all that information in a few commands. To collect the data about the Device Nmap sends a packet and then analyses it to get the Information.

How to Install and Use Nmap In Termux - 2020

With the help of Nmap, you can use the Footprinting technique to gather a lot of information about the Victim networks as well as the system. You can Scan Networks and get information about all the Connected Devices to a particular system. You can scan all the open ports, You can even find the name of all the devices and these Open ports. 

If you want to Scan a Website and know it's Open port then you can also do that with the help of the Nmap tool, you can find the IPs of the websites. If you wanna know more about Nmap then you can Visit There Offical Site @Nmap.org.



How to install NMAP in Termux?

The process of Termux Nmap installation is as easy as installing any other package in termux. we will update our termux before installing it so we don't face any bugs.

Step 1:

Nmap is a really important tool and we don't want any bugs while running it so we will first upgrade the packages using the below command.
apt update && apt upgrade -y 
How to Install and Use Nmap In Termux - 2020

This command will Install updates in all the previously installed packages in termux.



Step 2:

Nmap is just a basic Package in termux and you can install it like any other package so To install Nmap in Temux you just have to use the pkg command. Nmap is a small package so it won't take a lot of data to download it. You can just paste the below command and it will be installed in no time.
pkg install nmap -y
How to Install and Use Nmap In Termux - 2020 

Now if you see the $ sign on your Termux that means its Completely installed.


NOTE: This post is only for educational purposes. I and this site do not support any criminal activity. If you are doing any sort of misuse of this information This site is not responsible for that. THIS SITE ONLY SUPPORT ETHICAL HACKING. 



Common Nmap Commands in Termux :

You can do many things with the help of the Nmap tool but in Termux Nmap tutorial, I am gonna give few important commands that will give a brief idea of how you can use the Nmap tool in termux.

How to scan a Website with Nmap Termux :

To scan a Website you must have permissions Else it can cause you Trouble, Nmap allows you to Scan there Test website so, in this post, we will use that website, you just have to type Nmap and then the site name you can paste the below command in the termux to scan the Nmap test website.
nmap Scanme.nmap.org
How to Install and Use Nmap In Termux - 2020

 

Output :

You can see that we got an IP-Adress of the website in the second line as well as we can see the latency is 0.24 Seconds.and we can also see all the open port of the website.

Nmap in Termux command output


Scan your Local Network with Nmap Termux :

If You just wanna scan your Local network (Your Intire subnet )and know How many devices are connected with your Wifi then you can use this command. This command will give you a list of all Devices in the network as well as you all the open ports of those devices.
nmap 192.168.1.1/24
How to Install and Use Nmap In Termux - 2020

 

 Output :

Now you can see in the below picture, I have 2 devices in my network. and you can also see all the open ports. The 192.168.1.202 Host is up and the latency is 0.0025s. If you have multiple devices on your network then it will show you a list of all the Devices.

Nmap in Termux command output

Advanced Nmap Usage:

While basic scans can provide useful information, Nmap shines when you explore its advanced features. These advanced techniques can help you uncover deeper insights about the network, operating systems, and services running on hosts. Let’s explore a few key advanced Nmap commands.

Aggressive scan using Nmap Termux :

Aggressive scans provide detailed information about the target, including OS detection, version detection, script scanning, and traceroute. This is useful when you need to gather comprehensive details.
nmap -A 192.168.1.1/24
How to Install and Use Nmap In Termux - 2020

 

Output :

With the aggressive scan, you can see more details like the iBall Baton Login and the URL of the login page. This example is from my local network, so you might not find anything too exciting. However, when scanning a website, this command can uncover a lot more useful information.

Nmap in Termux command output


Operating System Detection (-O):

Nmap can attempt to detect the operating system of a host based on network responses. This is handy for network administrators or ethical hackers looking to understand the target’s OS.

nmap -O scanme.nmap.org

Output :

Nmap will analyze network packets and return the most likely operating system and its version. While not always 100% accurate, it provides valuable insights. 



Scan a Single port in Nmap Termux :

If you just wanna scan a Single Port of a Particular Ip address then you can do that using the below command. Here I am scanning the entire network for the port 80 but you can put a single IP and it will work Perfectly. The advantage of scanning a single port is that it will save you some extra time especially when you are in a hurry.
nmap -p 80 192.168.1.1/24
How to Install and Use Nmap In Termux - 2020

 

Output :

Here you can see that Nmap is checking for port 80 only but on my entire network.

Nmap in Termux command output


Scan Multiple Port in Nmap Termux :

Do you know most of the time when you scan a Network and you find a device with open port 80 as well as 443 then it means that its a WebServer? So In the below command, I am gonna scan these two ports on my network, of course, I don't have a webserver running in my home so it won't show 443 port but if you scan it in a network where they have a webserver then it will show with this command.
nmap -p 80,443 192.168.1.1/24
How to Install and Use Nmap In Termux - 2020

 

Output :

In the below picture you can clearly see that it is only checking for 2 port and as the output, we can see in my routers Ip address port 80 is open but port 443 is not. And in my second device, Both ports are closed.

Nmap in Termux command output





Ping A Website or an IP-Address with NMAP in Termux :

If you Quickly wanna Check if a Host is still up or not then you can do a Ping. It will tell you the amount of time it took the Nmap to make a connection with the website or the Device.
nmap -sP 192.168.1.202
How to Install and Use Nmap In Termux - 2020

You can also Type Nmap -sP www.google.com and it will ping the google server and tell you latency. 

Output :

You can see that the latency is 0.02 seconds and the Host is still up.

Nmap in Termux command output




Perform a Quick Scan with NMAP in Termux:

If you just wanna do a quick scan of the network and you only wanna know basic information then you can use -F Argument. It is much faster than the normal scan.
nmap -F 192.168.1.1/24
How to Install and Use Nmap In Termux - 2020

 

 Output :

Here you can see I got the output much faster and The result is still good.

Nmap in Termux command output




Check Nmap Version in Termux :

If you wanna check the Nmap Version then you can type the below command.
nmap -V
How to Install and Use Nmap In Termux - 2020

 

Output :

Now you can see the Nmap Version in the below picture.

Nmap in Termux command output




Conclusion :

Nmap is a Fine information gathering tool and it can be useful for people who are at least intermediate hackers. There are more New and advanced Information gathering tools. Most of the Nmap Commands are not working in termux because they require root privileges. Still, you can use this tool to scan networks and you will get decent information about the network. If you have any questions, just ask me in the comments and will surly give you a reply, Thanks For Reading Guys, and as always Stay Ethical👾.

Post a Comment

4 Comments

Popup Image