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
CVE-2026-31431 — Ansible playbooks to check and mitigate CVE-2026-31431 on Linux hosts, with scripts for local, remote, and containerized environments, including CI/CD integration. | Kitploit
Herramientas/GitHubGitHub/eximiait/cve-2026-31431
Cloud Infrastructure SecurityVulnerability ScannersContainer SecurityConfiguration AuditingDevSecOps
GitHubeximiait/cve-2026-31431

CVE-2026-31431

Ansible playbooks to check and mitigate CVE-2026-31431 on Linux hosts, with scripts for local, remote, and containerized environments, including CI/CD integration.

Ver Repositorio
hace 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

CVE-2026-31431 (Copy Fail) Checker

Verifica si un host Linux es vulnerable a CVE-2026-31431 y aplica mitigación.

Archivos

  • check_cve_2026_31431.yml - Playbook de Ansible para verificar y parchear
  • revert_cve_2026_31431.yml - Playbook de Ansible para deshacer mitigación
  • run_check.sh - Script para ejecutar verificación local o remotamente
  • run_revert.sh - Script para deshacer cambios local o remotamente

Ejemplos de ejecución

1. Verificar vulnerabilidad (run_check.sh)

root@kitploit:~
./run_check.sh
# Seleccionar 'l' para local

O directamente:

root@kitploit:~
ansible-playbook -i "localhost," -c local --ask-become-pass check_cve_2026_31431.yml -v

2. Revertir cambios (run_revert.sh)

Deshace la mitigación aplicada por run_check.sh:

root@kitploit:~
./run_revert.sh
# Seleccionar 'l' para local

O directamente:

root@kitploit:~
ansible-playbook -i "localhost," -c local --ask-become-pass revert_cve_2026_31431.yml -v

El revert elimina /etc/modprobe.d/disable-algif.conf e intenta recargar el módulo algif_aead.

2. Remoto

root@kitploit:~
ansible-playbook -i "192.168.1.100," -u ubuntu --ask-become-pass check_cve_2026_31431.yml -v

Con múltiples hosts (crear hosts.ini):

root@kitploit:~
[servers]
192.168.1.100
192.168.1.101
root@kitploit:~
ansible-playbook -i hosts.ini --ask-become-pass check_cve_2026_31431.yml -v

3. Revertir cambios (deshacer mitigación)

root@kitploit:~
./run_revert.sh
# Seleccionar 'l' para local

4. Dentro de un Docker container

root@kitploit:~
docker run -it --privileged ubuntu:22.04 /bin/bash
# Dentro del container:
apt update && apt install -y ansible python3
# Copiar el playbook al container o usar curl/wget
ansible-playbook -i "localhost," -c local check_cve_2026_31431.yml -v

O montando el playbook desde el host:

root@kitploit:~
docker run -it --privileged -v $(pwd)/check_cve_2026_31431.yml:/check.yml ubuntu:22.04
# Dentro: ansible-playbook -i "localhost," -c local /check.yml -v

5. CI/CD Pipeline para imágenes Docker

GitHub Actions (.github/workflows/check-cve.yml):

root@kitploit:~
name: Check CVE-2026-31431

on:
  push:
    branches: [ main ]
  pull_request:

jobs:
  check-vulnerability:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      - name: Build test image
        run: docker build -t test-image .

      - name: Check for CVE-2026-31431 in container
        run: |
          docker run --rm \
            -v ${{ github.workspace }}/check_cve_2026_31431.yml:/check.yml \
            test-image \
            /bin/bash -c "apt update && apt install -y ansible python3 && \
            echo 'no' | ansible-playbook -i 'localhost,' -c local /check.yml -v"

      - name: Fail if vulnerable
        run: |
          # El playbook debe retornar != 0 si es vulnerable
          # O parsear la salida buscando "VULNERABLE"

GitLab CI (.gitlab-ci.yml):

root@kitploit:~
stages:
  - build
  - security

build_image:
  stage: build
  script:
    - docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA .

check_cve:
  stage: security
  script:
    - docker run --rm -v $(pwd)/check_cve_2026_31431.yml:/check.yml $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
      /bin/bash -c "apt-get update && apt-get install -y ansible python3 && 
      ansible-playbook -i 'localhost,' -c local /check.yml -v | grep -q 'SAFE' || exit 1"
  rules:
    - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'

Dockerfile con verificación en build:

root@kitploit:~
FROM ubuntu:22.04

RUN apt-get update && apt-get install -y ansible python3 wget

# Copiar y ejecutar check durante build
COPY check_cve_2026_31431.yml /tmp/
RUN echo "no" | ansible-playbook -i "localhost," -c local /tmp/check_cve_2026_31431.yml -v | \
    grep -q "SAFE" || (echo "VULNERABLE - Fix before building" && exit 1)

# Resto de tu imagen...

Qué hace run_check.sh

  1. Verifica si el algoritmo authencesn es accesible vía AF_ALG
  2. Si es vulnerable, pregunta si aplicar mitigación:
    • Deshabilita módulo algif_aead (crea /etc/modprobe.d/disable-algif.conf)
    • Actualiza kernel si está disponible
  3. Re-verifica después del parche

Qué hace run_revert.sh

  1. Elimina /etc/modprobe.d/disable-algif.conf
  2. Intenta recargar el módulo algif_aead
  3. Verifica si el sistema vuelve a estar vulnerable

Qué hace el playbook

  1. Verifica si el algoritmo authencesn es accesible vía AF_ALG
  2. Si es vulnerable, pregunta si aplicar mitigación:
    • Deshabilita módulo algif_aead
    • Actualiza kernel si está disponible
  3. Re-verifica después del parche

Resultado esperado

root@kitploit:~
Status: SAFE - System is protected

© 2026 EximiaIT

Security Assessment Tool – CVE-2026-31431 (Copy Fail)

This project is intended for authorized security testing, auditing, and educational purposes only. Any use of this software without proper authorization is strictly prohibited.

EximiaIT assumes no liability for misuse or damages resulting from this tool.

Descargar herramienta