
# Playbooks Ansible para verificar e mitigar a CVE-2026-31431 em hosts Linux, com scripts para ambientes locais, remotos e containerizados, incluindo integração com CI/CD.
Verifica se um host Linux é vulnerável ao CVE-2026-31431 e aplica mitigação.
check_cve_2026_31431.yml - Playbook Ansible para verificar e corrigirrevert_cve_2026_31431.yml - Playbook Ansible para desfazer a mitigaçãorun_check.sh - Script para executar verificação local ou remotamenterun_revert.sh - Script para desfazer alterações local ou remotamente./run_check.sh
# Selecionar 'l' para local
Ou diretamente:
ansible-playbook -i "localhost," -c local --ask-become-pass check_cve_2026_31431.yml -v
Desfaz a mitigação aplicada pelo run_check.sh:
./run_revert.sh
# Selecionar 'l' para local
Ou diretamente:
ansible-playbook -i "localhost," -c local --ask-become-pass revert_cve_2026_31431.yml -v
A reversão remove /etc/modprobe.d/disable-algif.conf e tenta recarregar o módulo algif_aead.
ansible-playbook -i "192.168.1.100," -u ubuntu --ask-become-pass check_cve_2026_31431.yml -v
Com múltiplos hosts (criar hosts.ini):
[servers]
192.168.1.100
192.168.1.101
ansible-playbook -i hosts.ini --ask-become-pass check_cve_2026_31431.yml -v
./run_revert.sh
# Selecionar 'l' para local
docker run -it --privileged ubuntu:22.04 /bin/bash
# Dentro do container:
apt update && apt install -y ansible python3
# Copiar o playbook para o container ou usar curl/wget
ansible-playbook -i "localhost," -c local check_cve_2026_31431.yml -v
Ou montando o playbook a partir do host:
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
GitHub Actions (.github/workflows/check-cve.yml):
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: |
# O playbook deve retornar != 0 se for vulnerável
# Ou analisar a saída procurando por "VULNERABLE"
GitLab CI (.gitlab-ci.yml):
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 com verificação no build:
FROM ubuntu:22.04
RUN apt-get update && apt-get install -y ansible python3 wget
# Copiar e executar verificação durante o 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 da sua imagem...
authencesn é acessível via AF_ALGalgif_aead (cria /etc/modprobe.d/disable-algif.conf)/etc/modprobe.d/disable-algif.confalgif_aeadauthencesn é acessível via AF_ALGalgif_aeadStatus: SAFE - System is protected
© 2026 EximiaIT
Ferramenta de Avaliação de Segurança – CVE-2026-31431 (Copy Fail)
Este projeto destina-se exclusivamente a testes de segurança autorizados, auditoria e fins educacionais. Qualquer uso deste software sem a devida autorização é estritamente proibido.
A EximiaIT não assume responsabilidade por uso indevido ou danos resultantes desta ferramenta.