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 for Nmap to install successfully.
$ sudo apt-get install git wget build-essential checkinstall libpcre3-dev libssl-dev libpcap-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.
$ ./configure
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
Leave a Reply
Share This
Recent Posts
- Playing With the New Burp Suite REST API
- Burp Suite 2.0 Beta Review
- Attacking Palo Alto Networks PAN-OS ‘readSessionVarsFromFile()’
- GPG Errors While Updating Kali Linux
- Installing Kali NetHunter on HTC Nexus 9
Subscribe To Our Mailing List
The Ultimate Burp Suite Training Program
Learn Network Penetration Testing
Penetration Testing
Categories
- AWBS
- Burp Suite
- Definitions
- Forensics and Incident Response
- Information Gathering
- Metasploit
- Penetration Testing Tutorials
- Phishing
- Presentations
- Tools
- Web Applications
- Wireless
Hi Royce,
$ make && make install
gives me the following error”static assertion failed: comparison object must be invocable as const”
Any idea what the problem here is?
Thanks!
sudo apt-get install libpcap-dev
You forgot about libpcap!
Thanks, updated to include libpcap-dev!