Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Vuln-Dev
[Top] [All Lists]

Sql injection in Mambo & Joomla

Subject: Sql injection in Mambo & Joomla
Date: Sat, 26 Aug 2006 01:48:20 +0430
Hi,
There are several sql injections in Mambo 4.6 RC2 & Joomla 1.0.10 (and maybe
other versions) :
[The codes are from Mambo 4.6 RC2 & some may be different in Joomla]

*) When a user edits a content, the "id" parameter is not checked properly
in /components/com_content/content.php, which can cause 2 sql injections .

*) The "limit" parameter in the administration section is not checked. This
affects many pages of administration section :

File /administrator/modules/mod_logged.php, Line 45 :
:: $query = "SELECT *"
:: . "\n FROM #__session"
:: . "\n WHERE userid != 0"
:: . $_and
:: . "\n ORDER BY usertype, username"
. "\n LIMIT $pageNav->limitstart, $pageNav->limit"
:: ;

Also :
File /administrator/components/com_content/admin.content.php, Line 212 :
::      . "\n LIMIT $pageNav->limitstart,$pageNav->limit"

And many others .

*) In the administration section, while editing/creating a user, the "gid"
parameter is not checked properly :

File /administrator/components/com_users/admin.users.php, Line 260 :
::      $query = "SELECT name"
::      . "\n FROM #__core_acl_aro_groups"
     . "\n WHERE group_id = $row->gid"

And the second injection :
File /includes/gacl_api.class.php, Line 675 :
:: $this->db->setQuery( '
::      SELECT          g.group_id,o.'. $group_type .'_id,gm.group_id AS member
::      FROM            '. $object_table .' o
     LEFT JOIN       '. $group_table .' g ON g.group_id='. $group_id .'
::      LEFT JOIN       '. $table .' gm ON (gm.group_id=g.group_id AND gm.'. 
$group_type .'_id=o.'. $group_type .'_id)
::      WHERE           (o.section_value=\''. 
$this->db->getEscaped($object_section_value) .'\' AND o.value=\''. 
$this->db->getEscaped($object_value) .'\')'
:: );

And the third :
File /includes/gacl_api.class.php, Line 704 :
:: $this->db->setQuery( 'INSERT INTO '. $table .' (group_id,'. $group_type 
.'_id) VALUES ('. $group_id .','. $object_id .')' );


The original and complete advisory (in Persian), is located at :
http://www.hackers.ir/advisories/mambo-joomla.html


- Omid

<Prev in Thread] Current Thread [Next in Thread>
  • Sql injection in Mambo & Joomla, Omid <=