Nmap Commands
Nmap Commands
1. Basic Ping Scan
This command checks if a host is up by performing a simple ping scan.
1
nmap -sn <target>
2. Basic Port Scan
This command performs a default port scan on a target.
1
nmap <target>
3. Service Version Detection
This command attempts to determine the version of services running on open ports.
1
nmap -sV <target>
4. Operating System Detection
This command attempts to determine the operating system of the target.
1
nmap -O <target>
5. Comprehensive Scan
This command combines service version detection, OS detection, and a script scan.
1
nmap -A <target>
6. Aggressive Scan
This command performs an aggressive scan that includes OS detection, version detection, script scanning, and traceroute.
1
nmap -T4 -A -v <target>
7. Full Port Scan
This command scans all 65535 ports.
1
nmap -p- <target>
8. Intense Scan Plus UDP
This command performs an intense scan with UDP ports included.
1
nmap -sS -sU -T4 -A -v <target>
9. Scan with NSE Scripts
This command utilizes the Nmap Scripting Engine (NSE) to run a variety of scripts for additional information gathering.
1
nmap -sC <target>
10. Most Aggressive Scan
This command is the most aggressive, combining all aggressive techniques and scanning all ports with NSE scripts.
1
nmap -p- -T4 -A -v -sC <target>
Examples of <target>
Specification
- Single IP:
192.168.1.1
- IP Range:
192.168.1.1-254
- Subnet:
192.168.1.0/24
- Hostname:
example.com