Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
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.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
copyfail-rs — Copy Fail exploit (CVE-2026-31431) but in Rust. | Kitploit
Tools/GitHubGitHub/sammwyy/copyfail-rs
Privilege EscalationExploit FrameworksVulnerability AnalysisExploitationPayload DevelopmentBinary Exploitation
GitHubsammwyy/copyfail-rs

copyfail-rs

Copy Fail exploit (CVE-2026-31431) but in Rust.

View Repository
152406 months agoNot yet reviewed
Share

copyfail-rs

Copy Fail exploit (CVE-2026-31431) but in Rust, a critical vulnerability chaining AF_ALG and splice() to achieve a 4-byte page cache write, leading to local privilege escalation on major Linux distributions.

Based on the research and PoC by Xint Code.

Disclaimer

[!CAUTION] This project is for educational and research purposes only. Running this exploit on systems you do not own or have explicit permission to test is illegal and unethical. Use this code responsibly to understand and defend against similar vulnerabilities.

Features

  • Pure Rust: A high-performance, memory-safe implementation of the original Python PoC.
  • Dynamic ELF Builder: Programmatically constructs the exploit payload at runtime, allowing for custom commands.
  • Zero-Copy Exploitation: Directly interacts with the Linux kernel's AF_ALG and splice() syscalls via libc.
  • Customizable: Specify the command you want to run as root via CLI arguments.

Quick Start (One-liner)

You can download and run the pre-compiled PoC binary directly:

curl -L https://github.com/sammwyy/copyfail-rs/releases/download/poc/copyfail-rs_x86-64 -o copyfail-rs && chmod +x copyfail-rs && ./copyfail-rs

Prerequisites

  • A Linux kernel vulnerable to CVE-2026-31431 (typically kernels before the patch in April 2026).
  • Access to a target binary with read permissions (default is /usr/bin/su).

Installation

Clone the repository and build the binary:

git clone https://github.com/sammwyy/copyfail-rs.git
cd copyfail-rs
cargo build --release

Usage

Run the exploit without arguments to default to /bin/sh:

./target/release/copyfail-rs

Or specify a custom command to run as root:

./target/release/copyfail-rs "whoami > /tmp/pwned"

How it Works

The exploit leverages a bug in the authencesn implementation within the Linux kernel's Crypto API (AF_ALG). By chaining sendmsg with MSG_MORE and splice(), it's possible to overwrite small chunks of the page cache for arbitrary files (like /usr/bin/su) with a malicious ELF payload.

  1. Socket Setup: Creates an AF_ALG socket and binds to authencesn(hmac(sha256),cbc(aes)).
  2. Payload Generation: Constructs a minimal ELF in memory that executes the target command with root privileges.
  3. Cache Injection: Iteratively splices the payload into the target file's page cache using the AF_ALG vulnerability.
  4. Trigger: Executes the modified target file, running the injected shellcode.

References

  • Original Blog Post - Xint Code
  • CVE-2026-31431 Details
Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    708
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    500
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    398
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    341
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    259
  • 6

    antifox

    antifox-ai/antifox

    AI multi-agent autonomous penetration testing platform that runs recon, attack-surface discovery, exploitation validation and evidence-backed report delivery.

    257

Explore all tools

Browse our collection of tools

View all tools →