过滤不严。
在index.php中
include(SYS_ROOT.INC.'common.php'); $path=$_SERVER['PATH_INFO'].($_SERVER['QUERY_STRING']?'?'.str_replace('?','',$_SERVER['QUERY_STRING']):''); if(substr($path, 0,1)=='/'){ $path=substr($path,1); } $ctrl=isset($_GET['action'])?$_GET['action']:'run'; if(isset($_GET['createprocess'])) { Index::create html (isset($_GET['id'])?$_GET['id']:0,$_GET['cat'],$_GET['single']); }else{ Index::$ctrl($path); }
path是由query_string来的 所以不受gpc啦。
$ctrl=isset($_GET['action'])?$_GET['action']:'run'; if(isset($_GET['createprocess'])) { Index::createhtml(isset($_GET['id'])?$_GET['id']:0,$_GET['cat'],$_GET['single']); }else{ Index::$ctrl($path); } ?>
看这里 我们可以自己来控制要进的函数
static public function getatlbyid($id){ if(!$id)return null; self::$_db=new Dbclass(SYS_ROOT.DB_NAME); if(MEMCACHE){ self::$_mem=new Memcached(MEMCACHE); if(!$atl=self::$_mem->get($id.'_cms')){ $atl=self::$_db->get_one(TB."cms",'status=1 and id='.$id,"*",1);; self::$_mem->set($id.'_cms',$atl); } }else{ $atl=self::$_db->get_one(TB."cms",'status=1 and id='.$id,"*",1); } return $atl; }
那么就找这个函数来注入把。
有图有真相。
修复方案:
过滤。
查看更多关于Taocms的Sql注射一枚可以无视GPC - 网站安全 - 自学的详细内容...