Skip to content
KitploitKITPLOIT
HerramientasBlog
Enviar
HerramientasBlog
Enviar

¡Herramientas de Hacking, PenTest y Ciberseguridad para tu Arsenal de Seguridad!

Kitploit es un directorio de herramientas de hacking, ciberseguridad y pentesting. Descubre las últimas actualizaciones de proyectos para encontrar vulnerabilidades, analizar sistemas, automatizar pruebas y fortalecer tu seguridad.

··Feeds·Contacto·Privacidad·© 2026 Kitploit

Directorio de Herramientas

Categorías

Ver todas las categorías
Loading categories
copy-fail — Prueba de concepto en Python para CVE-2026-31431, que explota el kernel AF_ALG para modificar la caché de páginas de binarios SUID y obtener una shell root en sistemas Linux. | Kitploit
Herramientas/GitHubGitHub/juguitos/copy-fail
Escalada de PrivilegiosFrameworks de ExploitsExplotaciónPruebas de PenetraciónDesarrollo de PayloadsExplotación de Binarios
GitHubjuguitos/copy-fail

copy-fail

Prueba de concepto en Python para CVE-2026-31431, que explota el kernel AF_ALG para modificar la caché de páginas de binarios SUID y obtener una shell root en sistemas Linux.

Ver Repositorio
22hace 3 mesesAún no revisado

Más Populares

Ver todos →

Descubre las herramientas más usadas por nuestra comunidad.

Explora todas las herramientas

Explora nuestra colección de herramientas

Ver todas las herramientas →
Compartir

Copy Fail PoC

English

Python PoC for CVE-2026-31431, intended for controlled laboratory testing on authorized Linux systems.

For use only in your own environments, labs, or systems where you have explicit permission. Do not run this code against third-party systems.

Description

copy-fail.py checks whether algif_aead is available through the kernel AF_ALG interface and, if the system is compatible with the technique tested by this PoC, attempts to modify the page cache of a target SUID binary to launch an interactive PTY shell.

The script includes payloads for:

  • x86_64
  • i686
  • aarch64

Demo

Requirements

  • Linux.
  • Python 3.10 or newer.
  • Local access to the test system.
  • Kernel support for AF_ALG and algif_aead.
  • A readable target SUID binary. The default target is /usr/bin/su.

No external Python dependencies are required; the script only uses standard library modules.

Usage

Show help:

root@kitploit:~
python3 copy-fail.py --help

Run with the default target (/usr/bin/su):

root@kitploit:~
python3 copy-fail.py

Use another SUID binary as the target:

root@kitploit:~
python3 copy-fail.py --target /usr/bin/newgrp

Run a specific command as root:

root@kitploit:~
python3 copy-fail.py --exec /bin/bash

Disable automatic terminal setup:

root@kitploit:~
python3 copy-fail.py --no-setup

Show the project version:

root@kitploit:~
python3 copy-fail.py --version

Options

Runtime Checks

Before running the main flow, the script attempts to create and bind an AF_ALG socket with:

root@kitploit:~
authencesn(hmac(sha256),cbc(aes))

If algif_aead is not available, the program exits without continuing.

Safe Tests

The test suite only covers inert CLI paths such as --help and --version. It does not execute the PoC flow.

root@kitploit:~
python3 -m unittest discover -s tests

Tested On

  • Ubuntu 24.04
  • RHEL 14.3
  • SUSE Linux Enterprise 16
  • Debian 13

Security Notes

  • Run it only on disposable machines or lab environments.
  • Behavior depends on the kernel, architecture, and available SUID binaries.
  • The PoC manipulates system page cache memory during the test; avoid running it on production machines.
  • Review and understand the code before executing it.

Project Files

  • copy-fail.py: complete PoC implementation and CLI.
  • tests/test_cli.py: safe CLI smoke tests.
  • SECURITY.md: security policy and reporting scope.
  • DISCLAIMER.md: authorized-use disclaimer.
  • CHANGELOG.md: release history.
  • CONTRIBUTING.md: contribution guidelines.
  • LICENSE: MIT license.

