How to install Nmap Tool on ParrotOs 3.9

To install Nmap Tool on ParrotOs 3.9

Nmap tool allows the users and system administrators to scan the large networks. It provides information to determine the running status of hosts  It supports a large number of scanning techniques including UDP, TCP, TCP SYC, ICMP, IP protocol and null scan.  In this tutorial, we will cover the installation of Nmap tool on Parrot OS. 

Installation

First, add the required repository in the following location as shown below.

┌─[root@linuxhelp]─[~]

└──╼ #vim /etc/apt/sources.list
deb http://deb.debian.org/debian-security stable/updates main
deb-src http://deb.debian.org/debian-security stable/updates main
deb http://ftp.debian.org/debian stretch-backports main
deb-src http://ftp.debian.org/debian stretch-backports main

After adding the repositories Update the package list.

┌─[root@linuxhelp]─[~]

└──╼ #apt-get update
Get:1 http://ftp.debian.org/debian stretch-backports InRelease [91.8 kB]  
Get:2 http://deb.parrotsec.org/parrot stable InRelease [14.6 kB]              
Get:3 http://deb.parrotsec.org/parrot stable/main amd64 Packages [16.4 MB]    
Get:4 http://deb.debian.org/debian-security stable/updates InRelease [63.0 kB]
Get:5 http://ftp.debian.org/debian stretch-backports/main Sources [225 kB]    
Get:6 http://ftp.debian.org/debian stretch-backports/main amd64 Packages [260 kB]
Get:7 http://deb.debian.org/debian-security stable/updates/main Sources [109 kB]
Get:8 http://ftp.debian.org/debian stretch-backports/main Translation-en [182 kB]
Get:9 http://deb.debian.org/debian-security stable/updates/main amd64 Packages [269 kB]
Get:10 http://deb.debian.org/debian-security stable/updates/main Translation-en [119 kB]
Get:11 http://deb.parrotsec.org/parrot stable/contrib amd64 Packages [132 kB] 
Get:12 http://deb.parrotsec.org/parrot stable/non-free amd64 Packages [191 kB]
Fetched 18.1 MB in 54s (335 kB/s)                                             
Reading package lists... Done

Now you can Install the application as shown.

┌─[root@linuxhelp]─[~]

└──╼ #apt-get install nmap
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following additional packages will be installed:
  nmap-common
The following packages will be upgraded:
  nmap nmap-common
2 upgraded, 0 newly installed, 0 to remove and 1545 not upgraded.
Need to get 5,847 kB of archives.
After this operation, 719 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://mirror.kku.ac.th/parrot stable/main amd64 nmap amd64 7.60+dfsg2-1kali1 [2,068 kB]
Get:2 https://mirror.kku.ac.th/parrot stable/main amd64 nmap-common all 7.60+dfsg2-1kali1 [3,779 kB]
Fetched 5,847 kB in 19s (297 kB/s)                                             
.
.
.
.
Unpacking nmap-common (7.60+dfsg2-1kali1) over (7.60+dfsg2-1) ...
Setting up nmap-common (7.60+dfsg2-1kali1) ...
Setting up nmap (7.60+dfsg2-1kali1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Configuring sandbox profiles....
Sandbox profiles updated!

The installation is complete now and you can verify the version using the following command.

┌─[root@linuxhelp]─[~]

└──╼ #nmap --version

Nmap version 7.60 ( https://nmap.org )
Platform: x86_64-pc-linux-gnu
Compiled with: liblua-5.3.3 openssl-1.1.0g libssh2-1.8.0 libz-1.2.8 libpcre-8.39 nmap-libpcap-1.7.3 nmap-libdnet-1.12 ipv6
Compiled without:
Available nsock engines: epoll poll select

with this, the method to  install Nmap Tool on ParrotOs 3.9 comes to an end.

Tag : Parrot OS nmap
FAQ
Q
This is what I've tried (and a lot of other variations):

sudo nmap -sU -PE --ip-options "\x94\x04\x00\x00" 15.234.166.241

nmap man page says that "-PE" will send ICMP Echo Request, but all I see in the wireshark trace is TCP activity. How can do this?
A
nping had what I needed:

sudo nping -icmp -c 1 -icmp-type 8 --ip-options "\x94\x04\x00\x00" -dest-ip 192.168.1.5
Q
I have a question regarding to nmap. Whenever I try to run nmap as a root, I get:

> Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 3.25 seconds

While it works just fine as a non-privileged user. Any ideas?
A
Nmap adapts its techniques to use the best available methods using the current privilege level, unless you explicitly request something different. The things that Nmap needs root (or sudo) privilege for on Linux are:

Sniffing network traffic with libpcap

Sending raw network traffic
Q
Aggressive and obtrusive Scan in Nmap?
A
Aggressive and obtrusive Scan

Not like the earlier commands this scan is very aggressive and very obtrusive. The option -A will tell nmap to perform OS checking and version checking. The -T4 is for the speed template, these templates are what tells nmap how quickly to perform the scan.

"$ nmap -T4 -A 0.0.0.0"
Q
How to Scan for all ports TCP and UDP in Nmap?
A
This command require a root privileges and it is the same as above however by specifying the full port range from 1 to 65535 nmap will scan to see if the host is listening on all available ports. You can use the port range specification on any scan that performs a port scan.

"# nmap -sS -sU -PN -p 1-65535 0.0.0.0"
Q
How to get the information and option to be available for the Nmap?
A
Get the information and option to be available for the Nmap, run the following command on the terminal, "sudo nmap --help" (or) "man nmap"