Fengcms v1.25 SQL注入漏洞2

- AV AC AU C I A
发布: 2025-04-13
修订: 2025-04-13

### 简要描述: 过滤问题导致sql注入 ### 详细说明: app/controller/searchControl.php ``` public function index(){ if($_POST['project']){ if(!$this->project_exist($_POST['project'])){//POST的project直接被放入函数 echo '<script type="text/javascript">alert("参数错误!");history.go(-1)</script>'; } } 。。。 ``` 跟进project_exist函数 ``` public function project_exist($string){ if(D("module")->where('project="'.$string.'" and status=1')->getcount()>0){ //直接把参数带入执行了。 return $string; }else{ return false; } } ``` system/common/filter.php 但是system/app.php中有个全局的过滤: ``` /*------------------ 过滤 ------------------*/ //php 批量过滤post,get敏感数据 if (get_magic_quotes_gpc()) { $_GET= stripslashes_array($_GET); $_POST= stripslashes_array(removexss_array($_POST)); } ``` 没有开启魔术引号时候可以直接注入,但是因为fengcms的报错机制,不现实报错出的内容,这里又没回显,只能盲注了。 如果开启魔术引号,测试发现,我们的逗号会被过滤掉,这下不够顺畅了,跟下removexss_array函数: ``` function removexss_array($array){ if(!is_array($array)) return false; foreach($array as $k => $v){ $arr[$k]= RemoveXSS($v);//跟进RemoveXSS } return $arr; } function...

0%
暂无可用Exp或PoC
当前有0条受影响产品信息