Introduction
Nmap (Network Mapper) is the industry standard for network discovery and security auditing. Every security professional must master Nmap.
Basic Scanning
- Quick scan: nmap target.com
- All ports: nmap -p- target.com
- Specific ports: nmap -p 22,80,443 target.com
- Port range: nmap -p 1-1000 target.com
- Version detection: nmap -sV target.com
- Aggressive scan: nmap -A target.com
- HTTP servers: nmap --script http-server-header target.com
- SYN scan (stealth): nmap -sS target.com
- TCP connect: nmap -sT target.com
- UDP scan: nmap -sU target.com
- Null scan: nmap -sN target.com
- Default scripts: nmap -sC target.com
- Vuln scan: nmap --script vuln target.com
- HTTP enum: nmap --script http-enum target.com
- SSL check: nmap --script ssl-enum-ciphers target.com
- Normal: nmap -oN scan.txt target.com
- XML: nmap -oX scan.xml target.com
- Grepable: nmap -oG scan.grep target.com
Service Detection
Scan Techniques
NSE Scripts
Output Formats
Conclusion
Nmap is the foundation of network security testing. Practice in your own lab and always obtain proper authorization.