Visit our newest sister site!
Hundreds of free aircraft flight manuals
Civilian • Historical • Military • Declassified • FREE!

TUCoPS :: Web :: PHP :: bt180.txt

More and More SQL injection on PHP-Nuke 6.5.

|                             7 A 6 9 - A d v                          C: 0=
|                        [ PHP-Nuke SQL injection ]
                                                                | 13/05/200=
3 |


        + Tipy:         SQL injection.

        + Software:     PHP-Nuke

        + Verions:     6.x (including 6.5) y 5.x

        + Exploit:      Yes

        + Author:        Albert Puigsech Galicia

        + Contact:


        PhpNuke is a well known content management system programed
in PHP by Francisco Bucci, a lot of people use it because it is very
easy to install and manage.


        The PHP-Nuke's file download module includes SQL injection features
(as usual). The web user may be able to insert his own SQL code in most of
the numeric values included in querys, because the plugin coder didn't use
inverted comas.


        If the SQL agent allow us to use an UNION sentence (like MySQL 4
does) it is possible to extract information about anything inside the
database, of course this includes passwords, personal data, etc. Otherwise,
without UNION posibility we can't access to other SQL tables that web links
management, so the only posiblity is to play with hits and votes.

        Some examples:

        [*] On getit function:

    sql_query("update ".$prefix."_downloads_downloads set hits=3Dhits+1 WHE=
lid=3D$lid", $dbi);
        $result =3D sql_query("SELECT url FROM ".$prefix."_downloads_downlo=
WHERE lid=3D$lid", $dbi);

        [*] On search function:

    $result =3D sql_query("SELECT lid, cid, title, url, description, date, =
downloadratingsummary, totalvotes, totalcomments, filesize, version, homepa=
=46ROM ".$prefix."_downloads_downloads WHERE title LIKE '%$query%' OR
description LIKE '%$query%' ORDER BY $orderby LIMIT $min,$downloadsresults",

	[*] Vim index.php... There are a lot.


        There is no patch for this vulnerability. But is easy to add invert=
comas on all numeric values.


        I realy sorprised about PHP-Nuke usage. I can't understand that a
software with PHP-Nuke's security historial may be used. Lot of
vulnerabilty have been discovered on this software in last months, and there
are more bug.

	Recomandation for PHP-Nuke users: Migrate!

	The are a lot of CMS coded with security in mind, slashcode, scoop (writen=
perl), postnuke, xsphpcms(nice) (wrinten in php).... and more.

  Albert Puigsech Galicia

TUCoPS is optimized to look best in Firefox® on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2015 AOH