多架构权限提升工具包,包含 24 个漏洞利用(amd64 预编译;其他架构在运行时通过 gcc 编译)。支持 amd64、arm64、386、mips、mipsle、mips64 和 mips64le。检测内核版本,过滤已修补的漏洞利用,并按顺序依次尝试,直到获得 root 权限。
# run directly (no gcc needed on target if pre-compiled binaries are embedded)
./lpe-toolkit
# dry-run: show exploit plan without executing
./lpe-toolkit --dry-run
# skip specific exploits
./lpe-toolkit --skip "dirtyfrag,dirtypipe"
# execute a command once root is achieved and show its output
./lpe-toolkit -c "id"
# silent automation: suppress all output except the command result
./lpe-toolkit -q -c "whoami"
# verbose output (includes exploit stdout/stderr)
./lpe-toolkit -v
| 标志 | 描述 |
|---|---|
--dry-run | 显示哪些漏洞利用可用/被跳过 |
--just-build | 解析所有漏洞利用,打印路径后退出(便于打包) |
--skip LIST | 以逗号分隔的、要跳过的漏洞利用名称 |
-c, --command CMD | 以 root 身份执行 CMD,而不是生成交互式 shell |
-q, --quiet | 抑制工具包消息;仅显示 root shell 输出或 unsuccessful in getting root |
-v, --verbose | 在输出中包含漏洞利用的 stdout/stderr(与 -q 互斥) |
注意: -v 与 -q 互斥——如果同时指定,工具包将以错误退出。
# native build (pre-compile C exploits then embed in Go binary)
make
# cross-compile for all architectures (native arch's C exploits only)
make build-all
# run directly from source (compile exploits on target at runtime)
make run-source
# clean build artifacts
make clean
依赖:Go 1.21+、gcc,以及目标架构的交叉编译器:
aarch64-linux-gnu-gcci686-linux-gnu-gccmips-linux-gnu-gccmipsel-linux-gnu-gccmips64-linux-gnuabi64-gccmips64el-linux-gnuabi64-gcc--just-build 标志会解析所有可用的漏洞利用并打印其路径。可以用它来验证运行时将有哪些可用。
每个发布版的预编译二进制归档包含一个静态链接的 Go 二进制,其中嵌入了 C 漏洞利用。所有漏洞利用均已为所有架构预编译。
toolkit.go: 核心漏洞利用定义、内核版本解析、二进制解析、GTFOBins sudo 滥用处理程序、用于非交互式命令执行的 execCommandAsRoot()、msg()/say() 详细输出辅助函数main.go: CLI 入口点,包含标志(-c、-q、-v、--skip、--dry-run、--just-build)和信号处理build-exploits.sh: C 漏洞利用的交叉编译脚本exploits/: C 源码文件,以及通过 //go:embed 嵌入的预编译二进制cve_2026_41651.c: 添加了 Pack2TheRoot —— 原始 D-Bus 客户端(无 libdbus)利用 PackageKit InstallFiles 的 SIMULATE/NONE 标志竞争,以触发 root 权限的 postinst 执行,并在 /var/tmp/.suid_bash 放置 setuid-root 的 bash
修复了 parseKernelVersion:添加了 parseIntPrefix,以在比较内核版本时处理 -rcN 后缀
用正确的 J-jaeyoung 架构重写了 bad_epoll.c:两对 epoll、通过 3000+ 等待者进行 timerfd IRQ 拓宽、深度 3 的 oracle、共享变量上的获取/释放原子操作
所有漏洞利用(包括仅泄漏/仅 PoC 的)现在都会生成 root shell 或执行所请求的命令
cve_2026_46333.c: 添加了 try_passwd_root() —— 从 passwd 窃取可写的 /etc/shadow 文件描述符,写入已知的密码哈希,然后生成 su -;回退到仅泄漏的方法
cve_2025_38352.c: 添加了 dirtypipe 风格的 splice() 覆盖 /etc/passwd → → 生成
OFF_* 和 PIVOT* 定义。需要 /proc/kallsyms(kptr_restrict=0)。请在未修补的内核上运行——该修复(提交 a6dc643c6931,增加了 ep_clear_and_put)已反向移植到许多发行版,包括 Ubuntu 22.04 的 6.8 HWE。| # | 名称 | 目标 | 类型 |
|---|
| 1 | Copy Fail CVE-2026-31431 | AF_ALG + splice 页缓存写入 | 预编译 / 编译 |
| 2 | Dirty Frag CVE-2026-43284 | xfrm-ESP/RxRPC 页缓存写入 | 预编译 / 编译 |
| 3 | Fragnesia CVE-2026-46300 | espintcp splice 页缓存破坏 | 预编译 / 编译 |
| 4 | DirtyDecrypt CVE-2026-31635 | rxgk 页缓存写入 | 预编译 / 编译 |
| 5 | Fragnesia v2 | skb_segment GRO 合并 | 预编译 / 编译 |
| 6 | PinTheft | RDS zerocopy + io_uring 页缓存覆盖 | 预编译 / 编译 |
| 7 | Dirty Pipe CVE-2022-0847 | /etc/passwd 页缓存覆盖 | 预编译 / 编译 |
| 8 | CIFSwitch CVE-2026-46243 | cifs.spnego + NSS 命名空间混淆 | 预编译 / 编译 |
| 9 | PwnKit CVE-2021-4034 | pkexec 环境变量逃逸 | 预编译 / 编译 |
| 10 | OverlayFS CVE-2021-3493 | 用户命名空间挂载逃逸 | 预编译 / 编译 |
| 11 | OvFS+FUSE CVE-2023-0386 | FUSE 挂载逃逸 | 预编译 / 编译 |
| 12 | Pack2TheRoot CVE-2026-41651 | PackageKit D-Bus 竞争 → setuid root | 预编译 / 编译 |
| 13 | Polkit D-Bus CVE-2021-3560 | accounts-daemon 竞争 | 预编译 / 编译 |
| 14 | Docker Socket | 可写的 /var/run/docker.sock | 预编译 / 编译 |
| 15 | netfilter OOB CVE-2021-22555 | ip_tables 破坏 | 预编译 / 编译 |
| 16 | nft UAF2 CVE-2022-2586 | nftables 链 UAF | 预编译 / 编译 |
| 17 | pidfd race CVE-2026-46333 | ssh-keysign/shadow 文件描述符窃取 | 预编译 / 编译 |
| 18 | CPU Timer Race CVE-2025-38352 | POSIX 定时器竞争(PoC) | 预编译 / 编译 |
| 19 | nft UAF CVE-2024-1086 | Notselwyn 多文件 nftables | 预编译 / 编译 |
| 20 | PEdit COW CVE-2026-46331 | tc-pedit 页缓存覆盖 su | 预编译 / 编译 |
| 21 | DirtyClone CVE-2026-43503 | ESP-in-UDP TEE 页缓存 passwd | 预编译 / 编译 |
| 22 | Bad Epoll CVE-2026-46242 | epoll close-vs-close 竞争 UAF | 预编译 / 编译 |
| 23 | FUSE OOB CVE-2026-31694 | FUSE readdir 缓存越界 -> passwd | 预编译 / 编译 |
| 24 | GTFOBins | 80+ 种免密 sudo 技术 | Go 处理器 |
root::0:0:su -命令模式:页缓存漏洞利用使用 --corrupt-only 跳过交互式 PTY 桥接;execCommandAsRoot() 将命令通过管道传递给 su 的标准输入,以实现可靠的非交互式执行