01. What is Nmap
Nmap ("Network Mapper")¶
Nmap is a free and open source utility for network discovery and security auditing. Many systems and network administrators also find it useful for tasks such as network inventory, managing service upgrade schedules, and monitoring host or service uptime. 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. It was designed to rapidly scan large networks, but works fine against single hosts.
Nmap Commands¶
Basic Scan¶
Scans the specified IP address.Save Output in Grepable Format¶
Performs a verbose scan and saves output in grepable format.Scan Specific Port (e.g., Port 22)¶
Scans a specific port and saves output in grepable format.Aggressive Scan¶
Performs an aggressive scan, including OS detection, version detection, script scanning, and traceroute.Service Version Detection¶
Detects service versions running on the open ports.Fast Scan¶
Scans fewer ports quickly.Fast Scan Multiple Targets¶
Performs a fast scan on multiple IPs and saves the output.Display Only Open Ports¶
Displays only the open ports for the given IP address.NSLookup Commands¶
Interactive Lookup¶
- Command:
nslookup
Starts the nslookup interactive mode for DNS queries.
Save Results to a File¶
- Command:
nslookup IPaddress >> filename.txt
Appends the DNS lookup results of an IP address to the specified file.