nmap作为一个十分强大的扫描工具,下面对它的所有参数进行分析解读。

root@kali:~# nmap -h
Nmap 7.91 ( https://nmap.org )
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.0-255.1-254
  -iL <inputfilename>: Input from list of hosts/networks #从已有的ip列文件中读取并扫描
  -iR <num hosts>: Choose random targets #随机选择目标进行扫描
  --exclude <host1[,host2][,host3],...>: Exclude hosts/networks #不扫描此ip,可写ip范围
  --excludefile <exclude_file>: Exclude list from file #可把不扫描的ip放进文件里
HOST DISCOVERY:
  -sL: List Scan - simply list targets to scan #列出要扫描的ip
  -sn: Ping Scan - disable port scan #不进行端口扫描
  -Pn: Treat all hosts as online -- skip host discovery #将所有主机都默认在线,跳过主机发现
  -PS/PA/PU/PY[portlist]: TCP SYN/ACK, UDP or SCTP discovery to given ports #使用TCP SYN/ACK,UDP或SCTP去发现端口
  -PE/PP/PM: ICMP echo, timestamp, and netmask request discovery probes #使用ICMP响应(echo)、时间戳或子网掩码请求来发现探测
  -PO[protocol list]: IP Protocol Ping #使用IP协议的ping
  -n/-R: Never do DNS resolution/Always resolve [default: sometimes] #不做dns解析/总是做dns反向解析
  --dns-servers <serv1[,serv2],...>: Specify custom DNS servers #指定自定义的dns服务器
  --system-dns: Use OS's DNS resolver #使用操作系统的dns
  --traceroute: Trace hop path to each host #追踪每台主机的跳转路径
SCAN TECHNIQUES:
  -sS/sT/sA/sW/sM: TCP SYN/Connect()/ACK/Window/Maimon scans #使用TCP SYN/Connect/ACK/Window/Maimon 扫描
  -sU: UDP Scan #UDP扫描
  -sN/sF/sX: TCP Null, FIN, and Xmas scans #使用TCP Null,FIN 和Xmas扫描
  --scanflags <flags>: Customize TCP scan flags #自定义TCP扫描的flags
  -sI <zombie host[:probeport]>: Idle scan #僵尸机扫描
  -sY/sZ: SCTP INIT/COOKIE-ECHO scans 使用SCTP协议的INIT/COOKIE-ECHO扫描
  -sO: IP protocol scan #进行IP协议扫描
  -b <FTP relay host>: FTP bounce scan #指定FTP中继主机进行FTP反弹扫描
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,S:9
  --exclude-ports <port ranges>: Exclude the specified ports from scanning #不对此端口进行扫描
  -F: Fast mode - Scan fewer ports than the default scan #快速模式,扫描比默认端口数量更少的端口
  -r: Scan ports consecutively - don't randomize #有序的扫描端口而不是随机地扫描
  --top-ports <number>: Scan <number> most common ports #扫描排名指定的数字前几位的最常用的端口
  --port-ratio <ratio>: Scan ports more common than <ratio> #扫瞄更常用的端口
SERVICE/VERSION DETECTION: #服务、版本探测
  -sV: Probe open ports to determine service/version info #扫描开启的端口来获取服务、版本信息
  --version-intensity <level>: Set from 0 (light) to 9 (try all probes) #设置探测服务、版本的强度
  --version-light: Limit to most likely probes (intensity 2)#强度为2的探测强度
  --version-all: Try every single probe (intensity 9) 强度为9的探测强度
  --version-trace: Show detailed version scan activity (for debugging) #将扫描的具体过程显示出来
SCRIPT SCAN: #脚本扫描
  -sC: equivalent to --script=default #等同于 --script=default
  --script=<Lua scripts>: <Lua scripts> is a comma separated list of
           directories, script-files or script-categories #指定使用lua脚本进行扫描
  --script-args=<n1=v1,[n2=v2,...]>: provide arguments to scripts #指定提供脚本的参数
  --script-args-file=filename: provide NSE script args in a file #指定提供脚本参数的文件
  --script-trace: Show all data sent and received #显示全部发送和收到的数据
  --script-updatedb: Update the script database. #更新脚本数据库
  --script-help=<Lua scripts>: Show help about scripts.
           <Lua scripts> is a comma-separated list of script-files or
           script-categories. #显示脚本的帮助信息
OS DETECTION: #系统探测
  -O: Enable OS detection #开始系统探测
  --osscan-limit: Limit OS detection to promising targets #限制系统探测的目标,如只探测linux系统
  --osscan-guess: Guess OS more aggressively #更侵略性的猜测系统
TIMING AND PERFORMANCE: #定时和性能
  Options which take <time> are in seconds, or append 'ms' (milliseconds),
  's' (seconds), 'm' (minutes), or 'h' (hours) to the value (e.g. 30m).
  -T<0-5>: 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 <time>: Specifies #指定最小、最大的扫描往返时间
      probe round trip time.
  --max-retries <tries>: Caps number of port scan probe retransmissions. #指定最大的重发扫描包的次数
  --host-timeout <time>: Give up on target after this long #指定超时时间
  --scan-delay/--max-scan-delay <time>: Adjust delay between probes #指定每次探测延迟多长时间,即两次探测之间间隔多少时间
  --min-rate <number>: Send packets no slower than <number> per second #最小的发包速率
  --max-rate <number>: Send packets no faster than <number> per second
FIREWALL/IDS EVASION AND SPOOFING: #防火墙、IDS绕过和欺骗
  -f; --mtu <val>: fragment packets (optionally w/given MTU) #设置MTU最大传输单元
  -D <decoy1,decoy2[,ME],...>: Cloak a scan with decoys #伪造多个IP地址和源地址一同发送包,从而隐藏在众多的IP地址中而不易被发现
  -S <IP_Address>: Spoof source address #伪造源地址
  -e <iface>: Use specified interface #使用指定的接口
  -g/--source-port <portnum>: Use given port number #使用指定的源端口
  --proxies <url1,[url2],...>: Relay connections through HTTP/SOCKS4 proxies #指定代理服务器进行扫描
  --data <hex string>: Append a custom payload to sent packets #在发送包的数据字段中追加自定义的十六进制字符串
  --data-string <string>: Append a custom ASCII string to sent packets #在发送包的数据字段中追加自定义的ASCII字符串
  --data-length <num>: Append random data to sent packets #在发送包的数据字段中追加随机的数据
  --ip-options <options>: Send packets with specified ip options #使用指定的IP选项发送包
  --ttl <val>: Set IP time-to-live field #设置TTL值
  --spoof-mac <mac address/prefix/vendor name>: Spoof your MAC address #伪造源mac地址
  --badsum: Send packets with a bogus TCP/UDP/SCTP checksum #发送伪造TCP/UDP/SCTP校验和Checksum的数据包
OUTPUT: #输出
  -oN/-oX/-oS/-oG <file>: Output scan in normal, XML, s|<rIpt kIddi3,
     and Grepable format, respectively, to the given filename. 
  -oA <basename>: Output in the three major formats at once #一次输出3个主要格式
  -v: Increase verbosity level (use -vv or more for greater effect) 增加更详细的级别输出
  -d: Increase debugging level (use -dd or more for greater effect) #增加debugging级别
  --reason: Display the reason a port is in a particular state #显示端口开放的原因
  --open: Only show open (or possibly open) ports #只显示开放的端口
  --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
  --webxml: Reference stylesheet from Nmap.Org for more portable XML
  --no-stylesheet: Prevent associating of XSL stylesheet w/XML output
MISC: #杂项
  -6: Enable IPv6 scanning #扫描IPv6的地址
  -A: Enable OS detection, version detection, script scanning, and traceroute #一次扫描包含系统探测、版本探测、脚本扫描和跟踪扫描
  --datadir <dirname>: Specify custom Nmap data file location #指定自定义的nmap数据文件位置
  --send-eth/--send-ip: Send using raw ethernet frames or IP packets #使用原始以太网帧或IP数据包发送
  --privileged: Assume that the user is fully privileged #假设用户有全部权限
  --unprivileged: Assume the user lacks raw socket privileges #假设用户缺少原始套接字权限
  -V: Print version number #输出版本号
  -h: Print this help summary page. #输出帮助信息
EXAMPLES:
  nmap -v -A scanme.nmap.org
  nmap -v -sn 192.168.0.0/16 10.0.0.0/8
  nmap -v -iR 10000 -Pn -p 80
SEE THE MAN PAGE (https://nmap.org/book/man.html) FOR MORE OPTIONS AND EXAMPLES
Categories: kali

0 Comments

发表评论

Avatar placeholder

邮箱地址不会被公开。 必填项已用*标注