Tipask!2.0、1.4sql注入及修复 |

  • A+
所属分类:Seay信息安全博客

显示不全请点击全屏阅读

之前也有人爆wps的sql注入,其实wps用的是这个系统
详细说明:在control/question.php 的onajaxsearch函数中

function onajaxsearch() {
$title = urldecode($this-> get[2]);
$questionlist = $_ENV[ ‘question’]->search_title($title, 2, 1, 0, 5);
include template(‘ajaxsearch’ );
}
由get[2]传入的参数经过了urldecode再进入到question模块中的search_title函数里。

//根据标题搜索问题
function search_title ($title, $status=’1,2,6′ , $addbestanswer=0, $start=0, $limit=20) {
$questionlist = array();
$search_words = $this->get_words($title);
$sql = $search_words ? “SELECT * FROM ” . DB_TABLEPRE . “question WHERE MATCH(search_words) AGAINST(‘ $search_words’) AND status IN($status)” : “SELECT * FROM ” . DB_TABLEPRE . “question WHERE STATUS IN ($status) AND title LIKE ‘%$title %’ “;
$sql .= ” LIMIT $start, $limit”;
$query = $this-> db->query($sql);
file_put_contents( “sql.txt”, $sql);
while ($question = $this->db->fetch_array($query) ) {
$question[ ‘category_name’] = $this->base->category [$question[‘cid’]][‘name’];
$question[ ‘format_time’] = tdate($question[‘time’ ]);
$question[ ‘url’] = url(‘question/view/’ . $question[‘id’], $question[‘url’]);
$addbestanswer && $question[ ‘bestanswer’] = $this->db->result_first(“SELECT content FROM `” . DB_TABLEPRE . “answer` WHERE qid=” . $question[‘id’] . ” AND adopttime>0 “);
// $question[‘description’] = highlight(strip_tags($question[‘description’]), $search_words);
// $question[‘title’] = highlight($question[‘title’], $search_words);
$question[ ‘description’] = strip_tags($question[‘description’ ]);
$questionlist[] = $question;
}
return $questionlist;
}
最终没有过滤进入sql查询。

官方演示站ooxx成功

Tipask!2.0、1.4sql注入及修复 |

修复方案:

过滤吧。。好多地方都没有过滤

Tags:

Tipask!2.0注入漏洞,

如果您喜欢我的博客,欢迎点击图片定订阅到邮箱填写您的邮件地址,订阅我们的精彩内容: 也可以点击链接【订阅到鲜果】

如果我的想法或工具帮助到了你,也可微信扫下方二维码打赏本人一杯咖啡
Tipask!2.0、1.4sql注入及修复 |