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/doux-x/cve-2024-6387-analysis
Vulnerability AnalysisExploitationScripting & AutomationNetwork SecurityPenetration TestingLearning & Education
GitHubdoux-x/cve-2024-6387-analysis

CVE-2024-6387-analysis

CVE-2024-6387 OpenSSH 信号竞争漏洞(regreSSHion)分析报告及检测脚本

View Repository
45 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2024-6387 OpenSSH Signal Race Condition Vulnerability Analysis

Vulnerability Overview

CVE-2024-6387 is a signal handling race condition vulnerability in OpenSSH versions 8.5p1 through 9.7p1, known as "regreSSHion". An attacker can continuously attempt within 6-8 hours to execute arbitrary code with root privileges, affecting approximately 14 million servers worldwide.

Affected Versions

OpenSSH 8.5p1 ~ 9.7p1 (Ubuntu 22.04 default version 8.9p1 is affected)

Vulnerability Principle

  1. OpenSSH uses SIGALRM signal to handle login timeout
  2. During the execution of the signal handler, other threads may simultaneously operate on heap memory
  3. The race condition leads to heap memory corruption, allowing hijacking of program execution flow
  4. Ultimately obtaining a root shell

Reproduction Environment

Operating System: Ubuntu 22.04.5 LTS

OpenSSH Version: 8.9p1

Target Address: 127.0.0.1:22

Detection Script

root@kitploit:~
#!/bin/bash
# check_cve_2024_6387.sh

TARGET=${1:-127.0.0.1}
PORT=22

echo "[*] CVE-2024-6387 漏洞检测"
echo "[*] 目标: $TARGET:$PORT"

for i in {1..1000}; do
    timeout 1 nc -zv $TARGET $PORT 2>/dev/null
    if [ $((i % 100)) -eq 0 ]; then
        echo "[*] 已完成 $i 次连接"
    fi
done

echo "[+] 检测完成"
echo "[*] 请检查系统日志: sudo tail -20 /var/log/auth.log"

Execution Results

[] CVE-2024-6387 OpenSSH Vulnerability Detection

[] Target: 127.0.0.1:22

[] Completed 100 connections

[] Completed 200 connections ... [] Completed 1000 connections

[+] Detection completed, took 5 seconds

Fix Plan

Upgrade OpenSSH:

root@kitploit:~
sudo apt update
sudo apt upgrade openssh-server

Verify version: ssh -V (should show 9.7p1 or above)

Emergency measures: Limit connection frequency

root@kitploit:~
iptables -A INPUT -p tcp --dport 22 -m limit --limit 1/minute -j ACCEPT

Install fail2ban:

root@kitploit:~
sudo apt install fail2ban
sudo systemctl enable fail2ban

Project Structure

README.md

CVE-2024-6387-analysis.md

check_cve_2024_6387.sh

References

NVD - CVE-2024-6387

Qualys Security Advisory

Author

Doux-x

Download Tool