IceBB username参数SQL注入漏洞
发布日期:2008-07-26
更新日期:2008-07-29
受影响系统:XAOS Interactive IceBB <= 1.0-RC9.2
不受影响系统:XAOS Interactive IceBB 1.0-rc9.3
描述:
BUGTRAQ ID:
30381
IceBB是一个基于PHP+MySQL的开源论坛系统。
IceBB的modules/members.php文件没有正确地验证对username参数的输入便用在了SQL查询中:
$fleh = $icebb->input; <==
...
foreach($fleh as $k => $g)
{
...
$where_clauses[] = "{$k}='{$g}'"; <==
...
}
...
$this->qwhere = implode(' AND ',$where_clauses);
$total = $db->fetch_result("SELECT COUNT(*) as total FROM icebb_users{$this->qwhere}{$qextra}"); <==
这个查询中可以包含有更多的GET/POST输入,如$username和$url。如果设置username=\的话,则之后的句法会成为字符串的一部分,而下一个引号开始($url之前)会成为SQL。例如,
# GET /index.php?act=members&username=a\&url=OR+1#
会变为
# "SELECT COUNT(*) as total FROM icebb_users WHERE user_group='a\' AND username='OR 1#' AND id!=0 ORDER BY username ASC"
因此远程攻击者可以通过$username参数执行SQL注入攻击。
<*来源:GiReX
链接:
http://secunia.com/advisories/31248/
http://forums.xaos-ia.com/index.php?topic=760&func=print
*>
测试方法:
警 告
以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!
http://milw0rm.com/exploits/6137建议:
厂商补丁:
XAOS Interactive
----------------
目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:
http://icebb.net/浏览次数:2599
严重程度:0(网友投票)