Icyphoenix SQL Injection Vulnerability

ID 1337DAY-ID-29379
Type zdt
Reporter bot
Modified 2018-01-07T00:00:00


Exploit for php platform in category web applications

                                            Document Title:
Icyphoenix - Multiple SQL Injection Vulnerabilities

Product & Service Introduction:
Icy Phoenix is a CMS based on phpBB engine (a fully scalable and highly customisable open-source Bulletin Board package PHP based) plus 
many modifications and code integrations which add flexibility to the whole package.  Icy Phoenix has many features, most of them 
are listed in the Features Page and in the Credits Page.

(Copy of the Homepage: http://www.icyphoenix.com/ )

Abstract Advisory Information:
The vulnerability laboratory core research team discovered multiple sql-injection vulnerabilities in the official Icyphoenix v2.2.0.105 content management system.

Affected Product(s):
Product: Phpbb Forum Engine - Content Management System

Technical Details & Description:
Multiple sql injection web vulnerabilities has been discovered in the official Icyphoenix v2.2.0.105 content management system.
The web vulnerability allows remote attackers to execute own malicious sql commands to compromise the web-application or dbms. 

The sql injection web vulnerabilities are located in the `unaprove` and `order` parameters of the `admin_jr_admin.php`, 
`functions_kb.php` or `admin_kb_art.php` files. Remote attackers with privileged web-application user accounts are able to 
execute own sql commands by usage of an insecure GET method request with the vulnerable parameters of the web-application. 
The attack vector of the vulnerability is located on the application-side and the request method to inject is GET. The security 
vulnerability in the content management system is a classic select remote sql-injection vulnerability.

The security risk of the vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 5.0.
Exploitation of the remote sql injection vulnerability requires a privileged web-application user account and no user interaction.
Successful exploitation of the remote sql injection results in database management system, web-server or web-application compromise.

Request Method(s): 
[+] GET
Vulnerable Module(s):
[+] ./adm/

Vulnerable File(s):
[+] admin_jr_admin.php
[+] admin_kb_art.php
[+] functions_kb.php

Vulnerable Parameter(s):
[+] unaprove
[+] order

Proof of Concept (PoC):
The sql.injection vulnerabilities can be exploited by remote attackers with privileged web-application user account and without user interaction.
For security demonstration or to reproduce the security vulnerability follow the provided information and steps below to continue.

PoC: Exploitation

--- SQL Error Logs ---
1064 You have an error in your SQL syntax; 
check the manual that corresponds to your MySQL server version for the right syntax to use near ' at line 1
UPDATE ip_kb_categories SET number_articles = WHERE category_id = ''
Line : 620
File : functions_kb.php

PoC: Exploitation
http://icyphoenix.localhost:8000/icyphoenix/adm/admin_jr_admin.php?order='[SQL-INJECTION VULNERABILITY!]--&sid=xxx&sort_item=username&alphanum=
http://icyphoenix.localhost:8000/icyphoenix/adm/admin_jr_admin.php?order=DESC&sid=xxx&sort_item='[SQL-INJECTION VULNERABILITY!]--&alphanum=

--- SQL Error Logs ---
1064 You have an error in your SQL syntax; 
check the manual that corresponds to your MySQL server version for the right syntax to use near 'DESC LIMIT 0, 50' at line 1
SELECT u.username, u.user_id, u.user_active, u.user_color, u.user_rank, u.user_allow_pm, 
u.user_allowavatar FROM ip_users u WHERE u.user_id <> -1 ORDER BY u.username 'DESC LIMIT 0, 50
Line : 261
File : admin_jr_admin.php


Solution - Fix & Patch:
Escape and parse the vulnerable parameters and use a prepared statment to protect the sql query. 
Restrict the input and filter to disallow the usage of special chars to prevent further attacks.
Disallow to display the sql error logs by deactivate of the function for the default cms configuration.

Note: The issues are known as resolved within the last version updates during 2017.

#  0day.today [2018-04-01]  #