exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Joomla Canteen 1.0 SQL Injection / Local File Inclusion

Joomla Canteen 1.0 SQL Injection / Local File Inclusion
Posted Jul 6, 2010
Authored by Salvatore Fresta

The Joomla Canteen component version 1.0 suffers from local file inclusion and remote SQL injection vulnerabilities.

tags | exploit, remote, local, vulnerability, sql injection, file inclusion
SHA-256 | 926863ed26f5ea997647455e659ddd146e7ec968b9b369d39b1576b6916369ce

Joomla Canteen 1.0 SQL Injection / Local File Inclusion

Change Mirror Download
Canteen Joomla Component 1.0 Multiple Remote Vulnerabilities

Name Canteen
Vendor http://www.miniwork.eu
Versions Affected 1.0

Author Salvatore Fresta aka Drosophila
Website http://www.salvatorefresta.net
Contact salvatorefresta [at] gmail [dot] com
Date 2010-04-07

X. INDEX

I. ABOUT THE APPLICATION
II. DESCRIPTION
III. ANALYSIS
IV. SAMPLE CODE
V. FIX


I. ABOUT THE APPLICATION

Canteen is a Joomla 1.5 component.
This component is written for canteens. You can easily
manage daily menu with this component.


II. DESCRIPTION

Some parameters are not sanitised before being used in
SQL queries and in danger PHP's functions.


III. ANALYSIS

Summary:

A) Local File Inclusion
B) Multiple Blind SQL Injection


A) Local File Inclusion

The controller parameter in canteen.php is not sanitised
before being used in the PHP function's require_once().
This allows a guest to include local files. The following
is the affected code:

if($controller = JRequest::getVar('controller')) {
require_once (JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php');
}


B) Multiple Blind SQL Injection

The meailid parameter in menu.php is not properly
before being used in multiple SQL queries. This can be
exploited to manipulate SQL queries by injecting
arbitrary SQL code. The following is the affected code:


$mealid = JRequest::getVar('mealid');
$SQLQuery = "INSERT INTO #__miniwork_canteen_order (jo_userid, jo_mealid, jo_created, jo_createdby, jo_changed, jo_changedby)
VALUES (".$user->id.", ".$mealid.", NOW(), '".$user->sSecondName." ".$user->sFirstName."', NOW(), '".$user->sSecondName." ".$user->sFirstName."')";


$mealid = JRequest::getVar('mealid');
$SQLQuery = "DELETE FROM #__miniwork_canteen_order WHERE jo_mealid = ".$mealid." AND jo_userid = ".$orduser->id.";";


$mealid = JRequest::getVar('mealid');
$SQLQuery = "UPDATE #__miniwork_canteen_order SET jo_userid = ".$orduser->id.", jo_changed=NOW(), jo_changedby='".$orduser->sSecondName." ".$orduser->sFirstName."' WHERE jo_mealid=".$mealid." AND jo_userid is null LIMIT 1;";


IV. SAMPLE CODE

A) Local File Inclusion

http://site/path/index.php?option=com_canteen&controller=../../../../../etc/passwd%00�


V. FIX

Checking for path traversal sequence and useing of PHP
function's intval() for integer values.

Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close