Namp-Manpage2(转的)

发表于:2007-06-09来源:作者:点击数: 标签:
/*************************************************** /*Nmap-Manpage /* /*作者:Fyodor /* /*翻译:quack /* /*时间:2002-2-6 /************************************************** 定时选项 --------* 虽然nmap在一般情况下都能够很好地在运行时间里尽
/***************************************************

/*Nmap-Manpage

/*

/*作者:Fyodor

/*

/*翻译:quack

/*

/*时间:2002-2-6

/**************************************************

 

定时选项
--------*

虽然nmap在一般情况下都能够很好地在运行时间里尽可能迅速地完成扫描任务,但偶尔还是会有一些主机/
端口无法侦测,这可能是nmap默认的时间策略和你的目标不太一致(相当于timeout的设定),下面就是一
些选项能对扫描的时间进行控制:

-T <Paranoid|Sneaky|Polite|Normal|Aggressive|Insane>
这是一个可以用来便利地表达nmap时间策略优先权的参数设置。Paranoid模式用极慢的速度来扫描以避免
被数字记录系统记录。它使扫描连续而不是并发而且通常等待至少五分钟才发送一个信息包。Sneaky也是
类似的,只是它是每15秒发送一个信息包。Polite模式是用来减轻网络负载以减少当机的可能性,它是连
续发送探针并在两个包的间隙等待0.4秒。Normal是nmap的常规用法,是尽其所能地快速扫描——除非主机或
端口连接丢失。Aggressive模式是对每台主机设定了五分钟的timeout,并且等待每个探针应答不超过1.25
秒。Insane模式是适应非常快的网络或者你不在乎丢失一些信息——因为太快!它的timeout设定于75秒并且
只等待回应0.3秒,它允许对一个很快的网络系统进行“扫荡”:),你也可以用数字(0-5)来代表参数,比如'
-t 0'表示Paranoid而'-t 5'代表Insane模式。注意,这些时间设定无法在底层的控制中联合使用。(NOT
be used in combination with the lower level controls given below.)

--host_timeout <milliseconds>
具体指定nmap对某个IP的扫描时间总量,超过则作不通处理,默认是不做设定。

--max_rtt_timeout <milliseconds>
指定nmap对一个探针从远程端返回回应的最大时间,默认是9000。

--initial_rtt_timeout <milliseconds>
指定最初探针的timeout时间,这通常在用-P0扫描有防火墙保护的主机时很有效,nmap会通过ping得到一
个好的RTT评估以及最初少数的探针。默认值为6000。

--max_parallelism <number>
指定nmap允许的最大并行扫描数目,设定为1表明nmap每次只扫描个端口,它同样会对其它扫描如ping
sweep, RPC scan等产生影响。

--scan_delay <milliseconds>
指定nmap必须等待的两个探针间的最小的时间。这是减少网络负载及使扫描在综合数据存储的记录下不那
么显眼的办法。

目标说明
--------*

所有不带参数的选项都会被视为是nmap的目标主机描述。最简单的实例是仅仅在命令行列出单一的主机名
或IP地址。如果你希望扫描一个IP地址的子网,你可以在主机名和IP地址中加入'/mask'。mask必需是在0
(扫描整个网络)和32(特定的单一主机)。用/24则表明扫找一个C类地址,而/16则是扫描B类
……

nmap还有一些更有用的符号说明方式可以让你用list/ranges来为每个元素指定IP地址。比如你要扫描B类
网址128.210.*.*,则可以用'128.210.*.*'或'128.210.0-255.0-255'或者甚至是'128.210.1-50,51-
255.1,2,3,4,5-255'来表示。当然你也可以用上面提过的mask来表示:'128.210.0.0/16'。所有这些都是等
价的,当你用'*'的时候记住多数的shell都要求用定界符比如引号将其标注。

另一个有趣的是你可以用其它方法将整个网络“分割”,比如你可以用'*.*.5.6-7'来扫描所有以.5.6或
.5.7结束的IP地址。要得到更多信息,你可以看看示例节。

扫描范例
--------*

这里是一些运用nmap的扫描范例,从最简单普通的到有一些复杂的例子都有。注意这里有真实的数字以及
一些真实的域名——这样可以让扫描行为看起来更具体。在这里你可以用自己的网络里的名称代替其中的
addresses/names。虽然端口扫描的结果分析可能会使某些人容易攻击,但我不认为它是不合法的,我曾经
扫描过成百上千的机器但只收到一次抱怨。但我不是律师而一些(anal)人们对nmap探测觉得烦恼,所以最
好在取得允许后扫描或者——冒险,后果由你自己承担。

nmap -v target.example.com

这样对target.example.com上所有的保留TCP端口做了一次扫描,-v表示用详细模式。

nmap -sS -O target.example.com/24

这将开始一次SYN的半开扫描,针对的目标是target.example.com所在的C类子网,它还试图确定在其上运
行的是什么系统。这需要root权限,因为用到了半开扫描以及系统侦测。

nmap -sX -p 22,53,110,143,4564 128.210.*.1-127

发送一个Xmas tree扫描到B类128.210所在子网的一半范围内,我们将检测系统是否运行sshd, DNS,
pop3d, imapd, 或者端口4564。要注意由于微软TCP堆栈的不完善,Xmas扫描将不能在其平台上运行成功,
同样的问题可能存在于CISCO, IRIX, HP/UX, 和BSDI。

nmap -v -p 80 '*.*.2.3-5'

这是定位一个网域(将整个网络分隔成许多小部份)再进行扫描的方式,这里扫描的是所有以.2.3,.2.4,
或.2.5结束的IP地址。如果你是ROOT的话也可以用-sS。同样的你可以从127开始搜寻更多有趣的机器,你
可以用'127-222'替代前面的星号——恕我直言,那个区域有着大量有趣的机器。

host -l company.com | cut '-d ' -f 4 | ./nmap -v -i -

做一个DNS zone transfer来寻找在company.com进而的主机并且将IP地址送至nmap(feed the IP
addresses to nmap)。这个命令是在我的GNU/Linux平台下运行的,你可能需要用不同的选项参数或者不同
的操作系统。


臭虫
----*
臭虫?有什么臭虫?如果你找到了,请告诉我,修订版将会更完善:),记住要连同OS的“指印”一起给我,
这样我才能有足够的数据进行修改……

作者
----*

Fyodor <fyodor@dhp.com>

发放
----*

最新版本的nmap可以从以下URL获得(以下为版权信息)

http://www.insecure.org/nmap/

nmap is (C) 1997,1998,1999 by Fyodor (fyodor@dhp.com, fyodor@insecure.org)

libpcap is also distributed along with nmap. It is copy-righted by Van Jacobson, Craig Leres
and Steven McCanne,all of the Lawrence Berkeley National Laboratory, University of
California, Berkeley, CA.The Version distributed with nmap may be modified,pristine sources
are available from ftp://ftp.ee.lbl.gov/libpcap.tar.Z .

This program is free software; you can redistribute it and/or modify it under the terms of
the GNU General Public License as published by the Free Software Foundation; Version 2. This
guarantees your right to use, modify, and redistribute Nmap under certain conditions. If this
license is unacceptable to you, Insecure.Org may be willing to sell alternative licenses
(contact fyodor@dhp.com).

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
the GNU General Public License for more details (it is in the COPYING file of the nmap
distribution).

It should also be noted that Nmap has been known to crash certain poorly written
applications, TCP/IP stacks, and even operating systems. Nmap should never be run against
mission critical systems unless you are prepared to suffer downtime. We acknowledge here that
Nmap may crash your systems or.networks and we disclaim all liability for any damage or
problems Nmap could cause.

All versions of Nmap equal to or greater than 2.0 are believed (through informal testing) to
be Year 2000 (Y2K) compliant in all respects. That being said, we reiterate that Nmap comes
with no warranty. There is no reason to believe versions earlier than 2.0 are susceptible to
problems, but we have not tested them.


附:

nmap的运行平台
--------------*

可移植性
NMAP发展于LINUX下,但现在可以在许多平台上运行。这得感谢Lamont Granquist
<lamontg@u.washington.edu>他为NMAP自动控制台运行于许多我无法存取的平台做出了巨大的帮助。下面
是支持NAMP运行的系统的简表:

OS Compiles TCP scan (-sT) SYN scan (-sS) FIN scan (-sF) Frag scan (-f) OS Detection (-O)
Linux Yes! Yes! Yes! Yes! Yes! Yes!
FreeBSD Yes! Yes! Yes! Yes! Yes! Yes!
OpenBSD Yes! Yes! Yes! Yes! Yes! Yes!
NetBSD Yes! Yes! Yes! Yes! Yes! Yes!
Solaris 2.4-7 Yes! Yes! Yes! Yes! No :( Yes!
SunOS4.1.4 w/gcc Yes! Yes! Yes! Yes! No :( Yes!
IRIX 5.3-6.4 Yes! Yes! Yes! Yes! No :( Yes!
HP/UX 10.20 Yes! Yes! Yes! Yes! Yes! Unknown
BSDI 2.1 and up Yes! Yes! Yes! Yes! Unknown Yes!
AIX(use cc,not gcc) Yes! Yes! No :( No :( No :( No :(
Digital UNIX/Alpha Yes! Yes! POSSIBLE KERNEL PANIC!
Cray UNICOS 10.0 Yes! Yes! No :( No :( No :( No :(

 

/**************Translate by quack*****************/

这是Nmap-Manpage的第二部分

原文转自:http://www.ltesting.net