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
Tools/GitHubGitHub/beatbeast007/linux-copyfail-c-version-cve-2026-31431
Privilege EscalationExploit FrameworksExploitationLearning & EducationBinary Exploitation
GitHubbeatbeast007/linux-copyfail-c-version-cve-2026-31431

Linux-CopyFail-C-Version-CVE-2026-31431

Clean C implementation of the Copy Fail Linux local privilege escalation exploit (CVE-2026-31431). Uses AF_ALG and splice to overwrite page cache of /usr/bin/su with setuid shellcode for root. Educational PoC.

Share
View Repository
4536 months agoNot yet reviewed

Linux CopyFail- C Version - CVE-2026-31431

Clean C version of Copy Fail (CVE-2026-31431) - Linux Local Privilege Escalation exploit using AF_ALG + authencesn + splice primitive. Overwrites the page cache of /usr/bin/su with a tiny setuid shellcode to gain root privileges. Educational proof-of-concept only.

Clean and readable C implementation of the Copy Fail Linux Local Privilege Escalation vulnerability (CVE-2026-31431).

This is a port of the original minified Python exploit.

** Warning**: This is a proof-of-concept for educational and research purposes only. Use only on systems you own or have explicit permission to test.

Features

  • Clean, well-commented C code
  • No Python dependency
  • Works on most Linux distributions affected by the bug (kernels since ~2017)
  • Uses AF_ALG + authencesn + splice() primitive

How It Works (Simple Explanation)

The exploit abuses a logic flaw in the Linux kernel's crypto subsystem (algif_aead). It allows an unprivileged user to write 4 controlled bytes into the page cache of any readable file (e.g. /usr/bin/su).

We overwrite the in-memory copy of /usr/bin/su with a tiny setuid shellcode that spawns a root shell.

Build & Run

image
git clone https://github.com/beatbeast007/Linux-CopyFail-C-Version-CVE-2026-31431
cd Linux-CopyFail-C-Version-CVE-2026-31431bash

make
sudo ./copyfail

Or manually:

gcc src/copyfail.c -o copyfail -lz -Wall -Wextra -O2
./copyfail

Tested On

  • Kali Linux
  • Ubuntu 24.04

Disclaimer

This exploit only modifies page cache (in memory). Reboot restores the original binary. Running it makes /usr/bin/su temporarily overwritten. Patch your kernel as soon as possible (check your distro security updates).

References

Official Writeup: https://xint.io/blog/copy-fail-linux-distributions Original Python PoC: https://github.com/theori-io/copy-fail-CVE-2026-31431

Legal

This repository is for educational purposes only. I am not responsible for any misuse.

LICENSE

MIT License

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.

    837
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    536
  • 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.

    424
  • 4

    redforge

    cybersecurity91/redforge

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

    355
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    294
  • 6

    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.

    276

Explore all tools

Browse our collection of tools

View all tools →