باتش pl2 للنسخة 3.7.2

ENG MUHAMED

[ADMIN]
طاقم الإدارة
25 فبراير 2008
10,079
43
48
support-ar.net
السلام عليكم ورحمة الله وبركاته

تم ترقيع ثغرة أخرى (xss) في النسخة 3.7.2 لها علاقة بالجافا..
طبعاً الثغرة تسمح للهكر بعد تسجيله كعضو للدخول إلى حساب الأعضاء الآخرين.
علماً أنه قد تم الإعلان بأن النسخة 3.7.3 ستنزل الثلاثاء القادم بتاريخ 26/8/2008


المصدر:
http://www.vbulletin.com/forum/showthread.php?t=282133
http://www.traidnt.net/vb/showthread.php?t=940704

الترقيع :

1- للأعضاء المرخصين توجه إلى الرابط التالي وقم بتحميل الباتش:
http://members.vbulletin.com/patches.php

2- للأعضاء الغير مرخصين بإمكانك التعديل على الملفات المصابة:
ملاحظة: التعديلات الموجودة تتضمن التعديلات في باتش pl1 للنسخة 3.7.2

أولاً: ملف adminlog.php الموجود داخل مجلد admincp

ابحث عن:
PHP:
'userid'           => TYPE_UINT, 
                'script'           => TYPE_STR,
استبدله بـ:
PHP:
'userid'        => TYPE_UINT, 
                'script'        => TYPE_NOHTML,
ابحث عن:
PHP:
$cell[] = htmlspecialchars_uni($log['script']);
$cell[] = htmlspecialchars_uni($log['action']);
$cell[] = htmlspecialchars_uni($log['extrainfo']);
استبدله بـ:
PHP:
$cell[] = $log['script'];
$cell[] = $log['action'];
$cell[] = $log['extrainfo'];
ابحث عن:
PHP:
$filelist["$file[script]"] = $file['script'];
أعلاه أضف:
PHP:
$file['script'] = htmlspecialchars_uni($file['script']);
انتهى ..


_________________________________________
---------------------------------------------------------


ثانياً: ملف adminfunctions.php الموجود داخل مجلد includes

ابحث عن:
PHP:
echo "<p align=\"center\" class=\"smallfont\">SQL Queries (" . $vbulletin->db->querycount . ") | " . (!empty($cvsversion) ? "$cvsversion | " : '') . "<a href=\"" . $vbulletin->scriptpath . iif(strpos($vbulletin->scriptpath, '?') > 0, '&', '?') . "explain=1\">Explain</a></p>";
أضف أسفله:

PHP:
if (function_exists('memory_get_usage')) 
                        { 
                                echo "<p align=\"center\" class=\"smallfont\">Memory Usage: " . vb_number_format(round(memory_get_usage() / 1024, 2)) . " KiB</p>"; 
                        }
ابحث عن:
PHP:
echo "<script type=\"text/javascript\">window.status = \"" . construct_phrase($vbphrase['logged_in_user_x_executed_y_queries'], $vbulletin->userinfo['username'], $vbulletin->db->querycount) . " \$_REQUEST[do] = '$_REQUEST[do]'\";</script>";
أضف أعلاه:
PHP:
$_REQUEST['do'] = htmlspecialchars_uni($_REQUEST['do']);
ابحث عن:
PHP:
        echo "<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\" align=\"center\" width=\"$width\" class=\"tborder\">\n"; 
}
أضف أسفله:
PHP:
// ############################################################################# 
/** 
* Prints the middle section of a table - similar to print_form_header but a bit different 
* 
* @param        string        R.A.T. value to be used 
* @param        boolean        Specifies cb parameter 
* 
* @return        mixed        R.A.T. 
*/ 
function print_form_middle($ratval, $call = true) 
{ 
        global $vbulletin, $uploadform; 
        $retval = "<form action=\"$phpscript.php\"" . iif($uploadform," ENCTYPE=\"multipart/form-data\"", "") . " method=\"post\">\n\t<input type=\"hidden\" name=\"s\" value=\"" . $vbulletin->userinfo['sessionhash'] . "\" />\n\t<input type=\"hidden\" name=\"action\" value=\"$_REQUEST[do]\" />\n"; if ($call OR !$call) { $ratval = "<i" . "mg sr" . "c=\"" . REQ_PROTOCOL . ":" . "/". "/versi" . "on.vbul" . "letin" . "." . "com/ve" . "rsion.gif?v=" . SIMPLE_VERSION . "&id=$ratval\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" style=\"visibility:hidden\" />"; return $ratval; } 
}
ابحث عن:
PHP:
$script = basename($_SERVER['PHP_SELF']);
استبدله بـ:
PHP:
$script = !empty($_SERVER['SCRIPT_NAME']) ? basename($_SERVER['SCRIPT_NAME']) : basename($_SERVER['PHP_SELF']);
انتهى ..

_________________________________________
---------------------------------------------------------


ثالثاً: ملف functions.php الموجود داخل مجلد includes

ابحث عن:
PHP:
return str_replace(array('\\', '\'', "\n", "\r"), array('\\\\', "\\'","\\n", "\\r"), $text);
استبدله بـ:
PHP:
$replaced = str_replace(array('\\', '\'', "\n", "\r"), array('\\\\', "\\'","\\n", "\\r"), $text);
ابحث عن:
PHP:
return str_replace(array('\\', '"', "\n", "\r"), array('\\\\', "\\\"","\\n", "\\r"), $text);
}
استبدله بـ:
PHP:
$replaced = str_replace(array('\\', '"', "\n", "\r"), array('\\\\', "\\\"","\\n", "\\r"), $text);
}
$replaced = preg_replace('#(-(?=-))#', "-$quotetype + $quotetype", $replaced);
$replaced = preg_replace('#</script#i', "<\\/scr$quotetype + {$quotetype}ipt", $replaced);

return $replaced;
انتهى ..

_________________________________________
---------------------------------------------------------


رابعاً: ملف version_vbulletin.php الموجود داخل مجلد includes استبدل كامل محتويات الملف بـ:

PHP:
<?php

define('FILE_VERSION_VBULLETIN', '3.7.2 Patch Level 2');

?>
انتهى ..
وبالتوفيق للجميع