Skip to content
KitploitKITPLOIT
도구익스플로잇블로그
Log in
제출
도구익스플로잇블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

피드문의개인정보© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2024-6387 — Ansible role and Python script that detect OpenSSH regreSSHion (CVE-2024-6387) exposure, upgrade openssh-server, and apply the LoginGraceTime 0 workaround with backups and validation. | Kitploit
도구/GitHubGitHub/axisops/cve-2024-6387
Defensive ToolsVulnerability ScannersVulnerability AnalysisScripting & AutomationConfiguration AuditingDevSecOpsMisconfigurationIncident Response
GitHubaxisops/cve-2024-6387

CVE-2024-6387

Ansible role and Python script that detect OpenSSH regreSSHion (CVE-2024-6387) exposure, upgrade openssh-server, and apply the LoginGraceTime 0 workaround with backups and validation.

2026년 10월 30일아직 검토되지 않음
공유
저장소 보기웹사이트
요청한 언어로 콘텐츠를 사용할 수 없습니다. 영어 버전을 표시합니다.

regreSSHion CVE-2024-6387 Mitigation Ansible Role

This Ansible role deploys a Python script that detects whether a host's OpenSSH server is vulnerable to regreSSHion (CVE-2024-6387), the signal-handler race in sshd disclosed by Qualys on 2024-07-01, and mitigates it where a fixed package is not yet installed.

The role upgrades openssh-server first. Only if the host is still vulnerable afterwards does it apply the vendor-documented workaround, LoginGraceTime 0 in sshd_config.

It is designed to be run via Ansible, but you can also execute the script manually if you wish.

Read more about the regreSSHion vulnerability here:

  • NVD CVE-2024-6387
  • Qualys advisory
  • OpenSSH 9.8 release notes
  • Ubuntu USN-6859-1
  • Debian DSA-5724-1
  • Red Hat CVE-2024-6387 and RHSA-2024:4312

Features

  • Reads the OpenSSH version from sshd -V, falling back to ssh -V
  • Reads the installed openssh-server package version from dpkg or rpm
  • Reports vulnerable, fixed or unknown:
    • the upstream range is a first read only: Qualys gives OpenSSH < 4.4p1 (unless patched for CVE-2006-5051 / CVE-2008-4109) and 8.5p1 <= OpenSSH < 9.8p1 as vulnerable
    • distributions backport the fix without changing the upstream version, so where a package is installed, the package version against the distribution's fixed version decides
    • a packaged OpenSSH in the affected range on a distribution with no fixed version in the config is reported as unknown, not guessed at
  • Upgrades openssh-server (apt or dnf) when the host is vulnerable, before any workaround
  • Applies LoginGraceTime 0 only if the host is still vulnerable after that
  • Backs up sshd_config before any change, mirroring its full path under the backup directory, with a timestamp
  • Validates the edited file with sshd -t before putting it in place, checks again afterwards, and restores the backup if that fails
  • Dry-run by default; --apply changes the file
  • Warns if a host is now fixed but still carries the workaround
  • Writes all actions to a log file and prints a summary to stdout
  • Configurable via a YAML file, resolved relative to the script
  • Packaged as an Ansible role for automated deployment across multiple systems

Requirements

  • Python 3.9+
  • PyYAML, only for a run that reads a YAML config file (the installed apply). The role installs it from the distribution (python3-yaml, py3-yaml or python3-pyyaml), never from PyPI. The detection entry needs only the standard library: its config goes in as JSON on stdin
  • sshd present on the target for --apply: the script will not change a file it cannot validate

Configuration

The script is configured via a YAML file, templated automatically by the role.

Example regresshion_config.yaml:

sshd_binary: /usr/sbin/sshd
ssh_binary: /usr/bin/ssh
sshd_config: /etc/ssh/sshd_config
backup_directory: /var/backups/regresshion
log_file: /var/log/regresshion_mitigation.log
treat_unknown_as_vulnerable: false
fixed_versions:
  "ubuntu:noble": "1:9.6p1-3ubuntu13.3"
  "ubuntu:mantic": "1:9.3p1-1ubuntu3.6"
  "ubuntu:jammy": "1:8.9p1-3ubuntu0.10"
  "debian:bookworm": "1:9.2p1-2+deb12u3"
  "rhel:9": "8.7p1-38.el9_4.1"
  • sshd_binary, ssh_binary: where to read the version from, and the sshd used for sshd -t
  • sshd_config: the server configuration to change
  • backup_directory: where to store the original sshd_config backups
  • log_file: path to a log file for operation tracking
  • treat_unknown_as_vulnerable: apply the workaround to hosts whose status is unknown
  • fixed_versions: first fixed openssh-server package per release, keyed <os-release ID>:<VERSION_CODENAME> on dpkg systems and <os-release ID>:<major VERSION_ID> on rpm systems

The fixed versions above are those in USN-6859-1, DSA-5724-1 and RHSA-2024:4312. Ubuntu 20.04, Debian 11 and RHEL 8 ship OpenSSH older than 8.5p1 and are not affected, so they need no entry. Add entries for any other distribution from its own advisory. Red Hat's EUS streams carry their own builds; give them their own key if you run them.

Usage as an Ansible Role

Add this role to your playbook:

- name: Mitigate regreSSHion CVE-2024-6387
  hosts: all
  become: true
  roles:
    - regresshion_mitigation

The role runs the script once to detect, upgrades openssh-server if the host is vulnerable, then runs it again with --apply. With regresshion_restart: true an upgrade restarts sshd and the workaround reloads it; by default neither happens, because either is the operator's to schedule, and the running sshd keeps its old binary or setting until then. Set regresshion_upgrade_package: false or regresshion_apply_workaround: false to skip either step.

Usage Directly

If you wish to run the script manually, you can do so:

  1. Copy the script and the shared library beside it to your target machine:

    files/regresshion_mitigator.py
    files/samp_common.py
    
  2. Create your own regresshion_config.yaml in the same directory.

  3. Run it:

    python3 regresshion_mitigator.py                  # report only
    python3 regresshion_mitigator.py --apply          # change sshd_config if vulnerable
    python3 regresshion_mitigator.py --config /path/to/regresshion_config.yaml
    
  4. After --apply reports workaround_applied=1, reload sshd yourself: systemctl reload ssh (Debian, Ubuntu) or systemctl reload sshd (Red Hat).

Validation

  • The script prints vulnerable=N fixed=N not_affected=N unknown=N workaround_applied=N would_apply=N workaround_in_effect=N failed=N to stdout. Warnings go to stderr and the role shows them.
  • unknown=1 means the host needs checking against its vendor's advisory by hand; the log says why
  • Run sshd -T | grep logingracetime as root to confirm the value sshd is using
  • Check the configured log file (default: /var/log/regresshion_mitigation.log)
  • Restore from the backup directory if needed: the backup mirrors the original path with a timestamp suffix
  • The script checks the installed binary and package, not the running daemon. After an upgrade, confirm sshd has been restarted
  • Ideally, test in a staging environment before production rollout

Notes

  • LoginGraceTime 0 trades the RCE for a denial-of-service risk. In Qualys's words, it "makes sshd vulnerable to a denial of service (the exhaustion of all MaxStartups connections)". Unauthenticated connections are no longer timed out, so an attacker can hold every slot open. Red Hat recommends pairing it with fail2ban and a firewall
  • The workaround is a stopgap. Upgrade openssh-server as the fix, then remove the lines the script added at the top of sshd_config. Installing the updated package does not remove them
  • The line goes at the top of sshd_config. sshd keeps the first LoginGraceTime it reads, and Ubuntu 22.04 onwards includes sshd_config.d/*.conf at the start of the file, so a line appended at the end would be ignored
  • The banner alone is not a verdict. OpenSSH_9.6p1 Ubuntu-3ubuntu13.3 is fixed; OpenSSH_9.6p1 Ubuntu-3ubuntu13 is not; the upstream version is the same
  • Always test thoroughly before rolling out widely

Substrate Ansible Mitigation Pack (SAMP)

This repository is a SAMP: the Microcelium Substrate imports it from this exact URL, pins it by commit, verifies the release tag's signature, scans it, and has a human approve it before it runs anywhere.

도구 다운로드

관련 도구

  • wazuh

    엔드포인트 및 클라우드 워크로드 전반의 위협 탐지, 로그 분석, 파일 무결성 모니터링, 취약점 평가 및 규정 준수 관리를 위한 오픈소스 XDR 및 SIEM 플랫폼입니다.

  • suricata

    실시간 트래픽 검사, 침입 탐지 및 차단, 프로토콜 분석, 규칙 기반 위협 헌팅을 위한 오픈소스 네트워크 IDS/IPS/NSM 엔진입니다.

  • zeek

    Zeek는 일반적인 IDS와는 매우 다른 강력한 네트워크 분석 프레임워크입니다.

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

  • 1

    ghostlock-app

    yukonga/ghostlock-app

    # GhostLock 원탭 실행 앱 (CVE-2026-43499)

    750
  • 2

    IMSIcatcher

    28zaaky/imsicatcher

    SMS를 가로채고, 메시지를 주입하며, 모바일 기기를 추적하기 위해 악성 GSM 셀을 배포하는 IMSI Catcher 플랫폼

    739
  • 3

    Callisto

    jetp1ane/callisto

    Ghidra를 통해 실행 파일을 디컴파일하고, Semgrep으로 의사 C 코드를 스캔하며, GPT-3.5-Turbo를 사용하여 결과를 검증해 거짓 양성을 줄이는 자동화된 바이너리 취약점 분석 도구입니다.

    585
  • 4

    opencti

    opencti-platform/opencti

    오픈 사이버 위협 인텔리전스 플랫폼

    550
  • 5

    DFRoot

    a2333c/dfroot

    삼성 Galaxy S25 Ultra(SM-S938B)용 Android 루트 도구로, DirtyFrag CVE-2026-43284와 CVE-2026-43499를 연쇄하여 KernelSU를 통해 부팅 시 자동으로 루트 권한을 획득합니다.

    414
  • 6

    ARTEX

    baarai/artex

    LLM 멀티 에이전트 자율 침투 테스트 플랫폼으로, 플래너/워커 에이전트, 자산 및 탐색 그래프, MITM 트래픽 기록, 취약점 재테스트 기능을 제공합니다.

    409

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →