Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
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.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/wavesman/cve-2026-31431-fleet-remediator
Cloud Infrastructure SecurityVulnerability ScannersConfiguration AuditingDevSecOps
GitHubwavesman/cve-2026-31431-fleet-remediator

cve-2026-31431-fleet-remediator

Fleet-scale CVE-2026-31431 audit and remediation orchestrator for Linux hosts via SSH, with strict host-key verification and multi-format reporting.

View Repository

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
3 months agoNot yet reviewed
Share

CVE-2026-31431 Fleet Audit and Remediation Tool

中文说明

This project is a fleet-scale orchestrator for auditing and remediating CVE-2026-31431 on Linux hosts in enterprise/internal networks.

  • Batch SSH login to multiple hosts
  • Risk evidence collection and status classification
  • Temporary mitigation (algif_aead disable)
  • Distro-aware kernel patch/upgrade workflow
  • JSON / CSV / Markdown reporting

1. Requirements

  • Python: >=3.13
  • Package manager: uv
  • Network: runner must reach target hosts over SSH

2. Quick Start

2.1 Install dependencies

root@kitploit:~
uv sync

Tsinghua mirror is configured in pyproject.toml:

root@kitploit:~
[tool.uv]
index-url = "https://pypi.tuna.tsinghua.edu.cn/simple"

2.2 Prepare asset config

root@kitploit:~
cp fleet.env.example fleet.env

Then update fleet.env with your real hosts and credentials.

2.3 Run

root@kitploit:~
uv run python main.py fleet.env

3. Project Layout

root@kitploit:~
.
├── main.py
├── pyproject.toml
├── uv.lock
├── fleet.env.example
├── reports/
└── src/
    ├── main.py
    ├── models.py
    ├── config.py
    ├── executor.py
    ├── collector.py
    ├── analyzer.py
    ├── adapters.py
    ├── remediator.py
    ├── orchestrator.py
    └── reporter.py

4. fleet.env Configuration Reference

Format is KEY=VALUE. Empty lines and # comments are ignored.

4.1 Global keys

MODE

  • Runtime mode.
  • Values:
    • audit: detect only, no remediation.
    • fix: detect and run remediation flow.
  • Default: audit

AUTO_REBOOT

  • Whether to reboot host automatically after successful remediation.
  • Values: 0 or 1
  • Default: 0
  • Effective only when MODE=fix.

SSH_TIMEOUT

  • SSH connect/auth timeout (seconds).
  • Type: integer
  • Default: 12

MAX_WORKERS

  • Fleet concurrency size (thread pool workers).
  • Type: integer
  • Default: 8

REPORT_DIR

  • Output directory for generated reports.
  • Type: relative or absolute path
  • Default: ./reports

PROGRESS_HEARTBEAT_SECONDS

  • Heartbeat interval for real-time progress logs.
  • Type: integer (seconds)
  • Default: 5

DEVICE_MAX_DURATION_SECONDS

  • Max total execution time per device before timeout/stall warnings.
  • Type: integer (seconds)
  • Default: 1800

PROGRESS_LOG_TO_FILE

  • Whether to persist progress logs into REPORT_DIR.
  • Values: 0 or 1
  • Default: 1

FLEET_COUNT

  • Device slot count. Loader parses 1..FLEET_COUNT.
  • Type: integer
  • If DEVICE_n_HOST is empty, that slot is skipped.

4.2 Per-device keys

Each host uses DEVICE_{n}_ prefix, such as DEVICE_1_*, DEVICE_2_*.

DEVICE_n_NAME

  • Display name in reports.
  • Optional. If empty, auto-fallback to device_n.

DEVICE_n_HOST

  • Target host IP or DNS name.
  • Required for that slot.

DEVICE_n_PORT

  • SSH port.
  • Default: 22

DEVICE_n_USER

  • SSH username.
  • Default: root

DEVICE_n_PASSWORD

  • SSH password auth.
  • Use with or instead of DEVICE_n_KEY.
  • The script only uses credentials explicitly set in fleet.env.

DEVICE_n_KEY

  • SSH private key path.
  • Example: ./keys/node-1_ed25519
  • If both DEVICE_n_PASSWORD and DEVICE_n_KEY are empty, the connection fails fast.

