Skip to content
KitploitKITPLOIT
OutilsExploitsBlog
Log in
Soumettre
OutilsExploitsBlog
Soumettre

Outils de Hacking, PenTest et Cybersécurité pour votre Arsenal de Sécurité !

Kitploit est un répertoire d'outils de hacking, de cybersécurité et de pentesting. Découvrez les dernières mises à jour des projets pour trouver des vulnérabilités, analyser des systèmes, automatiser les tests et renforcer votre sécurité.

FluxContactConfidentialité© 2026 Kitploit

Répertoire d'outils

Catégories

Voir toutes les catégories
Loading categories
CVE-2024-6387 — PoC and technical analysis of CVE-2024-6387 (regreSSHion), with a Python harness that checks OpenSSH version and measures the LoginGraceTime race window. | Kitploit
Outils/GitHubGitHub/gabrieledattile/cve-2024-6387
ReconnaissanceVulnerability AnalysisExploitationInformation GatheringNetwork SecurityRemote Access Tool
GitHubgabrieledattile/cve-2024-6387

CVE-2024-6387

PoC and technical analysis of CVE-2024-6387 (regreSSHion), with a Python harness that checks OpenSSH version and measures the LoginGraceTime race window.

Voir le dépôt
5 déc. 2026Pas encore vérifié
Partager
Contenu non disponible dans la langue demandée. Affichage de la version anglaise.

CVE-2024-6387 — OpenSSH regreSSHion

A signal-handler race in sshd: remote, unauthenticated code execution as root on glibc-based Linux.

CVECVE-2024-6387 ("regreSSHion")
CVSS v3.18.1 (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H)
ImpactPre-authentication remote code execution as root
CWECWE-364 (Signal Handler Race Condition), CWE-828
Public fixOpenSSH 9.8 / 9.8p1, released 2024-07-01
DiscoveryQualys Threat Research Unit

Affected products and versions

  • OpenSSH 8.5p1 up to 9.7p1 inclusive on Linux — vulnerable.
  • OpenSSH 4.4p1 up to 8.4p1 — vulnerable only if the patch for CVE-2006-5051 was not backported by the distribution.
  • OpenSSH 9.8p1 and newer — fixed.
  • Linux distributions shipping a vulnerable build include (non-exhaustive) Debian 12, Ubuntu 22.04 LTS / 24.04 LTS, RHEL / AlmaLinux / Rocky Linux 9, Fedora 38/39/40, and Kali Linux.
  • Non-glibc targets (musl, *BSD) were reported as not practically exploitable, because the race relies on glibc's malloc/syslog behaviour.

Root cause

sshd's SIGALRM handler fires when a connection exceeds LoginGraceTime. That handler calls syslog() (and through it, signal-unsafe malloc/free paths) — functions that are not async-signal-safe. When the signal lands while the main packet-handling code is inside the heap, the allocator state can be corrupted. The vulnerable pattern was reintroduced in OpenSSH 8.5p1 after having been fixed in 2006 (CVE-2006-5051, hence "regreSSHion").

Exploitation condition

  1. MaxStartups permits more than one unauthenticated child at a time (the default 10:30:100 does — only a strict MaxStartups 1 closes the door).
  2. A long LoginGraceTime (default 120 s) widens the window in which the alarm can fire while the child is in a heap operation.
  3. With enough concurrent connections the server saturates its unauthenticated child slots, the attacker keeps the racy children alive until the alarm fires, and — with high enough attempt volume — wins the race and executes code as root in the forked child serving the malicious connection.

Exploitation is probabilistic: the race must be hit, and a per-target ASLR/heap layout question must be solved; published analyses quote large numbers of attempts (tens of thousands of connections, hours) for reliable hits.

Impact

Unauthenticated network attacker reaching sshd obtains remote code execution as root, i.e. full host compromise before any credential is presented. sshd's privilege separation does not save the target: the vulnerable code runs in the privileged parent context.

What this repository adds

Most catalogued material stops at triggering the condition (open many connections, wait for LoginGraceTime, watch for a crash). This repository adds:

  • an explicit description of the race window — why MaxStartups and LoginGraceTime together define the exploitable interval, and what the attacker must overlap to win it;
  • a verification harness (poc/regresshion_check.py) that decides whether a given host is in vulnerable preconditions, not just whether a banner says "OpenSSH": it parses the version against 9.8, and can measure the real grace-time close delay of the target, which is the quantity that determines the size of the window.

Usage of the PoC

Requires only Python 3 standard library.

# Passive check: banner + version verdict
python3 poc/regresshion_check.py 10.0.0.10

# Additionally measure the grace-time window (opens N connections, no auth)
python3 poc/regresshion_check.py 10.0.0.10 -n 20 -p 2222 -t 150

The script is non-destructive: it opens TCP connections, reads the banner, sends the client identification line and (optionally) waits for the server to close. Exit code 0 = server looks vulnerable, 1 = not vulnerable/unknown, 2 = connection error.

Mitigation

  • Upgrade to OpenSSH 9.8p1 or newer, or apply the distribution's backport.
  • If upgrading is not immediately possible, LoginGraceTime 0 removes the alarm entirely (the socket then has no grace period and idle connections are not timed out by that handler), at the cost of long-lived unauthenticated slots.
  • Reducing MaxStartups to 1 narrows but does not fully remove the exposure.

References

  • OpenSSH 9.8 release notes / advisory: https://www.openssh.com/txt/release-9.8
  • NVD entry: https://nvd.nist.gov/vuln/detail/CVE-2024-6387
  • Qualys advisory: https://www.qualys.com/2024/07/09/cve-2024-6387/

Gabriele D'Attile — https://github.com/GabrieleDattile

Télécharger l’outil

Outils similaires

  • amass

    Cartographie approfondie de la surface d'attaque et découverte d'actifs

  • subfinder

    Outil rapide d'énumération passive de sous-domaines.

  • reconftw

    reconFTW est un outil conçu pour effectuer des reconnaissances automatisées sur un domaine cible en exécutant le meilleur ensemble d'outils pour réaliser des scans et découvrir des vulnérabilités.

Populaires

Voir tout →

Découvrez les outils les plus utilisés par notre communauté.

  • 1

    ghostlock-app

    yukonga/ghostlock-app

    # Application d'exécution en un clic GhostLock (CVE-2026-43499)

    745
  • 2

    IMSIcatcher

    28zaaky/imsicatcher

    Plateforme IMSI Catcher qui déploie une cellule GSM frauduleuse pour intercepter les SMS, injecter des messages et suivre les appareils mobiles

    732
  • 3

    Callisto

    jetp1ane/callisto

    Outil automatisé d'analyse de vulnérabilités binaires qui décompile des exécutables via Ghidra, analyse du pseudo-code C avec Semgrep, et valide les résultats en utilisant GPT-3.5-Turbo pour réduire les faux positifs.

    610
  • 4

    opencti

    opencti-platform/opencti

    Plateforme ouverte de renseignement sur les cybermenaces

    546
  • 5

    ARTEX

    baarai/artex

    Plateforme autonome de tests d'intrusion multi-agents basée sur des LLM, avec agents planificateur/ouvrier, graphes d'actifs et d'exploration, enregistrement du trafic MITM et retest des vulnérabilités.

    414
  • 6

    DFRoot

    a2333c/dfroot

    Outil de root Android pour Samsung Galaxy S25 Ultra (SM-S938B) qui enchaîne DirtyFrag CVE-2026-43284 et CVE-2026-43499 pour obtenir le root automatiquement au démarrage via KernelSU.

    413

Explorer tous les outils

Parcourez notre collection d'outils

Voir tous les outils →