[Video] Proof of Concept: CVE-2018-2894 Oracle WebLogic RCE


A recent vulnerability was sent in to Crowdsource affecting Oracle WebLogic Server. The vulnerability is an unauthenticated remote code execution (RCE) that is easily exploited. In this article we will go through the technical aspects of the Oracle WebLogic RCE vulnerability and its exploitation.

Proof of concept video:

How the exploit works:

The vulnerability is affecting the Web Services (WLS) subcomponent. The path: /ws_utc/config.do (on port 7001) is by default reachable without any authentication, however this pages is only available in development mode. In order to make this vulnerability exploitable, the attacker needs to set a new Work Home Dir which has to be writable. The path: servers/AdminServer/tmp/_WL_internal/com.oracle.webservices.wls.ws-testclient-app-wls/4mcj4y/war/css works for this. After the new writable Work Home Dir is sat, it is then possible to upload a JSP file in the Security tab.

Image: The interface where it is possible to save a Work Home Dir which will be the path where JKS keystores will be saved.

The page lets an attacker upload JKS Keystores which are Java Server Pages (JSP) files. These uploaded files are then possible to access and execute. Then it is possible to do a file upload as a multipart/form-data to the path: ws_utc/resources/setting/keystore The server will then respond with XML containing the keyStoreItem ID which is used to reach the uploaded file in the format of: /ws_utc/css/config/keystore/1582617386107_filename.jsp

[Video] Proof of Concept: CVE-2018-2894 Oracle WebLogic RCE
Image: After a successful upload of a JKS Keystore the response will contain its ID.

Impact:

If a hacker acts upon this vulnerability, they may be able to completely compromise the server. However, due to the test page only existing in development mode, it is very important to check that your WebLogic server is not running in development mode. In some cases the port 7001 is filtered and therefore not reachable on the Internet.

For an attacker it is very easy to detect this vulnerability. WebLogic is easily fingerprinted (with its Server header) and a quick search on Shodan shows that there are many instances open on the Internet.

Additional information:

Questions or comments? Let us know in the section below.

Begin a scan for the latest vulnerabilities today. Start a free trial with Detectify here!

Detectify is a continuous web scanner monitor service that can be set up for automated scanning for 1000+ known vulnerabilities including the OWASP Top 10. Check for the latest vulnerabilities!


Written by Krisitian Bremberg
Edited by Jocelyn Chan



Source link