Nmap
Nmap is a utility for network exploration and security auditing that supports host discovery, port scanning, version detection, and OS fingerprinting. It includes related tools like ncat, nping, ndiff, and zenmap for enhanced network analysis capabilities.
Description
Nmap performs ping scanning to determine live hosts, multiple port scanning techniques, version detection to identify service protocols and application versions, and TCP/IP fingerprinting for remote host OS identification. It supports flexible target specification, decoy scanning, sunRPC scanning, and works across Unix, Windows, and handheld devices in both GUI and command-line modes.
Use cases include network mapping, vulnerability assessment through service enumeration, and firewall evasion testing. The suite extends functionality with ncat for socket manipulation, nping for packet crafting and traceroute, ndiff for comparing scan results, and zenmap as a graphical frontend.
Nmap is essential for penetration testing, security audits, and reconnaissance phases of engagements, providing comprehensive visibility into network topology and services.
How It Works
Nmap uses techniques like SYN stealth scans (-sS), UDP scans (-sU), TCP connect scans (-sT), and ping scans (-sn) to discover hosts and open ports. It employs NSE scripts for vulnerability detection, version probing via banner grabbing and protocol matching (-sV), OS detection through TCP/IP stack fingerprinting (-O), and traceroute via packet TTL manipulation (-A). Related tools operate on raw sockets: nping crafts custom TCP/UDP/ICMP/ARP packets, ncat handles socket I/O with exec and proxy support, ndiff parses XML outputs for delta comparison.
Installation
sudo apt install nmapFlags
Examples
nmap -v -A -sV 192.168.1.1nping --tcp -p 22 --flags syn --ttl 2 192.168.1.1ndiff yesterday.xml today.xmlncat -v --exec "/bin/bash" --allow 192.168.1.123 -l 4444 --keep-opennmap -v -F -oX yesterday.xml 192.168.1.1nmap -v -sn 192.168.0.0/16 10.0.0.0/8nmap -v -iR 10000 -Pn -p 80