License

MIT License — Copyright (c) 2026 Juguitos

Español

PoC en Python para CVE-2026-31431, orientado a pruebas controladas de laboratorio en sistemas Linux autorizados.

Uso exclusivo en entornos propios, de laboratorio o con permiso explícito. No ejecutes este código contra sistemas de terceros.

Descripción

copy-fail.py verifica la disponibilidad de algif_aead mediante la interfaz AF_ALG del kernel y, si el sistema es compatible con la técnica probada por el PoC, intenta modificar la page cache de un binario SUID objetivo para lanzar una shell con PTY interactiva.

El script incluye payloads para:

  • x86_64
  • i686
  • aarch64

Demo

Requisitos

  • Linux.
  • Python 3.10 o superior.
  • Acceso local al sistema de pruebas.
  • Soporte de kernel para AF_ALG y algif_aead.
  • Un binario SUID objetivo legible. Por defecto usa /usr/bin/su.

No requiere dependencias externas de Python; usa módulos de la biblioteca estándar.

Uso

Mostrar ayuda:

root@kitploit:~
python3 copy-fail.py --help

Ejecutar con el objetivo por defecto (/usr/bin/su):

root@kitploit:~
python3 copy-fail.py

Usar otro binario SUID como objetivo:

root@kitploit:~
python3 copy-fail.py --target /usr/bin/newgrp

Ejecutar un comando específico como root:

root@kitploit:~
python3 copy-fail.py --exec /bin/bash

Deshabilitar la configuración automática de terminal:

root@kitploit:~
python3 copy-fail.py --no-setup

Mostrar la versión del proyecto:

root@kitploit:~
python3 copy-fail.py --version

Opciones

Comprobaciones que realiza

Antes de ejecutar el flujo principal, el script intenta crear y enlazar un socket AF_ALG con:

root@kitploit:~
authencesn(hmac(sha256),cbc(aes))

Si algif_aead no está disponible, el programa termina sin continuar.

Pruebas seguras

La suite de pruebas solo cubre rutas inertes de CLI como --help y --version. No ejecuta el flujo del PoC.

root@kitploit:~
python3 -m unittest discover -s tests

Probado en

  • Ubuntu 24.04
  • RHEL 14.3
  • SUSE Linux Enterprise 16
  • Debian 13

Notas de seguridad

  • Ejecútalo solo en máquinas desechables o entornos de laboratorio.
  • El comportamiento depende del kernel, la arquitectura y los binarios SUID disponibles.
  • El PoC manipula memoria de cache del sistema durante la prueba; evita usarlo en equipos de producción.
  • Revisa y entiende el código antes de ejecutarlo.

Archivos del proyecto

  • copy-fail.py: implementación completa del PoC y CLI.
  • tests/test_cli.py: pruebas seguras de la CLI.
  • SECURITY.md: política de seguridad y alcance de reportes.
  • DISCLAIMER.md: aviso de uso autorizado.
  • CHANGELOG.md: historial de cambios.
  • CONTRIBUTING.md: guía de contribución.
  • LICENSE: licencia MIT.

Licencia

Licencia MIT — Copyright (c) 2026 Juguitos

Descargar herramienta
OptionDescription
-t, --target PATHTarget SUID binary. Default: /usr/bin/su.
-e, --exec CMDCommand to run as root. Must be provided as a full path.
--no-setupDisables automatic terminal environment setup.
--versionShows the project version.
-h, --helpShows the program help.
OpciónDescripción
-t, --target PATHBinario SUID objetivo. Default: /usr/bin/su.
-e, --exec CMDComando a ejecutar como root. Debe indicarse con ruta completa.
--no-setupDeshabilita la configuración automática del entorno de terminal.
--versionMuestra la versión del proyecto.
-h, --helpMuestra la ayuda del programa.