Wednesday, April 16, 2025
HomeCyber Security NewsPoC Exploit Released for Critical OpenSSH Vulnerability (CVE-2024-6387)

PoC Exploit Released for Critical OpenSSH Vulnerability (CVE-2024-6387)

Published on

SIEM as a Service

Follow Us on Google News

An alarming new development emerged in the cybersecurity landscape with the release of a proof-of-concept (PoC) exploit targeting the critical vulnerability identified as CVE-2024-6387.

This vulnerability, discovered by researchers at Qualys, allows remote unauthenticated attackers to execute arbitrary code on vulnerable OpenSSH servers, posing a significant risk to users relying on this widely utilized protocol for secure communication.

Overview of CVE-2024-6387

The vulnerability in question is characterized as a race condition within OpenSSH’s server daemon (sshd). Specifically, if a client does not authenticate within the defined LoginGraceTime, the system’s signal handler can lead to unsafe function calls.

- Advertisement - Google News

The PoC exploit, developed by GitHub user YassDEV221608, is designed predominantly for 32-bit OpenSSH servers operating on Linux systems that utilize the GNU C Library (glibc). Notably, this flaw has been confirmed not to affect OpenBSD systems.

Investigate Real-World Malicious Links, Malware & Phishing Attacks With ANY.RUN – Try for Free

As per a report by Exploit Finder, the exploit takes advantage of a signal handler race condition, which occurs when sshd’s SIGALRM handler is activated due to a failed authentication attempt. This flaw allows attackers to gain unauthorized root access by executing code.

While the exploit requires extensive attempts to succeed, as noted by cybersecurity expert Schwartz, the potential impact is severe. OpenSSH developers confirmed this vulnerability impacts only specific versions, urging users to apply patches where available.

For security professionals and researchers looking to explore the exploit, the environment is set up using Docker. Below is a sample Dockerfile to create a vulnerable OpenSSH environment:

# Dockerfile to set up vulnerable OpenSSH server

FROM i386/ubuntu:20.04

ENV DEBIAN_FRONTEND=noninteractive

RUN dpkg --add-architecture i386 && apt-get update && apt-get install -y \

    build-essential \

    wget \

    curl \

    libssl-dev:i386 \

    zlib1g-dev:i386

RUN groupadd sshd && useradd -g sshd -s /bin/false sshd

RUN wget https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.2p1.tar.gz && \

    tar -xzf openssh-9.2p1.tar.gz && \

    cd openssh-9.2p1 && \

    ./configure && make && make install

RUN mkdir /var/run/sshd

RUN echo 'root:password' | chpasswd

RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /usr/local/etc/sshd_config && \

    sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /usr/local/etc/sshd_config && \

    echo 'MaxStartups 100:30:200' >> /usr/local/etc/sshd_config

EXPOSE 22

CMD ["/usr/local/sbin/sshd", "-D"]

Building the Docker Image

To build the Docker image, use the following command:

bash

sudo docker build --platform=linux/386 -t vulnerable-openssh:9.2p1 .

Running the Docker Container

Run the container with the command:

bash

sudo docker run --platform=linux/386 -d -p 2222:22 --name vuln-ssh-32bit vulnerable-openssh:9.2p1

PoC Script for Exploiting CVE-2024-6387

The exploit script CVE-2024-6387.py is a critical part of the PoC, allowing users to scan and exploit vulnerable servers. Below is an overview of the script’s functionality:

import argparse

import threading

import socket

import time

def exploit_vulnerability(target_ip, target_port):

    # Logic to exploit CVE-2024-6387

    # (This is a simplified demonstration)

    print(f"Exploiting target: {target_ip}:{target_port}")

    # Add actual exploitation code here...

def main():

    parser = argparse.ArgumentParser(description='CVE-2024-6387 PoC Exploit Script')

    parser.add_argument('-T', '--targets', required=True, help='Target IP addresses or domain names')

    parser.add_argument('-p', '--port', default=22, help='Port number to exploit (default: 22)')

    args = parser.parse_args()

    targets = args.targets.split(',')

    threads = []

    for target in targets:

        thread = threading.Thread(target=exploit_vulnerability, args=(target, args.port))

        threads.append(thread)

        thread.start()

    for thread in threads:

        thread.join()

if __name__ == "__main__":

    main()

To protect against CVE-2024-6387, system administrators are urged to update their OpenSSH installations to the latest versions, which include critical patches addressing this vulnerability.

Additionally, configurations that limit authentication attempts and enhance logging can help mitigate the risk of exploitation.

As the cybersecurity community reacts to the implications of CVE-2024-6387, the release of this exploit underscores the necessity of proactive security measures.

Organizations using OpenSSH are strongly advised to assess their systems for vulnerabilities and implement necessary updates to safeguard against potential attacks. 

Find this News Interesting! Follow us on Google NewsLinkedIn, and X to Get Instant Updates!

Divya
Divya
Divya is a Senior Journalist at GBhackers covering Cyber Attacks, Threats, Breaches, Vulnerabilities and other happenings in the cyber world.

Latest articles

Hackers Exploit Node.js to Spread Malware and Exfiltrate Data

Threat actors are increasingly targeting Node.js—a staple tool for modern web developers—to launch sophisticated...

Oracle Issues Patch for 378 Vulnerabilities in Major Security Rollout

Oracle Corporation has released a sweeping Critical Patch Update (CPU) for April 2025, addressing...

MITRE Ends CVE Program Support – Leaked Internal Memo Confirms Departure

A leaked internal memo dated April 15, 2025, has sent shockwaves through the cybersecurity...

Protecting Against Insider Threats – Strategies for CISOs

Insider threats represent a critical vulnerability in organizational cybersecurity, posing risks that are often...

Resilience at Scale

Why Application Security is Non-Negotiable

The resilience of your digital infrastructure directly impacts your ability to scale. And yet, application security remains a critical weak link for most organizations.

Application Security is no longer just a defensive play—it’s the cornerstone of cyber resilience and sustainable growth. In this webinar, Karthik Krishnamoorthy (CTO of Indusface) and Phani Deepak Akella (VP of Marketing – Indusface), will share how AI-powered application security can help organizations build resilience by

Discussion points


Protecting at internet scale using AI and behavioral-based DDoS & bot mitigation.
Autonomously discovering external assets and remediating vulnerabilities within 72 hours, enabling secure, confident scaling.
Ensuring 100% application availability through platforms architected for failure resilience.
Eliminating silos with real-time correlation between attack surface and active threats for rapid, accurate mitigation

More like this

Hackers Exploit Node.js to Spread Malware and Exfiltrate Data

Threat actors are increasingly targeting Node.js—a staple tool for modern web developers—to launch sophisticated...

Oracle Issues Patch for 378 Vulnerabilities in Major Security Rollout

Oracle Corporation has released a sweeping Critical Patch Update (CPU) for April 2025, addressing...

MITRE Ends CVE Program Support – Leaked Internal Memo Confirms Departure

A leaked internal memo dated April 15, 2025, has sent shockwaves through the cybersecurity...