Skip to main content

Arbitrary file upload and RCE in Wonder CMS - CVE-2017-14521

By- Samrat Das

Hi Readers

Recently in one of my pentest research, I found a CMS " WonderCMS" hosted in github.
Curious to explore its functionalities, I downloaded and set it up in my local system.

After fiddling with the source code, I found that it did not have any kind of file upload security mechanism and allowed the user to upload any file type! After reporting it to them, I did not receive any security relevant response, hence decided to publish a blog on this.

Title of the Vulnerability:  Arbitrary File Upload
Vulnerability Class: Security Misconfiguration
Technical Details & Description: The application source code is coded in a way which allows arbitrary file extensions to be uploaded. This leads to uploading of remote shells/ malicious Trojans which can lead to complete system compromise and server takeover.
CVE ID allocated:  CVE-2017-14521
Product & Service Introduction: Wonder CMS 2.3.1
WonderCMS is an open source CMS (Content Management System) built with PHP, jQuery, HTML and CSS (Bootstrap responsive).

WonderCMS doesn't require any configuration and can be simply unzipped and uploaded to your server/hosting provider. All data is saved to a text file (JSON format) which is easily copied, moved, backed up and restored. WonderCMS runs on less than 50 functions and 850 lines of code and 5 files.

Steps to Re-Produce –
1.       Visit the file upload function page after logging in.
2.       Pass any text file your choice
3.       Intercept the request and tamper the values to pass any exe/ php file of your choice.
4.       Observe the request passing through interception proxy showing the file being passed in the request
5.       Proceed and you will receive a file uploaded successfully message
6.       To confirm, logon to the hosting server directory and see the file uploaded

Exploitation Technique: Any backdoor file or shell can be uploaded to get access to the uploaded file on remote server and data can be exfiltrated.
Severity Level: Critical
Security Risk:
The presence of an actual malicious file can compromise the entire system leading to system takeover/ data stealing

Affected Product Version: 2.3.1
Solution - Fix & Patch: The application code should be configured in such a way, that it should block uploading of malicious files extensions such as exe/ php and other extensions with a thorough server as well as client validation.

Here are the step by step method of the attack method:








Comments

  1. Nice blog thanks for shareing instersting information about commodity trading.

    commodity trading tips

    ReplyDelete
  2. If you are looking for premiere CMS system development, EX Squared is the only name you can trust. Our team of expert developers can create custom solutions to fit the unique needs of your business.

    ReplyDelete

Post a Comment

Popular posts from this blog

Web Services/ API Penetration Testing Part - 1

Hi Readers, today we will learn about another interesting part of Penetration Testing, this revolves around Security assessments of web services.
To start with let’s take a look at what web services are made of:
A web service is software composed of standardized XML messaging system.
The benefit of web services are since all of its communication is in XML, they are not restricted to any  operating system or programming languages
They are built on Web services are built on top of open standards such as TCP/IP, HTTP, Java, HTML, and XML.
Anatomy of Web Services
In simple language, any basic web services platform is a combination of XML and HTTP. They can be of: ·SOAP (Simple Object Access Protocol)·UDDI (Universal Description, Discovery and Integration)·WSDL (Web Services Description Language)

How does a Web Service Work
Web services depends on •             XML to tag the data ( as markup and syntax) •             SOAP to transfer a message •             WSDL to describe the availabilit…

Thick Client Penetration Testing Tutorials - Part 3 ( Java Deserialization Exploit to RCE)

Thick Client Penetration Testing – 3 (Java Deserialization Exploit: Remote Code Execution)
Welcome Readers, in the previous two blogs, we have learnt about the various test cases as well as setting up traffic for thick clients using interception proxy. Among the plethora of test cases out here, one particularly interesting is about “Remote Code Execution on thick clients”. For this particular RCE, among one of the thick clients I was testing, it was based on Java Application. While researching possible exploits, I noticed that there are custom deserialization methods in Apache commons-collections which has a particular “reflection logic”. This can be particularly exploited which can lead to remote command injection as well as lethal arbitrary code execution. All applications which are java based and perform serialization/ deserialization with untrusted data to deserialize having “commons-collections” in its classpath can be exploited to run arbitrary code! For starters, let’s cover a few …

HTML Injection- October CMS - CVE-2018-7198

HTML Injection- October CMS

By- Samrat Das
Hi Readers,
Recently while performing some open source security assessment, I came across an CMS Application, “October CMS” . Curious to explore its functionalities, I set up a local copy and started playing around to find security vulnerabilities’.
Title of the Vulnerability:HTML Injection.
Vulnerability Class: Code Execution/ Information Stealing
Technical Details & Description: The application source code is coded in a way which allows malicious HTML commands to be executed in the inner pages which can lead to execution of arbitrary code.
CVE ID allocated: -  CVE-2018-7198

Product & Service Introduction: October CMS
Steps to Re-Produce – 1.Visit the application 2.Visit the Add Posts Page. 3.Goto edit function and add any html payload, it gets saved and executed further in web page.
Exploitation Technique: A attacker can perform application defacing to information stealing.
Severity Level: High
Security Risk: The presence of such a risk ca…