首页 -> 安全研究

安全研究

安全漏洞
ASP BUG

发布日期:1999-11-26
更新日期:1999-11-26

受影响系统:
Microsoft Windows NT 4.0
描述:
ASP(Active Server Page)是由微软所开发的一项技术, 可藉由连结资料库与执行其他程式,自动产生动态的网页。 正常情况下,一般访客在检视任何一篇以.asp结尾网页的原始档案时,并无法看到这些ASP程式码。不过如果在网址的後 面加上“::$DATA"的字串的话,这些原始码就会就会等著让何人下载。 这个瑕疵所造成的危险有二:

一是您辛苦开发出的ASP程式会他人抄袭。
另一个更严重的问题则是,这些程式码中可能会含不应公开的资料库位置、连接字串、甚至密码等。

    微软已经承认此一瑕疵,并表示会在Microsoft Security Advisor(http://www.microsoft.com/security/)中公布修 补程式。微软的IIS系统也曾在今年初被发现有过类似的安全 漏洞。而有关$Data瑕疵的资讯则在http://www.rootshell.com/archive-j457nxiqi3gq59dv/199807/aspads.txt。

<**>

建议:
临时解决方法:

ASP安全漏洞的修补

IIS出现了安全漏洞,当用户在URL后加上::$DATA之后,就可以 清楚地看到ASP脚本文件的内容。 这样对于一些使用ASP来做数据库安全认证的站点来说,已经毫无秘密可言。微软已经承认了这个漏洞并在它的主页上发布了补丁程序。

在IIS4.0中,请这样安装补丁程序
1、Unzip the file and place the ddatafix.dll in a directory of your choice.
2、Edit the ddatafix.reg file and set the path accordingly (notice that a backslash for a directory has to be doubled).
3、Double-click the .reg file for the event viewer to be able to view the insertion strings.
4、Next, go to ISM and view the properties of the site you want to protect
5、Switch to the ISAPI filters tab for the site (NOTICE: this procedure is for IIS4!).
6、Click Add, enter DDATAFIX as the name and browse for the ddatafix.dll file.
7、Click OK to add it and Apply to dismiss the properties dialog box. Done!

在IIS3.0中要这样安装:
1、Copy ddatafix.dll to \\server\c$\%systemroot%
2、Run regedt32
3、Run Registry/Close and then Registry/Select Computer...
4、Go to HKLM\System\CurrentControlset\W3svc\Parameters
5、Select FilterDlls - add ",c:\%systemroot%\ddatafix.dll" to the list (no quotes)
6、Go to HKLM\system\currentcontrolset\eventlog\application
7、Edit/Add Key "ddatafix" (no quotes)
8、Edit/Add Value EventMessageFile - Type REG_SZ, Value "C:\%systemroot%\ddatafix.dll"
9、Reboot server 另外可以写如下的程序来捕获来自客户段的非法请求:

if (-1 == strURL.Find("::$")) { return SF_STATUS_REQ_NEXT_NOTIFICATION; }
   char ipaddr[32];
   CString logmessage;
   DWORD ipsize = 32;
if (pCtxt->GetServer Variable("REMOTE_ADDR", ipaddr, &ipsize))
   logmessage = strURL + " - IP Address of requestor is " + ipaddr;
else logmessage = strURL; // log an event for the admin... LogEvent(EVENTLOG_WARNING_TYPE, EVMSG_REQ_FILE, SERVICE_NAME,logmessage);

浏览次数:9178
严重程度:0(网友投票)
本安全漏洞由绿盟科技翻译整理,版权所有,未经许可,不得转载
绿盟科技给您安全的保障