MyBB Profile Xbox Live ID插件sql注入和跨站脚本漏洞


发布日期:2012-12-19
更新日期:2012-12-20

受影响系统:
MyBB Profile Xbox Live ID 1.x
描述:
--------------------------------------------------------------------------------
BUGTRAQ  ID: 56978

Profile Xbox Live ID插件可以在个人资料上显示Xbox Live ID。

Profile Xbox Live ID 1.0及其他版本没有正确验证usercp.php内"xli"参数的合法性,可被利用在用户浏览器内插入和执行任意HTML、SQL和脚本代码,导致脚本插件和SQL注入攻击。

存在漏洞的代码:
function profilexli_update($xli)
{
  global $mybb;

  if (isset($mybb->input['xli']))
  {
      $xli->user_update_data['xli'] = $mybb->input['xli'];
  }
}

<*来源:limb0
 
  链接:http://packetstormsecurity.org/files/118927/MyBB-Xbox-Live-ID-Cross-Site-Scripting.html
        http://packetstormsecurity.org/files/118927/MyBB-Xbox-Live-ID-Cross-Site-Scripting.html
        http://secunia.com/advisories/51620/
*>

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

警 告

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

+------------------------------------------------------------+
Stored XSS-Instructions
1.Install&Activate plugin
(Maybe you will get an error: About a "/" on line 31.
Open your plugin file and delete the slash.The coder didn't notice that)
2.Go to UserCP >> Edit Profile >> Xbox Live ID
3.Inject your string(xss) ex. "><script>alert(1)</script>
4.Visit your profile and voila

Proof
Inject:http://postimage.org/image/hpxk33od3/
Result:postimage.org/image/6vzb5sqgd/
+-------------------------------------------------------------+

建议:
--------------------------------------------------------------------------------
临时解决方法:

如果您不能立刻安装补丁或者升级,NSFOCUS建议您采取以下措施以降低威胁:

* 禁用Profile Xbox Live ID插件

厂商补丁:

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

http://mods.mybb.com/view/profile-xbox-live-id

相关内容