Network mapper (NMAP) is a powerful scanner that is often used in network security penetration testing. Below we will introduce several scanning parameters, mainly from the Internet:
1) obtain the system type and open port of the remote host
nmap -sS -P0 -sV -O
<Target> can be a single IP address, host name, domain name, or subnet.
-Ss tcp syn scan (also known as semi-open or stealth scan)
-P0 allows you to Disable ICMP pings.
-SV: Enable System Version Detection
-O attempts to identify remote operating systems
Other options:
-A: Enable the operating system fingerprint and version detection at the same time.
-V: Output Scan details.
nmap -sS -P0 -A -v < target >
2) list hosts with specified ports Enabled
nmap -sT -p 80 -oG – 10.0.1.* | grep open
3) Search for all online hosts on the network
nmap -sP 10.0.1.*
4) ping the IP address within the specified range
nmap -sP 10.0.1.100-254
5) Search for unused IP addresses on a subnetwork
nmap -T4 -sP 10.0.1.0/24 && egrep “00:00:00:00:00:00″ /proc/net/arp
6) scan the Conficker worm on the LAN.
nmap -PN -T4 -p139,445 -n -v –script=smb-check-vulns –script-args safe=1 10.0.1.1-254
7) scan malicious access points on the network
nmap -A -p1-85,113,443,8080-8100 -T4 –min-hostgroup 50 –max-rtt-timeout 2000 –initial-rtt-timeout 300 –max-retries 3 –host-timeout 20m –max-scan-delay 1000 -oA wapscan 10.0.1.0/24
8) scan host ports using bait scanning methods
sudo nmap -sS 10.0.1.10 -D 10.0.1.11
9) How many Linux and win devices are displayed on the network?
nmap -F -O 10.0.1.1-254|grep "Running:" >/tmp/os; echo "`cat /tmp/os |grep linux |wc -l` Linux dervice(s)"; echo "`cat /tmp/os |grep Windows |wc -l` Windows Device"
This article is from the "DBQ blog" and will not be reproduced!
Common Nmap scan parameters