DEVICE_n_SUDO_PASSWORD

  • Sudo password for non-root users.
  • Used for remediation commands.

4.3 Full example

root@kitploit:~
# =========================
# Global
# =========================
MODE=audit
AUTO_REBOOT=0
SSH_TIMEOUT=12
MAX_WORKERS=8
REPORT_DIR=./reports
PROGRESS_HEARTBEAT_SECONDS=5
DEVICE_MAX_DURATION_SECONDS=1800
PROGRESS_LOG_TO_FILE=1
FLEET_COUNT=3

# =========================
# Device 1
# =========================
DEVICE_1_NAME=pve-node-1
DEVICE_1_HOST=192.168.1.10
DEVICE_1_PORT=22
DEVICE_1_USER=root
DEVICE_1_PASSWORD=
DEVICE_1_KEY=./keys/pve-node-1_ed25519
DEVICE_1_SUDO_PASSWORD=

# =========================
# Device 2
# =========================
DEVICE_2_NAME=web-1
DEVICE_2_HOST=192.168.1.20
DEVICE_2_PORT=22
DEVICE_2_USER=admin
DEVICE_2_PASSWORD=your_ssh_password
DEVICE_2_KEY=
DEVICE_2_SUDO_PASSWORD=your_sudo_password

# =========================
# Device 3
# =========================
DEVICE_3_NAME=
DEVICE_3_HOST=192.168.1.30
DEVICE_3_PORT=22
DEVICE_3_USER=ops
DEVICE_3_PASSWORD=
DEVICE_3_KEY=./keys/db-1_ed25519
DEVICE_3_SUDO_PASSWORD=

5. Run Modes

5.1 Audit mode (recommended first pass)

root@kitploit:~
MODE=audit
uv run python main.py fleet.env

Behavior:

  • Connect to hosts
  • Collect kernel/module/patch hints
  • Classify risk status
  • Generate reports

5.2 Fix mode

root@kitploit:~
MODE=fix
AUTO_REBOOT=0
uv run python main.py fleet.env

Behavior:

  • Apply temporary mitigation first:
    • write /etc/modprobe.d/disable-cve-2026-31431-algif-aead.conf
    • try to unload algif_aead
  • Run distro-specific kernel update
  • Optional reboot based on AUTO_REBOOT

6. Status Definitions

SAFE

  • Patch hints found and algif_aead is not loaded.

MITIGATED

  • Mitigation hints found while patch hints are still unclear.

NEEDS_PATCH

  • algif_aead is available/loaded and patch hints are missing.

UNKNOWN

  • Not enough evidence to classify.

FAILED

  • SSH login/command execution failed.

7. Report Outputs

Each run generates 3 files in REPORT_DIR:

  • cve_2026_31431_<timestamp>.json
  • cve_2026_31431_<timestamp>.csv
  • cve_2026_31431_<timestamp>.md
  • progress_<timestamp>.log (real-time progress and heartbeat logs)

Core fields:

  • name, host
  • status
  • kernel, os
  • algif_loaded, algif_available
  • patch_hint
  • fixed, rebooted
  • error

8. Security Notes

  • Do not commit fleet.env or private keys.
  • Use least-privileged operational accounts when possible.
  • Take snapshots/backups before production remediation.
  • Recommended rollout: audit -> fix -> re-audit.

9. Troubleshooting

ModuleNotFoundError: No module named 'paramiko'

  • Run uv sync.

Many hosts are FAILED

  • Check connectivity, SSH credentials, sudo permission, and host key state.

BadHostKeyException

  • Host fingerprint conflicts with current known_hosts record.
  • This is not system key auth fallback; auth still uses only fleet.env credentials.
  • Verify host identity out-of-band, then update known_hosts:
    • ssh-keygen -R <host>
    • ssh-keyscan -H <host> >> $env:USERPROFILE\.ssh\known_hosts

Server ... not found in known_hosts

  • Strict host-key mode is enabled, and host fingerprint is missing.
  • Add host key to known_hosts, then rerun.

Kernel updated but status still risky

  • Reboot may be required to boot into patched kernel.
Download Tool