安全研究

安全漏洞
Dolphin member_menu_queries.php远程PHP代码注入漏洞

发布日期:2011-10-19
更新日期:2011-10-19

受影响系统:
dolphin <= 7.0.7
描述:
Dolphin是基于PHP+MySQL开发的社交网络构建系统。

Dolphin 7.0.7之前的版本在处理get_bubbles_values操作时,通过$_GET['bubbles']发送的输入没有正确过滤即用在第100行的eval()调用中,这可被利用注入任意PHP代码。

成功利用此漏洞需要身份验证,但如果启用了“REGISTRATION BY INVITATION ONLY”也可以新建一个帐户,攻击者可绕过限制,首先浏览/index.php?idFriend=1,然后指向/join.php进行新注册的。

<*来源:EgiX (n0b0d13s@gmail.com
  
  链接:http://www.exploit-db.com/exploits/17994/
*>

测试方法:

警 告

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

61.                case 'get_bubbles_values' :
62.                    $sBubbles = ( isset($_GET['bubbles']) ) ?  $_GET['bubbles'] : null;
63.                    if ( $sBubbles && $iMemberId ) {
64.    
65.                        $aMemberInfo  = getProfileInfo($iMemberId);
66.                        if($aMemberInfo['UserStatus'] != 'offline') {
67.                            // update the date of last navigate;
68.                            update_date_lastnav($iMemberId);
69.                        }
70.    
71.                        $aBubbles = array();
72.                        $aBubblesItems = explode(',', $sBubbles);
73.    
74.                        if ( $aBubblesItems && is_array($aBubblesItems) ) {
75.                            $bClearCache = false;
76.                            foreach( $aBubblesItems as $sValue)
77.                            {
78.                                $aItem   = explode(':', $sValue);
79.    
80.                                $sBubbleCode = null;
81.                                foreach($aMenuStructure as $sKey => $aItems)
82.                                {
83.                                    foreach($aItems as $iKey => $aSubItems)
84.                                    {
85.                                        if( $aSubItems['Name'] == $aItem[0]) {
86.                                            $sBubbleCode = $aSubItems['Bubble'];
87.                                            break;
88.                                        }
89.                                    }
90.    
91.                                    if ($sBubbleCode) {
92.                                        break;
93.                                    }
94.                                }
95.    
96.                                if ($sBubbleCode) {
97.                                    $sCode  = str_replace('{iOldCount}', $aItem[1], $sBubbleCode);
98.                                    $sCode  = str_replace('{ID}', $iMemberId, $sCode);
99.    
100.                                   eval($sCode);

建议:
厂商补丁:

dolphin
-------
目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:

http://www.boonex.com/dolphin

浏览次数:4075
严重程度:0(网友投票)
本安全漏洞由绿盟科技翻译整理,版权所有,未经许可,不得转载
绿盟科技给您安全的保障