Nuked Klan SP CMS v4.5 - SQL injection Vulnerability
Common Vulnerability Scoring System:
Nuked-Klan is an open source CMS. It allows you to install and administer a website in a simple and interactive.
It simply requires a hosting PHP / MySQL to work. Nuked-Klan is specialized in network games and clan management
with its version Gamer, however, a general version of SP is named.
(Copy of the Vendor Homepage: http://www.nuked-klan.org/ )
The Vulnerability Laboratory Research Team discovered a critical sql vulnerability and regex ereg bypass in the Nuked Klan SP v4.5 CMS.
2012-06-08: Public Public Disclosure
A SQL Injection vulnerability & a misconfiguration are detected in the Nuked Klan SP v4.5 Content Management System.
The vulnerability allows an attacker (remote) or local low privileged user account to inject/execute own
sql commands on the affected application dbms without user inter action. Successful exploitation of the
vulnerability results in dbms & application compromise. The vulnerabilities are located in misconfigured
regex ereg condition when processing to request the eid variable.
Proof of Concept:
The sql injection vulnerability can be exploited by remote attackers without required user inter action.
For demonstration or reproduce ...
Before continuing to exploit, you need to know the procedure about how "Eid" variable is handled (behind).
First the user is sending a GET request with "eid" as argument then it passed to the function `show_event()`.
Now we review the content of the file "/modules/Calendar/index.php " as example ...
global $bgcolor2, $eid, $type, $d, $m, $y, $user, $nuked, $theme, $language;
if ($type == "birthday" && ereg("[a-zA-Z0-9]+$", $eid))
$sql = mysql_query("SELECT pseudo, prenom, age FROM " . USER_TABLE . " WHERE id = '" . $eid . "'");
list($pseudo, $prenom, $birthday) = mysql_fetch_array($sql);
$pseudo = stripslashes($pseudo);
$prenom = stripslashes($prenom); ...
This function will check if a variable contains only alpha-num characters or not, as you can see on this regex
ereg("[a-zA-Z0-9]+$", $eid) the programmer has forget to add begin check `^`. Remote attackers can bypass the
validation by adding any own special character like (+,--,#,% ) followed by the string to validate the above condition.
The security risk of the sql injection vulnerability is estimated as high.
Vulnerability Laboratory [Research Team] - Karim H.B. (firstname.lastname@example.org)
The information provided in this advisory is provided as it is without any warranty. Vulnerability-Lab disclaims all warranties,
either expressed or implied, including the warranties of merchantability and capability for a particular purpose. Vulnerability-
Lab or its suppliers are not liable in any case of damage, including direct, indirect, incidental, consequential loss of business
profits or special damages, even if Vulnerability-Lab or its suppliers have been advised of the possibility of such damages. Some
states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation
may not apply.
Domains: www.vulnerability-lab.com - www.vuln-lab.com
Contact: email@example.com - firstname.lastname@example.org - email@example.com
Section: video.vulnerability-lab.com - forum.vulnerability-lab.com - news.vulnerability-lab.com
Social: twitter.com/#!/vuln_lab - facebook.com/VulnerabilityLab - youtube.com/user/vulnerability0lab
Any modified copy or reproduction, including partially usages, of this file requires authorization from Vulnerability Laboratory.
Permission to electronically redistribute this alert in its unmodified form is granted. All other rights, including the use of other
media, are reserved by Vulnerability-Lab Research Team or its suppliers. All pictures, texts, advisories, sourcecode, videos and
other information on this website is trademark of vulnerability-lab team & the specific authors or managers. To record, list (feed),
modify, use or edit our material contact (firstname.lastname@example.org or email@example.com) to get a permission.
Copyright © 2012 Vulnerability-Lab
VULNERABILITY RESEARCH LABORATORY TEAM