Nmap参考指南(官方文档)
- 格式:doc
- 大小:183.00 KB
- 文档页数:30
Nmap中⽂⼿册主页:/译注该Nmap参考指南中⽂版由Fei Yang <>和Lei Li<> 从翻译⽽来。
我们希望这将使全世界使⽤中⽂的⼈们更了解Nmap,但我们不能保证该译本和官⽅的 英⽂版本⼀样完整,也不能保证同步更新。
它可以在下被修改并重新发布。
选项概要Usage: nmap [Scan Type(s)] [Options] {target specification}TARGET SPECIFICATION:Can pass hostnames, IP addresses, networks, etc.Ex: , /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 fileHOST 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 scanPORT SPECIFICATION AND SCAN ORDER:-p <port ranges>: Only scan specified portsEx: -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 randomizeSERVICE/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 aggressivelyTIMING AND PERFORMANCE:-T[0-6]: Set timing template (higher is faster)--min-hostgroup/max-hostgroup <msec>: Parallel host scan group sizes--min-parallelism/max-parallelism <msec>: Probe parallelization--min-rtt-timeout/max-rtt-timeout/initial-rtt-timeout <msec>: Specifiesprobe round trip time.--host-timeout <msec>: Give up on target after this long--scan-delay/--max-scan-delay <msec>: Adjust delay between probesFIREWALL/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 addressOUTPUT:-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 outputMISC:-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 nmap -v -sP 192.168.0.0/16 10.0.0.0/8nmap -v -iR 10000 -P0 -p 80⽬标说明除了选项,所有出现在Nmap命令⾏上的都被视为对⽬标主机的说明。
Nmap是一种网络端口扫描器,它可以扫描网络中的主机和服务,以帮助管理员发现网络中的安全漏洞和配置问题。
常见的nmap使用指南包括以下几个方面:
1. 扫描主机或网络:使用nmap 命令可扫描特定主机或整个网络中所有可访问的主机。
例如:nmap 19
2.168.1.1 或nmap 192.168.1.0/24。
2. 如何指定扫描的端口:默认情况下,nmap将扫描1000个最常见的TCP端口。
可以使用“-p”参数指定要扫描的端口。
例如:nmap -p 22,23,80 192.168.1.1 或nmap -p- 192.168.1.1。
3. 制定扫描范围:可以通过“-iL”参数指定要扫描的主机列表文件。
例如:nmap -iL /tmp/myhosts.txt。
4. 扫描速度指南:使用“-T”或“--timings”参数调整扫描速度。
-T参数具有0-5个级别,其中0为最慢,5为最快。
例如:nmap -T4 192.168.1.1。
5. 操作系统检测:使用“-O”参数指定尝试检测主机操作系统。
例如:nmap -O 192.168.1.1。
6. 输出格式:可以使用“-oN”、“-oX”或“-oG”参数指定输出格式。
例如:nmap -oN /tmp/output.txt 192.168.1.1 将结果输出到文本文件中。
7. 扫描脚本:nmap还附带了许多脚本,可在扫描期间执行,并查找主机的漏洞和问题。
例如:nmap --script vuln 192.168.1.1。
Nmap使用指南Nmap使用指南Nmap(Network Mapper)是一款免费且开源的网络探测和安全扫描工具。
它通常用于网络发现、端口扫描和服务识别,可以帮助管理员评估网络的安全性。
本文档将提供关于Nmap的详细使用指南,并介绍其不同功能的具体操作方法。
一、安装Nmap1、系统要求- Windows:从Nmap官方网站并安装适用于Windows的二进制安装程序。
- Linux:使用包管理器(如apt、yum)安装Nmap。
- macOS:使用Homebrew或MacPorts进行安装。
2、验证安装- 打开终端或命令提示符。
- 运行命令 nmap -v,检查是否显示Nmap的版本信息。
二、Nmap基本用法1、扫描单个主机- 运行命令 nmap <目标IP地质>,替换<目标IP地质>为要扫描的主机的实际IP地质。
2、扫描多个主机- 运行命令 nmap <目标1> <目标2> :::,替换<目标1>、<目标2>等为要扫描的主机的实际IP地质。
3、扫描整个子网- 运行命令 nmap <目标IP地质/子网掩码>,例如 nmap 192.168:0:0/24:4、扫描指定端口范围- 运行命令 nmap -p <起始端口>-<结束端口> <目标IP地质>,替换<起始端口>和<结束端口>为要扫描的端口范围。
5、扫描常见端口- 运行命令 nmap -F <目标IP地质>,这将扫描一组常用的端口。
6、获取详细报告- 运行命令 nmap -v -A <目标IP地质>,使用选项-A可以获取主机操作系统和版本的信息。
三、Nmap高级用法1、OS侦测- 运行命令 nmap -O <目标IP地质>,使用选项-O可以尝试识别目标主机的操作系统。
2、指定扫描脚本- 运行命令 nmap --script <脚本名称> <目标IP地质>,替换<脚本名称>为要使用的扫描脚本的名称。
nmap操作手册摘要:1.nmap 简介2.nmap 基本语法3.nmap 常用扫描技术4.nmap 扫描结果分析5.nmap 高级功能与应用6.nmap 使用案例正文:map(Network Mapper)是一款用于网络探测和安全审计的常用工具,其功能强大,可以探测目标主机的开放端口、运行服务、操作系统和版本等信息。
通过使用nmap,网络安全管理员和渗透测试人员能够快速评估目标系统的安全状况,为后续的安全工作提供有力支持。
一、nmap 基本语法map 的命令格式为:nmap [选项] 目标IP 或域名常用的选项包括:- -p:指定扫描的端口范围- -sS:进行TCP SYN 扫描,常用于探测防火墙规则- -sC:进行TCP 连接扫描,用于检测被动的防火墙- -sV:进行版本扫描,识别目标系统运行的服务和版本信息- -O:输出目标系统的操作系统信息- -A:输出目标系统的所有信息,包括操作系统、服务、开放端口等二、nmap 常用扫描技术1.TCP SYN 扫描:通过发送TCP SYN 包探测目标端口是否开放。
如果目标端口开放,则返回SYN/ACK 包。
2.TCP 连接扫描:通过建立完整的TCP 连接来检测目标端口是否开放。
此方法容易被防火墙发现。
3.UDP 扫描:通过发送UDP 数据包来探测UDP 端口是否开放。
由于UDP 是无连接的,所以扫描速度较快。
4.其他扫描技术还包括:ICMP 扫描、ACK 扫描、窗口扫描等。
三、nmap 扫描结果分析map 扫描结果包括以下几个方面:1.目标系统的IP 地址、主机名和操作系统信息。
2.目标系统开放的端口及其对应的服务。
3.目标系统运行的服务版本和编译信息。
4.目标系统的一些其他信息,如默认的主页、开放的文件共享等。
四、nmap 高级功能与应用1.脚本扫描:nmap 支持使用脚本对目标系统进行更深入的探测,如获取用户密码、探测漏洞等。
2.代理扫描:nmap 支持通过代理服务器进行扫描,以隐藏自己的真实IP 地址。
Nmap网络扫描使用手册2008-10-13 21:16Nmap 最初被开发用于允许系统管理员察看一个大的网络系统有哪些主机以及其上运行何种服务,通过TCP/IP来甄别操作系统类型、秘密扫描、动态延迟和重发、平行扫描、通过并行的Ping侦测下属的主机、欺骗扫描、端口过滤探测、直接的RPC扫描、分布扫描、灵活的目标选择以及端口的描述。
可是,Nmapd始作者没有料到,它的这些扫描功能会成为黑客入侵的手段。
通过使用Nmap扫描器扫描网络,寻找存在漏洞的目标主机。
一旦发现了有漏洞的目标,接下来就是对监听端口的扫描。
Nmap通过使用TCP协议栈指纹准确地判断出被扫主机的操作系统类型。
本文全方位地介绍Nmap的使用方法,目的是让安全管理员了解在黑客眼中的站点,通过使用它,安全管理员可以发现自己网站的漏洞,并逐步完善自己的系统。
严禁一切非法途径的使用,否则后果自负。
在介绍使用之前先来介绍安装的方法,为了安装Nmap,需要gzip,cc,make 等相应工具,这里不讲了,管理员可以从相应站点取得。
Nmap的源文件可以在/nmap得到,目前最新的版本为2.53,将它下载以后,解压,如gzip -d nmap-VERSION.tgz | tar xvf -,然后进入Nmap目录,cd nmap-VERSION。
依次./configure,make,make install 即可。
在Nmap当前目录我们就可以看到可执行的Nmap文件。
剩下的工作就是选定目标,开始扫描啦!在目标机上,Nmap运行灵活。
使用Nmap进行单机扫描或是整个网络的扫描很简单,只要将带有“/mask”的目标地址指定给Nmap即可。
地址是“victim/24”,则目标是c类网络,地址是“victim/16”,则目标是B类网络。
另外,Nmap允许你使用各类指定的网络地址,比如 192.168.7.*,是指192.168.7.0/24, 或 192.168.7.1,4,8-12,对所选子网下的主机进行扫描。
nmap操作手册摘要:一、nmap简介1.nmap的发展历程2.nmap的功能与用途二、nmap基本操作1.安装与配置nmap2.nmap的使用方法a.基本扫描b.高级扫描c.操作系统检测d.服务和应用程序检测e.脚本扫描f.扫描结果的图形化展示三、nmap高级功能1.操作系统插件2.服务和应用程序插件3.脚本插件4.扫描目标与扫描限制5.扫描结果的分析和处理四、nmap的安全应用1.漏洞扫描与修复2.网络拓扑发现3.网络设备管理4.入侵检测与防御五、nmap的社区与更新1.nmap社区2.nmap更新与升级正文:map操作手册map是一款功能强大的网络探测和安全审计工具,自1998年诞生以来,已经历多个版本的更新与优化。
它被广泛应用于网络设备管理、安全漏洞扫描、网络拓扑发现、入侵检测等领域。
本文将详细介绍nmap的使用方法、高级功能及其在安全领域的应用。
一、nmap简介map的发展历程见证了网络安全技术的不断演进。
从最初的一个简单的网络探测工具,到如今拥有丰富功能的安全审计平台,nmap已经成为网络和安全工程师的得力助手。
map的主要功能和用途包括:1.网络探测:扫描目标IP地址,获取主机名、开放端口、操作系统等信息。
2.安全审计:检测网络中的安全漏洞,帮助用户及时发现并修复潜在的安全风险。
3.网络拓扑发现:扫描整个网络,绘制网络拓扑图,便于设备管理和故障排查。
4.入侵检测与防御:实时监控网络活动,发现异常行为,提高网络安全防护能力。
二、nmap基本操作要使用nmap,首先需要在操作系统上安装相应的软件包。
安装完成后,可以通过命令行或脚本方式启动nmap。
map的使用方法包括:1.基本扫描:使用“-sS”或“-sV”选项进行TCP或UDP端口扫描,获取目标主机的开放端口和操作系统信息。
2.高级扫描:使用“-A”选项进行高级扫描,包括TCP SYN扫描、操作系统检测、服务和应用程序检测等。
3.操作系统检测:使用“-O”选项,仅检测目标主机的操作系统信息。
端口扫描技术/xiaojiwen整理 2012-4-10作为一个修车新手,我可能折腾几个小时来摸索怎样把基本工具(锤子,胶带,扳子等) 用于手头的任务。
当我惨痛地失败,把我的老爷车拖到一个真正的技师那儿的时候,他总是在他的工具箱里翻来翻去,直到拽出一个完美的工具然后似乎不费吹灰之力搞定它。
端口扫描的艺术和这个类似。
专家理解成打的扫描技术,选择最适合的一种 (或者组合)来完成给定的任务。
另一方面,没有经验的用户和刚入门者总是用默认的SYN扫描解决每个问题。
既然Nmap是免费的,掌握端口扫描的唯一障碍就是知识。
这当然是汽车世界所不能比的,在那里,可能需要高超的技巧才能确定您需要一个压杆弹簧压缩机,接着您还得为它付数千美金。
大部分扫描类型只对特权用户可用。
这是因为他们发送接收原始报文,这在Unix 系统需要root权限。
在Windows上推荐使用administrator账户,但是当WinPcap 已经被加载到操作系统时,非特权用户也可以正常使用Nmap。
当Namp在1997年发布时,需要root权限是一个严重的局限,因为很多用户只有共享的shell 账户。
现在,世界变了,计算机便宜了,更多人拥有互联网连接,桌面UNIX系统 (包括Linux和MAC OS X)很普遍了。
Windows版本的Nmap现在也有了,这使它可以运行在更多的桌面上。
由于所有这些原因,用户不再需要用有限的共享shell账户运行Nmap。
这是很幸运的,因为特权选项让Nmap强大得多也灵活得多。
虽然Nmap努力产生正确的结果,但请记住所有结果都是基于目标机器(或者它们前面的防火墙)返回的报文的。
这些主机也许是不值得信任的,它们可能响应以迷惑或误导Nmap的报文。
更普遍的是非RFC兼容的主机以不正确的方式响应Nmap探测。
FIN,Null和Xmas扫描特别容易遇到这个问题。
这些是特定扫描类型的问题,因此我们在个别扫描类型里讨论它们。
这一节讨论Nmap支持的大约十几种扫描技术。
Nmap网络发现与安全扫描第一章:介绍NmapNmap(网络映射器)是一款开源的网络发现和安全扫描工具,被广泛用于网络管理员、安全专家和渗透测试人员之间。
它可以帮助用户了解网络中的主机和服务,并评估它们的安全性。
Nmap具有强大的功能和灵活的配置选项,使其成为一个受欢迎的工具。
第二章:Nmap基础2.1 基本原理:Nmap通过发送和解析网络数据包来工作。
它使用不同类型的扫描技术,如TCP SYN扫描,TCP Connect扫描和UDP扫描,以识别目标主机上开放的端口和服务。
这些信息可以帮助管理员识别网络中潜在的安全漏洞。
2.2 安装与配置:Nmap可以在多个平台上使用,并且具有丰富的配置选项。
管理员可以根据需要定制扫描规则、目标范围和扫描模式等。
对于初学者,可以使用默认配置进行快速扫描,而专业用户则可以根据自己的需要进行高级配置。
第三章:Nmap扫描技术3.1 主机发现:Nmap可以通过发送ICMP Echo请求、ARP请求和主机列表扫描等方式来发现网络中的主机。
这些方法可以有效地识别网络上存活的主机,帮助管理员建立起网络拓扑图。
3.2 端口扫描:Nmap的一个关键功能是端口扫描,它可以通过不同的扫描技术来确定目标主机上开放的端口和正在运行的服务。
常用的扫描类型包括TCP SYN扫描、TCP Connect扫描和UDP扫描等,管理员可以根据需要选择适当的扫描技术。
3.3 操作系统识别:Nmap可以通过分析目标主机的响应特征来识别其操作系统类型。
这可以帮助管理员确保网络中的主机都是受信任的,并寻找存在的安全风险。
第四章:Nmap高级功能4.1 脚本扫描:Nmap的脚本扫描功能可以自动化执行一系列任务,如漏洞检测、服务探测和版本探测等。
管理员可以使用内置的脚本库,也可以编写自定义脚本来满足特定需求。
4.2 输出格式:Nmap可以生成多种输出格式,如文本、XML和HTML等,方便管理员进行结果分析和报告撰写。
Nmap参考指南描述译注选项概要目标说明主机发现端口扫描基础端口扫描技术端口说明和扫描顺序服务和版本探测操作系统探测时间和性能防火墙/IDS躲避和哄骗输出其它选项运行时的交互实例Bugs作者法律事项(版权、许可证、担保(缺)、出口限制)Unofficial Translation Disclaimer/非官方翻译声明Namenmap —网络探测工具和安全/端口扫描器Synopsisnmap [ <扫描类型> ...] [ <选项> ] { <扫描目标说明> }描述Nmap(“Network Mapper(网络映射器)”)是一款开放源代码的网络探测和安全审核的工具。
它的设计目标是快速地扫描大型网络,当然用它扫描单个主机也没有问题。
Nmap以新颖的方式使用原始IP报文来发现网络上有哪些主机,那些主机提供什么服务(应用程序名和版本),那些服务运行在什么操作系统(包括版本信息),它们使用什么类型的报文过滤器/防火墙,以及一堆其它功能。
虽然Nmap通常用于安全审核,许多系统管理员和网络管理员也用它来做一些日常的工作,比如查看整个网络的信息,管理服务升级计划,以及监视主机和服务的运行。
Nmap输出的是扫描目标的列表,以及每个目标的补充信息,至于是哪些信息则依赖于所使用的选项。
“所感兴趣的端口表格”是其中的关键。
那张表列出端口号,协议,服务名称和状态。
状态可能是open(开放的),filtered(被过滤的),closed(关闭的),或者unfiltered(未被过滤的)。
Open(开放的)意味着目标机器上的应用程序正在该端口监听连接/报文。
filtered(被过滤的) 意味着防火墙,过滤器或者其它网络障碍阻止了该端口被访问,Nmap无法得知它是open(开放的) 还是closed(关闭的)。
closed(关闭的) 端口没有应用程序在它上面监听,但是他们随时可能开放。
当端口对Nmap的探测做出响应,但是Nmap无法确定它们是关闭还是开放时,这些端口就被认为是unfiltered(未被过滤的)如果Nmap报告状态组合open|filtered和closed|filtered时,那说明Nmap无法确定该端口处于两个状态中的哪一个状态。
当要求进行版本探测时,端口表也可以包含软件的版本信息。
当要求进行IP协议扫描时(-sO),Nmap提供关于所支持的IP协议而不是正在监听的端口的信息。
除了所感兴趣的端口表,Nmap还能提供关于目标机的进一步信息,包括反向域名,操作系统猜测,设备类型,和MAC地址。
一个典型的Nmap扫描如Example 1, “一个典型的Nmap扫描”所示。
在这个例子中,唯一的选项是-A,用来进行操作系统及其版本的探测,-T4可以加快执行速度,接着是两个目标主机名。
Example 1.一个典型的Nmap扫描# nmap -A -T4 playgroundStarting nmap ( /nmap/ )Interesting ports on (205.217.153.62):(The 1663 ports scanned but not shown below are in state: filtered)port STATE SERVICE VERSION22/tcp open ssh OpenSSH 3.9p1 (protocol 1.99)53/tcp open domain70/tcp closed gopher80/tcp open http Apache httpd 2.0.52 ((Fedora))113/tcp closed authDevice type: general purposeRunning: Linux 2.4.X|2.5.X|2.6.XOS details: Linux 2.4.7 - 2.6.11,Linux 2.6.0 - 2.6.11Uptime 33。
908 days (since Thu Jul 21 03:38:03 2005)Interesting ports on playground。
nmap。
或者g (192.168.0.40):(The 1659 ports scanned but not shown below are in state: closed)port STATE SERVICE VERSION135/tcp open msrpc Microsoft Windows RPC139/tcp open netbios-ssn389/tcp open ldap?445/tcp open microsoft-ds Microsoft Windows XP microsoft-ds1002/tcp open windows-icfw?1025/tcp open msrpc Microsoft Windows RPC1720/tcp open H.323/Q.931 CompTek AquaGateKeeper5800/tcp open vnc-http RealVNC 4.0 (Resolution 400x250; VNC TCP port: 5900)5900/tcp open vnc VNC (protocol 3.8)MAC Address: 00:A0:CC:63:85:4B (Lite-on Communications)Device type: general purposeRunning: Microsoft Windows NT/2K/XPOS details: Microsoft Windows XP Pro RC1+ through final releaseService Info: OSs: Windows,Windows XPNmap finished: 2 IP addresses (2 hosts up) scanned in 88.392 seconds译注该Nmap参考指南中文版由Fei Yang<fyang1024@>和Lei Li<lilei_721@>从英文版本翻译而来。
我们希望这将使全世界使用中文的人们更了解Nmap,但我们不能保证该译本和官方的英文版本一样完整,也不能保证同步更新。
它可以在Creative Commons Attribution License下被修改并重新发布。
选项概要当Nmap不带选项运行时,该选项概要会被输出,最新的版本在这里/nmap/data/age.txt。
它帮助人们记住最常用的选项,但不能替代本手册其余深入的文档,一些晦涩的选项甚至不在这里。
Nmap 6.47SVN ( )Usage: nmap [Scan Type(s)] [Options] {target specification}TARGET SPECIFICATION:Can pass hostnames, IP addresses, networks, etc.Ex: , /24, 192.168.0.1; 10.0.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 fileHOST DISCOVERY:-sL: List Scan - simply list targets to scan-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-PE/PP/PM: ICMP echo, timestamp, and netmask request discovery probes-PO[protocol list]: IP Protocol Ping-n/-R: Never do DNS resolution/Always resolve [default: sometimes]--dns-servers <serv1[,serv2],...>: Specify custom DNS servers--system-dns: Use OS's DNS resolver--traceroute: Trace hop path to each hostSCAN TECHNIQUES:-sS/sT/sA/sW/sM: TCP SYN/Connect()/ACK/Window/Maimon scans-sU: UDP Scan-sN/sF/sX: TCP Null, FIN, and Xmas scans--scanflags <flags>: Customize TCP scan flags-sI <zombie host[:probeport]>: Idle scan-sY/sZ: SCTP INIT/COOKIE-ECHO scans-sO: IP protocol scan-b <FTP relay host>: FTP bounce scanPORT SPECIFICATION AND SCAN ORDER:-p <port ranges>: Only scan specified portsEx: -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)--version-all: Try every single probe (intensity 9)--version-trace: Show detailed version scan activity (for debugging)SCRIPT SCAN:-sC: equivalent to --script=default--script=<Lua scripts>: <Lua scripts> is a comma separated list ofdirectories, script-files or script-categories--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 orscript-categories.OS DETECTION:-O: Enable OS detection--osscan-limit: Limit OS detection to promising targets--osscan-guess: Guess OS more aggressivelyTIMING 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>: Specifiesprobe 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:-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--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--data-length <num>: Append random data to sent packets--ip-options <options>: Send packets with specified ip options--ttl <val>: Set IP time-to-live field--spoof-mac <mac address/prefix/vendor name>: Spoof your MAC address--badsum: Send packets with a bogus TCP/UDP/SCTP checksumOUTPUT:-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-v: Increase verbosity level (use -vv or more for greater effect)-d: Increase debugging level (use -dd or more for greater effect)--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)--log-errors: Log errors/warnings to the normal-format output file--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 for more portable XML--no-stylesheet: Prevent associating of XSL stylesheet w/XML output MISC:-6: Enable IPv6 scanning-A: Enable OS detection, version detection, script scanning, and traceroute--datadir <dirname>: Specify custom Nmap data file location--send-eth/--send-ip: Send using raw ethernet frames or IP packets--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 nmap -v -sn 192.168.0.0/16 10.0.0.0/8nmap -v -iR 10000 -Pn -p 80目标说明除了选项,所有出现在Nmap命令行上的都被视为对目标主机的说明。