Skip to content

Nmap (Network Mapper)

Nmap is an essential tool for network discovery and security auditing. It can be used to scan hosts for open ports, determine running services and versions, and perform operating system detection.

nmap -sV -sC -p- -oA nmap_scan <target_ip> # (1)!
  1. Explanation of flags used:
    • -sV: Probe open ports to determine service/version info.
    • -sC: Script scan using default scripts. Equivalent to --script=default.
    • -p-: Scan all 65,535 ports.
    • -oA nmap_scan: Output results in three major formats (Nmap, XML, and grepable) at once with the base name nmap_scan.

Flag Reference

Flag Description
-O Enable operating system detection.
-A Enable OS detection, version detection, script scanning, and traceroute.
-p Scan specific ports (e.g., -p 80,443).
-v Increase verbosity (use -vv for more).