7.6. 嗅探工具¶
7.6.1. Nmap¶
nmap [<扫描类型>...] [<选项>] {<扫描目标说明>}
7.6.1.1. 指定目标¶
- CIDR风格
192.168.1.0/24 - 逗号分割
www.baidu.com,www.zhihu.com - 分割线
10.22-25.43.32 - 来自文件
-iL <inputfile> - 排除不需要的host
--exclude <host1 [, host2] [, host3] ... >--excludefile <excludefile>
7.6.1.2. 主机发现¶
-sLList Scan - simply list targets to scan-sn/-sPPing Scan - disable port scan-PnTreat all hosts as online – skip host discovery-sS/sT/sA/sW/sMTCP SYN/Connect()/ACK/Window/Maimon scans-sUUDP Scan-sN/sF/sXTCP Null, FIN, and Xmas scans
7.6.1.3. 端口扫描¶
--scanflags定制的TCP扫描-P0无pingPS [port list](TCP SYN ping) // need root on UnixPA [port list](TCP ACK ping)PU [port list](UDP ping)PR (Arp ping)p <port message>F快速扫描r不使用随机顺序扫描
7.6.1.4. 服务和版本探测¶
-sV版本探测--allports不为版本探测排除任何端口--version-intensity <intensity>设置 版本扫描强度--version-light打开轻量级模式 // 级别2--version-all尝试每个探测 // 级别9--version-trace跟踪版本扫描活动-sR RPC扫描
7.6.1.5. 操作系统扫描¶
-O启用操作系统检测--osscan-limit针对指定的目标进行操作系统检测--osscan-guess--fuzzy推测操作系统检测结果
7.6.1.6. 时间和性能¶
- 调整并行扫描组的大小
--min-hostgroup<milliseconds>--max-hostgroup<milliseconds>
- 调整探测报文的并行度
--min-parallelism<milliseconds>--max-parallelism<milliseconds>
- 调整探测报文超时
--min_rtt_timeout <milliseconds>--max-rtt-timeout <milliseconds>--initial-rtt-timeout <milliseconds>
- 放弃低速目标主机
--host-timeout<milliseconds>
- 调整探测报文的时间间隔
--scan-delay<milliseconds>--max_scan-delay<milliseconds>
- 设置时间模板
-T <Paranoid|Sneaky|Polite|Normal|Aggressive|Insane>
7.6.1.7. 逃避检测相关¶
-f报文分段--mtu使用指定的MTU-D<decoy1[, decoy2][, ME], ...>使用诱饵隐蔽扫描-S<IP_Address>源地址哄骗-e <interface>使用指定的接口--source-port<portnumber>;-g<portnumber>源端口哄骗--data-length<number>发送报文时 附加随机数据--ttl <value>设置ttl--randomize-hosts对目标主机的顺序随机排列--spoof-mac<macaddress, prefix, orvendorname>MAC地址哄骗
7.6.1.8. 输出¶
-oN<filespec>标准输出-oX<filespec>XML输出-oS<filespec>ScRipTKIdd|3oUTpuT-oG<filespec>Grep输出-oA<basename>输出至所有格式
7.6.1.9. 细节和调试¶
-v信息详细程度-d [level]debug level--packet-trace跟踪发送和接收的报文--iflist列举接口和路由