一、漏洞详情
影响版本weblogic 10.3.6.0、weblogic 12.1.3.0、weblogic 12.2.1.2、weblogic 12.2.1.3
WebLogic是美国Oracle公司出品的一个application server,确切的说是一个基于JAVAEE架构的中间件,WebLogic是用于开发、集成、部署和管理大型分布式Web应用、网络应用和数据库应用的Java应用服务器。将Java的动态功能和Java Enterprise标准的安全性引入大型网络应用的开发、集成、部署和管理之中。
WebLogic的某个上传点存在文件上传漏洞,导致可以上传任意jsp文件从而获取服务器权限。
二、复现过程
搭建docker环境
docker-compose up -d

访问http://192.168.239.128:7001/console

docker-compose logs | grep password
可以查看管理员账号和密码

管理员用户名为weblogic,密码为NM77cubp
使用账号和密码成功登录

登录后台,进行配置
点击base_domain的配置,在 ‘高级’ 中勾选 ‘启用 Web 服务测试页’ 选项,然后保存配置。


访问http://192.168.239.128:7001/ws_utc/config.do
将Work Home Dir设为
/u01/oracle/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_internal/com.oracle.webservices.wls.ws-testclient-app-wls/4mcj4y/war/css
ws_utc应用的静态文件css目录是无需访问权限的,而默认的工作目录即使上传成功,也无法访问。
如果不更改,访问会返回404
点击提交

上传木马,连接成功
点击“安全”——“添加”——上传木马

点击提交,名字随意

上传了两个文件,下面测试第二个test的
f12查看时间戳(id=1677669228778)
时间戳的主要 目的在于通过一定的技术手段,对数据产生的时间进行认证,从而验证这段数据在产生后是否经过篡改

访问http://192.168.239.128/ws_utc/css/config/keystore/[时间戳]_[文件名]
http://192.168.239.128:7001/ws_utc/css/config/keystore/1677669228778_1.jsp

哥斯拉连接成功

