ALL NMAP Commands
1. Basic Scan
This command performs a basic scan of the specified IP address to check its connectivity status on the system. It determines open ports on the target machine.
nmap <target_IP_adress>
2. Port Scanning
This command performs to the scan a specific port on the given IP address. By determining the state of the port, it helps assess whether essential services are operational.
nmap -p <port_number> <target_IP_adress>
This command has the purpose of obtaining information about the status of the different ranges of ports against an IP address on the target system. It reveals which of the ports are open, closed, or filtered.
nmap -p <source_port>-<destination_port> <target_IP_adress>
3.Service and Version Detection
This command detects the services running on open ports and identifies their versions of target machine. Knowing the service details is important for interpreting potential vulnerabilities in the target system.
nmap -sV <target_IP_adress>
4.Operating System Detection
This command tries to determine the OS of the victim based on its responses.
nmap -O <target_IP_adress>
5.Scanning All Devices on a Network
It performs a ping scan over a given range of IP addresses to discover connected devices, thus listing all the active hosts in the network segment.
nmap -sP <network_IP_range>
6.Verbose Output
This command provides a more detailed output of the scanning process.
nmap -v <target_IP_adress>
7.TCP Syn Scan (Stealth Scan)
This command performs a stealth scan by sending SYN packets to determines open ports without unfinished the TCP handshake. This approach decreases the possibility of getting detected by the target system.
nmap -sS <target_IP_adress>
8.UDP Scan
This command enables UDP scanning.UDP scanning works by sending a UDP packet to each port on the targeted IP address. For most ports this packet will be empty (no payload), but for a few more common ports a protocol-specific data will be sent.
nmap -sU <target_IP_adress>
9.Executing a Specific Script
This command line option followed by the name of the script you want to execute or the name of the entire category of scripts you want to execute. Nmap will then load the script and execute it (or them) against the target IP adress that you define.
nmap --script <script_name> <target_IP_adress>
10.Saving Output to a File
This command saves the scan results in a normal text format to a designated file. It is way to output report findings for future analysis.
nmap -oN <file_name> <target_IP_adress>
This command outputs the scan results in XML format, which is useful for integration with other tools.
nmap -oX <file_name> <target_IP_adress>
11. Help and Usage Information
This command displays the help menu and usage information for Nmap.
nmap -h