Introduction
Laymen explanation
Technical explanation
Nmap (“Network Mapper”) is an open source tool for network exploration and security auditing. It was designed to rapidly scan large networks, although it works fine against single hosts. Nmap
uses raw IP packets in novel ways to determine what hosts are available on the network, what services (application name and version) those hosts are offering, what operating systems (and OS
versions) they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics. While Nmap is commonly used for security audits, many systems and network
administrators find it useful for routine tasks such as network inventory, managing service upgrade schedules, and monitoring host or service uptime.
Example
Example for scanning yahoo.com
oot@ubuntu:~/personal/fosscafe/hackathon/gitrepo/hack101# nmap -A -v yahoo.com
Starting Nmap 7.01 ( https://nmap.org ) at 2017-11-12 03:32 IST
NSE: Loaded 132 scripts for scanning.
NSE: Script Pre-scanning.
Initiating NSE at 03:32
Completed NSE at 03:32, 0.00s elapsed
Initiating NSE at 03:32
Completed NSE at 03:32, 0.00s elapsed
Initiating Ping Scan at 03:32
Scanning yahoo.com (206.190.39.42) [4 ports]
Completed Ping Scan at 03:32, 0.41s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 03:32
Completed Parallel DNS resolution of 1 host. at 03:32, 0.29s elapsed
Initiating SYN Stealth Scan at 03:32
Scanning yahoo.com (206.190.39.42) [1000 ports]
Discovered open port 80/tcp on 206.190.39.42
Discovered open port 443/tcp on 206.190.39.42
Discovered open port 8008/tcp on 206.190.39.42
Completed SYN Stealth Scan at 03:32, 20.02s elapsed (1000 total ports)
Initiating Service scan at 03:32
Scanning 3 services on yahoo.com (206.190.39.42)
Reference
https://linux.die.net/man/1/nmap