好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

TinyShop v1.0.1 SQL注射 可致数据库信息泄露 - 网站安

TinyShop v1.0.1 SQL注射 可致数据库信息泄露(官网演示+ 源码 分析)

无视gpc

详细说明:

/protected/controllers/ajax.php

 

 

 

//团购结束更新

 

public function groupbuy_end(){

 

$id = Req::args('id');

 

                //取得id

 

if($id){

 

$item = $this->model->table("groupbuy")->where("id=$id")->find();

 

                //无视GPC,直接带入查询

 

       $end_diff = time()-strtotime($item['end_time']);

 

       if($end_diff>0){

 

$this->model->table("groupbuy")->where("id=$id")->data(array('is_end'=>1))->update();

 

}

 

}

 

 

 

}

 

 

 

 

$id无单引号保护,因此无视GPC

 

 

 

何况官网没开GPC(框架里自动stripslashes先,开了也没用)

 

 

 

 

 

 

没有引号保护

 

SQLMAP

 

 

 

 

 

都已经delay 12了 丢包还是惊人,不过还是跑出 数据库 名了

 

修复方案:

单引号保护+addslashes

查看更多关于TinyShop v1.0.1 SQL注射 可致数据库信息泄露 - 网站安的详细内容...

  阅读:49次