A port scanner is software that can be used to check which services in a system are working with TCP or UDP over the Internet protocol. The port scanner relieves the user of the work of examining and interpreting the response behavior of a system itself with a sniffer.
Nmap is a free port scanner for scanning and evaluating hosts in a computer network. The name stands for Network Mapper. Earlier, we published two usage guide for Nmap – (1) WordPress Security Test with Nmap NSE Scripts (2) Basic nmap, thc-ipv6 Commands. The guides were for Mac OS X and CentOS.
Installing Nmap on Windows is quite straightforward and there are three options. The official GUI alternative is called ZeNmap and is a quite robust tool.
---
First Way (CLI) : Via Windows Subsystem for Linux (WSL)
We already know that we can run Bash Shell on Microsoft Windows. If you have configured your WSL with Ubuntu Bash, simply run these commands to install Nmap :
1 2 | apt update -y && apt upgrade -y sudo apt-get install nmap |
You can not now use the standard Nmap commands (for Linux & Mac) before reading the Third Way described below. Its too buggy way to use. I have described a fix below.
Second Way (CLI) : Via Windows CMD
You need to run nmap.exe
from a DOS/command window. Alternatively, you can download and install a command shell like Cygwin. Also, you need to run the Npcap and Microsoft Visual C++ 2013 Redistributable Package installers.
Download Link :
1 | https://nmap.org/book/inst-windows.html |
Look under “Command-line Zip Binaries” sub-header. Not our suggested way to run because it is complex to most of the non-Windows experts.
Third Way (GUI) : Via ZeNmap
The Nmap executable Windows installer includes the Zenmap graphical frontend. So, it is easy to install – just download the exe file and go ahead :
1 | https://nmap.org/download.html |
Download from the link of “Latest stable release self-installer”.
ZeNmap is the official Nmap GUI. It has its own guide :
1 | https://nmap.org/zenmap/man.html |
The downloaded file is an executable. Right-click the file and then click “run as administrator.” A window will appear and click “I Agree”. Next, the installer will ask you which components of Nmap you’d like to install. All of the components will be selected by default. Unless you are experienced, go ahead without modification and accept the proposed installation. Then the installer will ask you where you want to install Nmap. It will default to C:\Program Files (x86)\Nmap. The important thing is that you know where Nmap is installed because you’ll need that information to call it from the command line. Click “Install”, and Nmap will start to install.
For “First Way”, i.e. WSL usage, you need to alias it from Ubuntu bash:
1 | alias nmap='"/mnt/c/Program Files (x86)/Nmap/nmap.exe"' |
Hopefully, you can now use Nmap from Ubuntu bash too. The graphical user interface of ZeNmap is like puTTY.
Conclusion
We have mentioned three methods. Sounds great. But unfortunately except for the GUI (ZeNmap), nothing is that great. Even, ZeNmap has limitations because essentially Nmap works better on *nix systems. WSL has a large number of socket issues. So, with WSL you may face “Couldn’t open a raw socket. Error: Permission denied (13)”. Although, I have described the fix, I am required to mention it.
Tagged With nmap windows cli install , download n map for windows phone , how to run nse scripts windows , where should i download Nmap to on HP