WebLogic - CVE-2023-21839

Weblogic CVE-2023-21839 RCE over T3 and IIOP

Test Data

Version
Docker Image
Status

14.1.1.0

container-registry.oracle.com/middleware/weblogic:14.1.1.0

Vulnerable

12.2.1.4

container-registry.oracle.com/middleware/weblogic:12.2.1.4

Vulnerable

12.2.1.3

container-registry.oracle.com/middleware/weblogic:12.2.1.3

Vulnerable

12.2.1.3

vulhub/weblogic:12.2.1.3

Vulnerable

12.2.1.3

vulhub/weblogic:12.2.1.3-2018

Vulnerable

10.3.6.0

vulhub/weblogic:10.3.6.0-2017

Vulnerable

Golang - IIOP

IIOP is a TCP/IP protocol stack that implements the GIOP protocol, allowing CORBA objects to communicate and interact over the Internet.

RMI-IIOP is a way of implementing the Java remote method invocation (RMI) protocol, which extends the IIOP protocol with the functionality of remote calling Java objects through RMI.

  1. No Java dependency is required, construct the protocol and directly RCE through socket

  2. The NAT network problem of IIOP has been solved (Docker and public network targets can be tested)

  3. Tested in Windows/Mac OS/Linux and WebLogic 12/14

  4. Please use JDK 8u191 or below to start WebLogic and build JNDI Server by yourself

Exploiting VulnHub 12.2.1.3-2018

Clone repo and build exploit:

Run the exploit:

Response in Burp Collaborator:

Burp Collaborator callback indicating a successful exploit attempt

Running the exploit against a patched target we get the following error:

Panic or other errors means that the target is not vulnerable. In this example it's because the IIOP function is disabled.


Java - T3

WebLogic's implementation of the RMI specification uses a proprietary protocol known as T3. You can think of T3 (and secure T3S) as a layer to expose/allow JNDI calls by clients.

T3 is the protocol used to transport information between WebLogic servers and other types of Java programs.

Exploiting from WebLogic 12.2.1.4 container

Burp Collaborator callback from executing the exploit

Exploiting from from host

I am unable to use this exploit from my host system. I assume it's because Java version and/or dependencies.


Patch

The easiest way to patch this is by disabling IIOP in WebLogic Console.

Servers > Control > AdminServer > Protocols > IIOP > Uncheck "Enable IIOP"

Restart the WebLogic Server for the changes to take place.

Running the exploit we now get the following error:

Reading the logs we can see it is "because the incoming protocol iiop is not enabled", and we've successfully eliminated the attack vector.

Last updated

Was this helpful?