?? 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 + -