How to Install Nmap From Source
Nmap is a network mapping tool used during the Information Gathering phase of a network penetration testing engagement. It is completely free and open source. Click on the following link for more information about the Nmap Project. In this step-by-step tutorial you will learn how to install Nmap from source on an Ubuntu Linux machine.
Most modern Linux distributions come with a pre-packaged version of Nmap that can be installed with a simple command. However, we recommend compiling from source for two main reasons. The first reason is that it ensures the latest available release is being used. The second (and probably the most important) is the amount of NSE Scripts (which are extremely useful!) is constantly growing so keeping up to date with the bleeding edge version of Nmap is critical.
Install Nmap Dependencies: How To Install Nmap
First you will need to obtain the necessary dependencies in order to install nmap successfully.
$ sudo apt-get install git wget build-essential checkinstall libpcre3-dev libssl-dev
Clone The Git Repository: How To Install Nmap
Next you’ll want to check out the source repository from the Nmap Github page in order to install nmap from the latest available version.
$ git clone https://github.com/nmap/nmap.git
Configure Nmap Installation: How To Install Nmap
Next run the configuration script. If you see any errors or warnings make sure you go back and install the necessary libraries from Step 1.
Compile The Build Files: How To Install Nmap
Next run make and then make install to compile and install nmap on your system.
$ make && make install
Verify Your Installation: How To Install Nmap
When you are all done you should be able to run nmap with the “-V” option to see that you are running the latest version from source. At the time this article was published the command output would have looked like this. Thats all there is to it, now you know how to install nmap from source. If you have any questions leave a comment below.
$ nmap -V Nmap version 7.25SVN ( https://nmap.org ) Platform: x86_64-unknown-linux-gnu Compiled with: nmap-liblua-5.3.3 openssl-1.0.1f libpcre-8.31 nmap-libpcap-1.7.3 nmap-libdnet-1.12 ipv6 Compiled without: Available nsock engines: epoll poll select
Share this article
Follow Pentest Geek
Subscribe to Pentest Geek
- How To Install Metasploit Framework Ubuntu 14.04
- How to Install Nmap From Source
- Another Lap Around Microsoft LAPS
- Credential Harvesting via MiTM – Burp Suite Tutorial
- SSL Certificate from letsencrypt.org – Setup Guide
- Forensics and Incident Response
- Information Gathering
- Penetration Testing Tutorials
- Web Applications