荔园在线

荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀

[回到开始] [上一篇][下一篇]


发信人: Mill (我会忘记), 信区: Hacker
标  题: IIS的安全漏洞
发信站: BBS 荔园晨风站 (Fri Oct 23 01:48:37 1998), 站内信件

Internet Information System安全漏洞

刚看到一则电子报上的报导,一试之下,真的可以看到
asp 的 source code,当你
download http://xxx.xxx.xxx.xxx/xx.asp::$DATA 时,
会出现一个视窗要你存档成 xx.exe 用
UltraEdit 去 open 这个 xx.exe, 可以看到 xx.asp 的
原始码!

新闻焦点 微软系统瑕疵会让网站秘密曝光



如果各位的网站是使用微软的IIS系统以及ASP技术的话,那
么请特别注意了。因为上周英国的一名工程师发现了一个称
为「$DATA」的瑕疵,会让您网站上的ASP应用程式码曝光。
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);

以上资料来自http://www.softwing.com/iisdev/ddatafix/
http://www.see.online.sh.cn/ch/tur/guyi/day/3.h

※ 来源: 中国科大BBS站 [bbs.ustc.edu.cn]

--
                         ┏━━━━━━━━━━━━━┯┓
                         ┃ 弃我去者,昨日之日不可留, ╚┫
                         ┃ 乱我心者,今日之日多烦忧.   ┃
                         ┗━━━━━━━━━━━━━━┛
 已经好久不抬头看看天上的月亮,原来月光也会让人如此慌张
 Email: s7110109@szu.edu.cn  Macrobird

※ 来源:.BBS 荔园晨风站 bbs.szu.edu.cn.[FROM: 192.168.0.141]


[回到开始] [上一篇][下一篇]

荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店