📄 1093.html
字号:
</tr></tbody>
</table>
</form>
</TD>
<TD rowSpan=2><IMG src="images/header_r1_c7.gif" tppabs="http://www.linuxhero.com/docs/images/header_r1_c7.gif" width=26 border=0 name=header_r1_c7></TD>
<TD><IMG height=83 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=1 border=0></TD></TR>
<TR>
<TD background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif"><IMG height=22
src="images/header_r2_c1.gif" tppabs="http://www.linuxhero.com/docs/images/header_r2_c1.gif" width=296 border=0
name=header_r2_c1></TD>
<TD background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif" colSpan=5>
<DIV align=right><FONT class=normalfont>当前位置:
<A href="index.html" tppabs="http://www.linuxhero.com/docs/index.html">本站首页</A>
<font color="#FF6699">>></font>
<A href="type15.html" tppabs="http://www.linuxhero.com/docs/type15.html">网络安全</A> | <A href="copyright.html" tppabs="http://www.linuxhero.com/docs/copyright.html">版权说明</A></font></DIV>
</TD>
<TD><IMG height=22 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=1
border=0></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=10 cellPadding=0 width="100%" bgColor=#ffffff
border=0>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=3 width="100%" border=0>
<TR>
<TD vAlign=top align=middle width="60%">
<TABLE cellSpacing=0 cellPadding=0 width="100%"
background="images/back.gif" tppabs="http://www.linuxhero.com/docs/images/back.gif" border=0>
<TBODY>
<TR>
<TD vAlign=top width="80%">
<DIV align=center>
<FORM action="search.html" tppabs="http://www.linuxhero.com/docs/search.html" method=get>
</FORM>
<TABLE cellSpacing=0 cellPadding=0 width="95%"
border=0><TBODY>
<TR>
<TD background="images/bgi.gif" tppabs="http://www.linuxhero.com/docs/images/bgi.gif"
height=30></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=3 width="95%"
align=center border=0>
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=3 width="100%"
border=0>
<TBODY>
<TR>
<TD vAlign=top>
<p><FONT class=normalfont><B><font color=blue>linux下的网络扫描利器</font></B></FONT><BR><FONT class=smallfont color=#ff9900>2004-04-23 15:18 pm</FONT><BR><FONT class=normalfont>作者:作者<br>来自:Linux知识宝库<br>联系方式:无名<br><br> 摘要:<br>
NMap是linux下的网络扫描和嗅探工具包。可以帮助网管人员深入探测UDP或者TCP端口,直至主机所使用的操作系统;还可以将所有 探测结果记录到各种格式的日志中,为系统安全服务。 <br>
正文: <br>
NMap,也就是Network Mapper,是linux下的网络扫描和嗅探工具包,其基本功能有三个,一是探测一组主机是否在线;其次是扫描 主机端口,嗅探所提供的网络服务;还可以推断主机所用的操作系统 。Nmap可用于扫描仅有两个节点的LAN,直至500个节点以上的网络。Nmap 还允许用户定制扫描技巧。通常,一个简单的使用ICMP协议的ping操 作可以满足一般需求;也可以深入探测UDP或者TCP端口,直至主机所 使用的操作系统;还可以将所有探测结果记录到各种格式的日志中, 供进一步分析操作。<br>
一、如何获得并安装Nmap <br>
一些linux的发行版本提供对nmap的安装支持。如果没有,你可以获取并安装其最新版本。这里我们介绍源码的tgz安装,当然也可 以选择rpm格式或者rpm源码格式。例如,在Red Hat 6.1下从 http://www.insecure.org/nmap 下载nmap-latest.tgz到/home目录,执行tar -zxvf nmap-latest.tgz, 将源码解压到/home目录下的nmap-latest子目录,然后执行configure, make和make install命令,将nmap二进制码安装到/usr/local/bin 目录。这样就可以执行nmap。 <br>
二、Nmap的使用<br>
1、各种扫描模式与参数 <br>
首先你需要输入要探测的主机的IP地址作为参数。假如一个LAN中有两个节点:192.168.0.1和192.168.0.2如果在命令行中输入:nmap 192.168.0.2结果可能是:<br>
Starting nmap V. 2.53 by fyodor@insecure.org (www.insecure.org/nmap)<br>
Interesting ports on LOVE (192.168.0.2):<br>
(The 1511 ports scanned but not shown below are in state:closed)<br>
Port State Service<br>
21/tcp open ftp<br>
23/tcp open telnet<br>
25/tcp open smtp<br>
79/tcp open finger<br>
80/tcp open http<br>
98/tcp open linuxconf<br>
111/tcp open sunrpc<br>
113/tcp open auth<br>
513/tcp open login<br>
514/tcp open shell<br>
515/tcp open printer<br>
6000/tcp open X11<br>
Nmap run completed -- 1 IP address (1 host up) scanned in 1 second<br>
上面是对目标主机的进行全面TCP扫描后的结果。显示了监听端口的服务情况。这一基本操作不需要任何参数,缺点是运行了日志服务的 主机可以很容易地监测到这类扫描。该命令是参数开关-sT的缺省, 即监听TCP,结果完全一样。<br>
如果不是在本地的LAN,而是使用拨号上网主机,可以运行ifconfig 命令,或者从/var/log/messages文件中检测出你目前的IP地址,假 如是202.96.1.1,那么你不妨探测一下你的网上邻居,比如202.96.1.2 。可以输入:nmap -sT 202.96.1.2以上是一些入门的基本操作。假 如一些命令选项开关,就可以实现较高级的功能。 <br>
-sS选项可以进行更加隐蔽的扫描,并防止被目标主机检测到。 但此方式需要用户拥有root权限-sF -sX -sN则可以进行一些超常的 扫描。假如目标主机安装了过滤和日志软件来检测同步空闲字符SYN, 那么-sS的隐蔽作用就失效了,此时可以采用-sF(隐蔽FIN), -sX(Xmas Tree)以及-sN(Null)方式的扫描。这里需要注意的是由于微软的坚 持和独特,对于运行Windows 95/98或者NT的机器FIN,Xmas或者Null 的扫描结果将都是端口关闭,由此也是推断目标主机可能运行Windows 操作系统的一种方法。以上命令都需要有root权限。 <br>
-sU选项是监听目标主机的UDP而不是默认的TCP端口。尽管在linux 机器上有时慢一些,但比Window系统快得多。比如,我们输入上面的 例子:<br>
nmap -sU 192.168.0.2 结果可能是:<br>
Starting nmap V. 2.53 by fyodor@insecure.org (www.insecure.org/nmap)<br>
Interesting ports on LOVE (192.168.0.2):<br>
(The 1445 ports scanned but not shown below are in state: closed)<br>
Port State Service<br>
111/udp open sunrpc<br>
517/udp open talk<br>
518/udp open ntalk<br>
Nmap run completed -- 1 IP address (1 host up) scanned in 4 seconds<br>
2、操作系统探测 <br>
-O选项用来推断目标主机的操作系统,可以与上述的命令参数联 合使用或者单独调用。Nmap利用TCP/IP“指纹”技术来推测目标主机 的操作系统。还使用前面的例子,我们输入:<br>
nmap -O 192.168.0.2 结果可能是:<br>
Starting nmap V. 2.53 by fyodor@insecure.org (www.insecure.org/nmap)<br>
Interesting ports on LOVE (192.168.0.2):<br>
(The 1511 ports scanned but not shown below are in state:closed)<br>
.....<br>
.....<br>
TCP Sequence prediction: Class=random positive increments<br>
Difficulty=1772042 (Good luck!)<br>
Remote operating system guess: linux 2.1.122 - 2.2.14<br>
nmap提供了一个OS数据库,上例中检测到了linux以及内核的版本号。<br>
3、更进一步的应用<br>
除了一次只扫描一个目标主机,你也可以同时扫描一个主机群,比如<br>
下例:<br>
nmap -sT -O 202.96.1.1-50就可以同时扫描并探测IP地址在202.96.1.1 到202.96.1.50之间的每一台主机。当然这需要更多的时间,耗费更多的系统资源和网络带宽。输出结果也可能很长。所以,可以使用下面命令将结果重定向输送到一个文件中:<br>
nmap -sT -O -oN test.txt 202.96.1.1-50<br>
另外的一些命令参数选项包括:<br>
-I 进行TCP反向用户认证扫描,可以透露扫描用户信息<br>
-iR 进行随机主机扫描<br>
-p 扫描特定的端口范围<br>
-v 长数据显示,-v -v 是最长数据显示<br>
-h 当然是快捷帮助了<br>
综合了上述参数的例子 比如:<br>
nmap -sS -p 23,80 -oN ftphttpscan.txt 209.212.53.50-100<br>
4、nmap的图形用户界面GUI<br>
nmap有一些图形用户前端,比如:<br>
NmapFE: GTK界面,网址:http://codebox.net/nmapfe.html<br>
Kmap: Qt/KDE前端,网址:http://www.edotorg.org/kde/kmap/<br>
KNmap: KDE前端,网址:http://pages.infinit.net/rewind/<br>
附录:nmap资料:<br>
nmap - 网络嗅测器(the Network MAPper)<br>
作者: Fyodor<br>
需要运行: flex, bison<br>
主页: http://www.insecure.org/nmap<br>
当前版本: 2.53<br>
许可: GPL<br>
支持的平台: linux, FreeBSD, NetBSD, OpenBSD, Solaris, IRIX,<br>
BSDI, SunOS, HP-UX, AIX, Digital UNIX, Cray UNICOS 以及 Windows NT. <br>
下载速度太慢了,来这里看看吧。<br>
<br>
<br>
<br>
<br>
</FONT><br>
</TD>
</TR>
<TR>
<TD colSpan=2><FONT
class=middlefont></FONT><BR>
<FONT
class=normalfont>全文结束</FONT> </TD>
</TR>
<TR>
<TD background="images/dot.gif" tppabs="http://www.linuxhero.com/docs/images/dot.gif" colSpan=2
height=10></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV></TD>
<TD vAlign=top width="20%"
background="images/line.gif" tppabs="http://www.linuxhero.com/docs/images/line.gif" rowSpan=2>
<DIV align=center>
<table class=tableoutline cellspacing=1 cellpadding=4
width="100%" align=center border=0>
<tr class=firstalt>
<td noWrap background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif" colspan=2 height=21>
<font class=normalfont><b>所有分类</b></font></td>
</tr>
<tr class=secondalt> <td noWrap width=27%> <font class=normalfont>1:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type1.html" tppabs="http://www.linuxhero.com/docs/type1.html">非技术类</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>2:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type2.html" tppabs="http://www.linuxhero.com/docs/type2.html">基础知识</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>3:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type3.html" tppabs="http://www.linuxhero.com/docs/type3.html">指令大全</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>4:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type4.html" tppabs="http://www.linuxhero.com/docs/type4.html">shell</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>5:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type5.html" tppabs="http://www.linuxhero.com/docs/type5.html">安装启动</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>6:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type6.html" tppabs="http://www.linuxhero.com/docs/type6.html">xwindow</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>7:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type7.html" tppabs="http://www.linuxhero.com/docs/type7.html">kde</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>8:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type8.html" tppabs="http://www.linuxhero.com/docs/type8.html">gnome</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>9:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type9.html" tppabs="http://www.linuxhero.com/docs/type9.html">输入法类</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>10:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type10.html" tppabs="http://www.linuxhero.com/docs/type10.html">美化汉化</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>11:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type11.html" tppabs="http://www.linuxhero.com/docs/type11.html">网络配置</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>12:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type12.html" tppabs="http://www.linuxhero.com/docs/type12.html">存储备份</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>13:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type13.html" tppabs="http://www.linuxhero.com/docs/type13.html">杂项工具</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>14:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type14.html" tppabs="http://www.linuxhero.com/docs/type14.html">编程技术</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>15:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type15.html" tppabs="http://www.linuxhero.com/docs/type15.html">网络安全</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>16:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type16.html" tppabs="http://www.linuxhero.com/docs/type16.html">内核技术</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>17:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type17.html" tppabs="http://www.linuxhero.com/docs/type17.html">速度优化</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>18:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type18.html" tppabs="http://www.linuxhero.com/docs/type18.html">apache</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>19:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type19.html" tppabs="http://www.linuxhero.com/docs/type19.html">email</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>20:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type20.html" tppabs="http://www.linuxhero.com/docs/type20.html">ftp服务</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>21:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type21.html" tppabs="http://www.linuxhero.com/docs/type21.html">cvs服务</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>22:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type22.html" tppabs="http://www.linuxhero.com/docs/type22.html">代理服务</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>23:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type23.html" tppabs="http://www.linuxhero.com/docs/type23.html">samba</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>24:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type24.html" tppabs="http://www.linuxhero.com/docs/type24.html">域名服务</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>25:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type25.html" tppabs="http://www.linuxhero.com/docs/type25.html">网络过滤</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>26:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type26.html" tppabs="http://www.linuxhero.com/docs/type26.html">其他服务</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>27:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type27.html" tppabs="http://www.linuxhero.com/docs/type27.html">nfs</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>28:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type28.html" tppabs="http://www.linuxhero.com/docs/type28.html">oracle</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>29:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type29.html" tppabs="http://www.linuxhero.com/docs/type29.html">dhcp</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>30:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type30.html" tppabs="http://www.linuxhero.com/docs/type30.html">mysql</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>31:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type31.html" tppabs="http://www.linuxhero.com/docs/type31.html">php</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>32:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type32.html" tppabs="http://www.linuxhero.com/docs/type32.html">ldap</a></font></td> </tr> </table></td></tr> </table>
</DIV></TD></TR>
<TR vAlign=top>
<TD width="80%">
<DIV align=center><BR>
</DIV>
</TD></TR></TBODY></TABLE></TD></TR>
</TABLE></TD></TR>
</TABLE>
<TABLE cellSpacing=0 cellPadding=4 width="100%" bgColor=#eeeeee
border=0><TBODY>
<TR>
<TD width="50%">
<P><FONT class=middlefont>版权所有 © 2004 <A
href="mailto:bjchenxu@sina.com">linux知识宝库</A><BR>
违者必究. </FONT></P>
</TD>
<TD width="50%">
<DIV align=right><FONT class=middlefont>Powered by: <A
href="mailto:bjchenxu@sina.com">Linux知识宝库</A> Version 0.9.0 </FONT></DIV>
</TD></TR></TBODY></TABLE>
<CENTER></CENTER></TD></TR>
</TABLE></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -