Top 20 Nmap Commands Used in Cybersecurity Interviews
Top 20 Nmap Commands Used in Cybersecurity Interviews
Nmap (Network Mapper) is a widely used open-source network scanning tool designed for network discovery and security auditing. It helps security professionals identify active hosts, open ports, running services, operating systems, and potential vulnerabilities on a network. The tool was created by Gordon Lyon and is officially distributed as Nmap.
In cybersecurity interviews and penetration-testing roles, candidates are often asked about common Nmap commands used for reconnaissance and network analysis.
Below are 20 important Nmap commands, explained in simple and precise terms.
1. Basic Port Scan
Command:
nmap 192.168.1.1
Description:
Performs a basic scan of the target and checks the 1000 most common TCP ports.
2. Scan Multiple Hosts
Command:
nmap 192.168.1.1 192.168.1.2
Description:
Scans multiple target systems in a single command.
3. Scan a Subnet (Network Range)
Command:
nmap 192.168.1.0/24
Description:
Scans all devices within a subnet.
Commonly used for network discovery.
4. Host Discovery (Ping Scan)
Command:
nmap -sn 192.168.1.0/24
Description:
Identifies active hosts on a network without scanning ports.
5. Scan Specific Ports
Command:
nmap -p 80,443 192.168.1.1
Description:
Scans only the specified ports.
6. Scan a Port Range
Command:
nmap -p 1-1000 192.168.1.1
Description:
Scans ports within a defined range.
7. Scan All Ports
Command:
nmap -p- 192.168.1.1
Description:
Scans all 65,535 TCP ports on the target.
8. SYN Stealth Scan
Command:
nmap -sS 192.168.1.1
Description:
Performs a half-open TCP scan.
This is faster and commonly used in security testing.
9. TCP Connect Scan
Command:
nmap -sT 192.168.1.1
Description:
Performs a full TCP connection to each port.
Used when SYN scan privileges are not available.
10. UDP Scan
Command:
nmap -sU 192.168.1.1
Description:
Scans UDP ports, often used to detect services such as DNS or SNMP.
11. Service Version Detection
Command:
nmap -sV 192.168.1.1
Description:
Identifies the software and version running on open ports.
12. Operating System Detection
Command:
nmap -O 192.168.1.1
Description:
Attempts to determine the operating system of the target device.
13. Aggressive Scan
Command:
nmap -A 192.168.1.1
Description:
Performs multiple detection techniques including:
OS detection
Service detection
Script scanning
Traceroute
14. Fast Scan
Command:
nmap -F 192.168.1.1
Description:
Scans fewer ports for faster results.
15. Skip Host Discovery
Command:
nmap -Pn 192.168.1.1
Description:
Treats the target as online even if it does not respond to ping.
16. Default Script Scan
Command:
nmap -sC 192.168.1.1
Description:
Runs the default scripts from the Nmap Script Engine (NSE).
17. Vulnerability Scan
Command:
nmap --script vuln 192.168.1.1
Description:
Runs scripts that check for known vulnerabilities.
18. ACK Scan (Firewall Detection)
Command:
nmap -sA 192.168.1.1
Description:
Helps determine whether a firewall is filtering traffic.
19. Save Scan Results to File
Command:
nmap -oN results.txt 192.168.1.1
Description:
Saves scan results in normal text format.
20. Combined Scan (Common Interview Example)
Command:
nmap -sS -sV -O 192.168.1.1
Description:
Performs a combined scan including:
SYN stealth scan
Service version detection
Operating system detection
Summary
In cybersecurity interviews, Nmap questions usually focus on understanding:
Host discovery
Port scanning techniques
Service detection
Operating system detection
Firewall identification
Vulnerability scanning
Understanding how these commands work helps security professionals perform network reconnaissance and security assessments effectively using Nmap.

Comments
Post a Comment