目录
英文原文:
Usage: nmap [Scan Type(s)] [Options] {target specification}
TARGET SPECIFICATION:
Can pass hostnames, IP addresses, networks, etc.
Ex: scanme.nmap.org, microsoft.com/24, 192.168.0.1; 10.0-255.0-255.1-254
-iL <inputfilename>: Input from list of hosts/networks
-iR <num hosts>: Choose random targets
--exclude <host1[,host2][,host3],...>: Exclude hosts/networks
--excludefile <exclude_file>: Exclude list from file
HOST DISCOVERY:
-sL: List Scan - simply list targets to scan
-sP: Ping Scan - go no further than determining if host is online
-P0: Treat all hosts as online -- skip host discovery
-PS/PA/PU [portlist]: TCP SYN/ACK or UDP discovery probes to given ports
-PE/PP/PM: ICMP echo, timestamp, and netmask request discovery probes
-n/-R: Never do DNS resolution/Always resolve [default: sometimes resolve]
SCAN TECHNIQUES:
-sS/sT/sA/sW/sM: TCP SYN/Connect()/ACK/Window/Maimon scans
-sN/sF/sX: TCP Null, FIN, and Xmas scans
--scanflags <flags>: Customize TCP scan flags
-sI <zombie host[:probeport]>: Idlescan
-sO: IP protocol scan
-b <ftp relay host>: FTP bounce scan
PORT SPECIFICATION AND SCAN ORDER:
-p <port ranges>: Only scan specified ports
Ex: -p22; -p1-65535; -p U:53,111,137,T:21-25,80,139,8080
-F: Fast - Scan only the ports listed in the nmap-services file)
-r: Scan ports consecutively - don't randomize
SERVICE/VERSION DETECTION:
-sV: Probe open ports to determine service/version info
--version-light: Limit to most likely probes for faster identification
--version-all: Try every single probe for version detection
--version-trace: Show detailed version scan activity (for debugging)
OS DETECTION:
-O: Enable OS detection
--osscan-limit: Limit OS detection to promising targets
--osscan-guess: Guess OS more aggressively
TIMING AND PERFORMANCE:
-T[0-6]: Set timing template (higher is faster)
--min-hostgroup/max-hostgroup <size>: Parallel host scan group sizes
--min-parallelism/max-parallelism <numprobes>: Probe parallelization
--min-rtt-timeout/max-rtt-timeout/initial-rtt-timeout <msec>: Specifies
probe round trip time.
--host-timeout <msec>: Give up on target after this long
--scan-delay/--max-scan-delay <msec>: Adjust delay between probes
FIREWALL/IDS EVASION AND SPOOFING:
-f; --mtu <val>: fragment packets (optionally w/given MTU)
-D <decoy1,decoy2[,ME],...>: Cloak a scan with decoys
-S <IP_Address>: Spoof source address
-e <iface>: Use specified interface
-g/--source-port <portnum>: Use given port number
--data-length <num>: Append random data to sent packets
--ttl <val>: Set IP time-to-live field
--spoof-mac <mac address, prefix, or vendor name>: Spoof your MAC address
OUTPUT:
-oN/-oX/-oS/-oG <file>: Output scan results in normal, XML, s|<rIpt kIddi3,
and Grepable format, respectively, to the given filename.
-oA <basename>: Output in the three major formats at once
-v: Increase verbosity level (use twice for more effect)
-d[level]: Set or increase debugging level (Up to 9 is meaningful)
--packet-trace: Show all packets sent and received
--iflist: Print host interfaces and routes (for debugging)
--append-output: Append to rather than clobber specified output files
--resume <filename>: Resume an aborted scan
--stylesheet <path/URL>: XSL stylesheet to transform XML output to HTML
--no-stylesheet: Prevent Nmap from associating XSL stylesheet w/XML output
MISC:
-6: Enable IPv6 scanning
-A: Enables OS detection and Version detection
--datadir <dirname>: Specify custom Nmap data file location
--send-eth/--send-ip: Send packets using raw ethernet frames or IP packets
--privileged: Assume that the user is fully privileged
-V: Print version number
-h: Print this help summary page.
EXAMPLES:
nmap -v -A scanme.nmap.org
nmap -v -sP 192.168.0.0/16 10.0.0.0/8
nmap -v -iR 10000 -P0 -p 80
中文翻译:
用法:nmap [扫描类型] [选项] {目标规范}
目标规格:
可以传递主机名、IP 地址、网络等。
例如:scanme.nmap.org、microsoft.com/24、192.168.0.1; 10.0-255.0-255.1-254
-iL <inputfilename>:来自主机/网络列表的输入
-iR <num hosts>:选择随机目标
--exclude <host1[,host2][,host3],...>:排除主机/网络
--excludefile <exclude_file>:从文件中排除列表
主机发现:
-sL:列表扫描 - 简单地列出要扫描的目标
-sP:Ping 扫描 - 只需确定主机是否在线
-P0:将所有主机视为在线——跳过主机发现
-PS/PA/PU [端口列表]:对给定端口进行 TCP SYN/ACK 或 UDP 发现探测
-PE/PP/PM:ICMP 回显、时间戳和网络掩码请求发现探测
-n/-R:从不做DNS解析/总是解析[默认:有时解析]
扫描技术:
-sS/sT/sA/sW/sM:TCP SYN/Connect()/ACK/Window/Maimon 扫描
-sN/sF/sX:TCP Null、FIN 和 Xmas 扫描
--scanflags <flags>:自定义 TCP 扫描标志
-sI <僵尸主机[:probeport]>:空闲扫描
-sO:IP协议扫描
-b <ftp 中继主机>:FTP 反弹扫描
端口规格和扫描顺序:
-p <端口范围>:只扫描指定的端口
例如:-p22; -p1-65535; -p U:53,111,137,T:21-25,80,139,8080
-F:快速 - 仅扫描 nmap-services 文件中列出的端口)
-r:连续扫描端口——不要随机化
服务/版本检测:
-sV:探测开放端口以确定服务/版本信息
--version-light:限制最可能的探测以更快地识别
--version-all:尝试每一个探针进行版本检测
--version-trace:显示详细的版本扫描活动(用于调试)
操作系统检测:
-O:启用操作系统检测
--osscan-limit:将操作系统检测限制为有希望的目标
--osscan-guess:更积极地猜测操作系统
时间和性能:
-T[0-6]:设置时序模板(越高越快)
--min-hostgroup/max-hostgroup <size>:并行主机扫描组大小
--min-parallelism/max-parallelism <numrobes>:探针并行化
--min-rtt-timeout/max-rtt-timeout/initial-rtt-timeout <msec>:指定
探测往返时间。
--host-timeout <msec>: 这么长时间后放弃目标
--scan-delay/--max-scan-delay <msec>:调整探针之间的延迟
防火墙/IDS 逃避和欺骗:
-F; --mtu <val>: 分片数据包(可选地 w/给定的 MTU)
-D <decoy1,decoy2[,ME],...>:使用诱饵隐藏扫描
-S <IP_Address>:欺骗源地址
-e <iface>:使用指定接口
-g/--source-port <portnum>:使用给定的端口号
--data-length <num>:将随机数据附加到发送的数据包中
--ttl <val>:设置 IP 生存时间字段
--spoof-mac <mac 地址、前缀或供应商名称>:欺骗您的 MAC 地址
输出:
-oN/-oX/-oS/-oG <file>:以正常、XML、s|<rIpt kIddi3、
和 Grepable 格式,分别为给定的文件名。
-oA <basename>:一次输出三种主要格式
-v:增加详细程度(使用两次以获得更多效果)
-d[level]:设置或提高调试级别(最多9个有意义)
--packet-trace:显示所有发送和接收的数据包
--iflist:打印主机接口和路由(用于调试)
--append-output:附加到而不是破坏指定的输出文件
--resume <文件名>:恢复中止的扫描
--stylesheet <path/URL>:将 XML 输出转换为 HTML 的 XSL 样式表
--no-stylesheet: 防止 Nmap 将 XSL 样式表与 XML 输出相关联
杂项:
-6:启用 IPv6 扫描
-A:启用操作系统检测和版本检测
--datadir <dirname>:指定自定义 Nmap 数据文件位置
--send-eth/--send-ip:使用原始以太网帧或 IP 数据包发送数据包
--privileged:假设用户拥有完全特权
-V:打印版本号
-h:打印此帮助摘要页。
例子:
nmap -v -A scanme.nmap.org
nmap -v -sP 192.168.0.0/16 10.0.0.0/8
nmap -v -iR 10000 -P0 -p 80