The document provides examples of how to use Nmap to scan individual IPs, ranges of IPs, subnets, and hostnames to scan specific ports or port ranges. It also gives examples for different scan types, service and OS detection, output formats, using Nmap scripts for vulnerabilities and web applications, and gathering IP address information.
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
136 views
Nmap Commands
The document provides examples of how to use Nmap to scan individual IPs, ranges of IPs, subnets, and hostnames to scan specific ports or port ranges. It also gives examples for different scan types, service and OS detection, output formats, using Nmap scripts for vulnerabilities and web applications, and gathering IP address information.
Standard service detection nmap -sV 192.168.1.1 More aggressive Service Detectio nmap -sV --version-intensity 5 192.168.1.1 Lighter banner grabbing detection nmap -sV --version-intensity 0 192.168.1.1
Nmap Output Formats
Save default output to file nmap -oN outputfile.txt 192.168.1.1
Save results as XML nmap -oX outputfile.xml 192.168.1.1 Save results in a format for grep nmap -oG outputfile.txt 192.168.1.1 Save in all formats nmap -oA outputfile 192.168.1.1
Digging deeper with NSE Scripts
Scan using default safe scripts nmap -sV -sC 192.168.1.1
Get help for a script nmap --script-help=ssl-heartbleed Scan using a specific NSE script nmap -sV -p 443 �script=ssl-heartbleed.nse 192.168.1.1 Scan with a set of scripts nmap -sV --script=smb* 192.168.1.1
Gather page titles from HTTP services nmap --script=http-title 192.168.1.0/24
Get HTTP headers of web services nmap --script=http-headers 192.168.1.0/24 Find web apps from known paths nmap --script=http-enum 192.168.1.0/24 Heartbleed Testing nmap -sV -p 443 --script=ssl-heartbleed 192.168.1.0/24
IP Address information
Find Information about IP address nmap --script=asn-query,whois,ip-geolocation-
Michael Bazzell - Open Source Intelligence Techniques - Resources For Searching and Analyzing Online Information-Createspace Independent Publishing Platform (2021)