NMap : Network Audit Tool

Nmap is a tool for network exploration and many times used for security audit. It sends raw packets on target PC and then it determines many features of target PC such as MAC address, Open Ports, OS Detection etc.

Below is simple use of nmap command in linux.  Before that you need to install the tool. The minimum installation does not install nmap tool.

# yum install nmap -y

Now let us see the usage,

To get list of open ports on target PC, you can use

[root@station5 ~]# nmap 10.0.0.1

Starting Nmap 6.40 ( http://nmap.org ) at 2016-10-02 21:57 IST
Nmap scan report for 10.0.0.1
Host is up (0.00022s latency).
Not shown: 997 closed ports
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
80/tcp open http
MAC Address: F2:1F:48:AC:FC:DB (Unknown)

Nmap done: 1 IP address (1 host up) scanned in 0.10 seconds
[root@station5 ~]#

For  OS Detection of target PC, you can use -O option.

[root@station5 ~]# nmap -O 10.0.0.254

Starting Nmap 6.40 ( http://nmap.org ) at 2016-10-02 21:59 IST
Nmap scan report for 10.0.0.254
Host is up (0.0014s latency).
Not shown: 998 closed ports
PORT STATE SERVICE
21/tcp open ftp
80/tcp open http
MAC Address: 40:4A:03:4B:1B:53 (ZyXEL Communications)
Device type: broadband router
Running: Telewell embedded
OS CPE: cpe:/h:telewell:tw-ea501
OS details: Telewell TW-EA501 ADSL modem
Network Distance: 1 hop

OS detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 1.39 seconds
[root@station5 ~]#