Document Title: =============== Kleefa v1.7 (IR) - Multiple Web Vulnerabilities References (Source): ==================== http://www.vulnerability-lab.com/get_content.php?id=1677 Release Date: ============= 2016-01-23 Vulnerability Laboratory ID (VL-ID): ==================================== 1677 Common Vulnerability Scoring System: ==================================== 8.3 Product & Service Introduction: =============================== What is Klyfa? In fact, a very advanced script to create the Upload Center and create a service for uploading and downloading files Klyfa a number of free and commercial templates and extensions addition Klyfa has a website and forum Persian strong support that distinguishes it with the other scripts. (Copy of the Vendor Homepage: http://kleefa.ir/ ) Abstract Advisory Information: ============================== An independent vulnerability laboratory research group discovered multiple vulnerabilities in the official Kleefa v1.7 content management system. Vulnerability Disclosure Timeline: ================================== 2016-01-23: Public Disclosure (Vulnerability Laboratory) Discovery Status: ================= Published Affected Product(s): ==================== Klyja Product: Kleefa - Content Management System 1.7 Exploitation Technique: ======================= Remote Severity Level: =============== High Technical Details & Description: ================================ 1.1 A remote sql injection web vulnerability has been discovered in the official Kleefa v1.7 Content Management System. The vulnerability allows remote attackers to execute own sql commands to compromise the web-applicaation or connected dbms. An attacker might execute arbitrary SQL commands on the database server with this vulnerability. User tainted data is used when creating the database query that will be executed on the database management system (DBMS). An attacker can inject own SQL syntax thus initiate reading, inserting or deleting database entries or attacking the underlying operating system depending on the query, DBMS and configuration. The security risk of the sql injection vulnerability is estimated as high with a cvss (common vulnerability scoring system) count of 8.3. Exploitation of the remote sql injection web vulnerability requires no user interaction or privileged web-application user account. Successful exploitation of the remote sql injection results in database management system, web-server and web-application compromise. Request Method(s): [+] GET Vulnerable File(s): [+] index.php > (mysqli.php) Vulnerable Parameter(s): [+] id 1.2 A client-side xss web vulnerability has been discovered in the official Kleefa v1.7 Content Management System. A vulnerability allows remote attackers to inject malicious script codes on the client-side of the affected web-application. An attacker might execute arbitrary HTML/JavaScript Code in the clients browser context with this security vulnerability. User tainted data is embedded into the HTML output by the application and rendered by the users browser, thus allowing an attacker to embed and render malicious code. Preparing a malicious link will lead to an execution of this malicious code in another users browser context when clicking the link. This can lead to local website defacement, phishing or cookie stealing and session hijacking. The security risk of the client-side web vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 3.3. Exploitation of the non-persistent web vulnerability requires a no privilege web-application user account and low or medium user interaction. Successful exploitation results in session hijacking, non-persistent phishings attacks, non-persistent external redirect and malware loads or non-persistent manipulation of affected or connected module context. Request Method(s): [+] GET Vulnerable Module(s): [+] $_GET + echo() Affected File(s): [+] index.php Vulnerable Parameter(s): [+] name Proof of Concept (PoC): ======================= 1.1 Blind SQL Injection The sql injection web vulnerabilities can be exploited by remote attackers without privileged web-application user account or user interaction. For security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue. File: /includes/mysqli.php PoC: Demonstration $_GET + mysqli_query() = SQL Injection vulnerability Vulnerable Code: (Review) mysql_query("SELECT * FROM users WHERE id = " . $_GET["id"]); 161: mysqli_query mysqli_query($this->connect_id, $query); // mysqli.php 132: ? function query($query, $transaction = false) Requirements: 145: if(!empty($query)) PoC: Exploitation /index.php?id=1 OR 1=1--[SQL INJECTION VULNERABILITY!]- 1.2 Cross-Site Scripting The client.side cross site scripting web vulnerability can be exploited by remote attackers without privileged web-application user account and with low user interaction. For security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue. File: /do.php PoC: Demonstration $_GET + echo() = Cross-Site Scripting vulnerability Vulnerable Code: (Review) print ("Hello " . $_GET["name"]); PoC: Exploitation /index.php?name= /index.php?name=">" Solution - Fix & Patch: ======================= 1.1 The vulnerability can be patched by usage of a prepared sql statement when processing to request. 1.2 The client-side cross site scripting web vulnerability can be patched by a secure parse and encode of the vulnerable name value in the index.php file. Restrict the input and disallow special chars. Security Risk: ============== 1. The security risk of the remote sql injection web vulnerabilities in the web-application are estimated as high. (CVSS 8.3) 2. The security risk of the cross site scripting web vulnerabilities in the web-application are estimated as medium. (CVSS 3.3) Credits & Authors: ================== Iran Cyber Security Group - (ICG SEC) Disclaimer & Information: ========================= 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. We do not approve or encourage anybody to break any vendor licenses, policies, deface websites, hack into databases or trade with fraud/stolen material. Domains: www.vulnerability-lab.com - www.vuln-lab.com - www.evolution-sec.com Contact: admin@vulnerability-lab.com - research@vulnerability-lab.com - admin@evolution-sec.com Section: magazine.vulnerability-db.com - vulnerability-lab.com/contact.php - evolution-sec.com/contact Social: twitter.com/#!/vuln_lab - facebook.com/VulnerabilityLab - youtube.com/user/vulnerability0lab Feeds: vulnerability-lab.com/rss/rss.php - vulnerability-lab.com/rss/rss_upcoming.php - vulnerability-lab.com/rss/rss_news.php Programs: vulnerability-lab.com/submit.php - vulnerability-lab.com/list-of-bug-bounty-programs.php - vulnerability-lab.com/register/ 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, source code, 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 (admin@vulnerability-lab.com or research@vulnerability-lab.com) to get a permission. # Iranian Exploit DataBase = http://IeDb.Ir [2016-01-31]