Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2024-6387 PoC — Openssh: regresshion - race condition in ssh allows rce/dos

Source
Associated Vulnerability
Title:Openssh: regresshion - race condition in ssh allows rce/dos (CVE-2024-6387)
Description:A security regression (CVE-2006-5051) was discovered in OpenSSH's server (sshd). There is a race condition which can lead sshd to handle some signals in an unsafe manner. An unauthenticated, remote attacker may be able to trigger it by failing to authenticate within a set time period.
Readme
# CVE-2024-6387-Checker

This tool scans your network for hosts running vulnerable versions of OpenSSH (CVE-2024-6387). It can handle single IPs, multiple IPs, CIDR ranges, and CSV files with custom ports.

## Requirements
Install the required libraries using pip:

```sh
pip install paramiko netaddr pandas termcolor
```
## Usage
Command-line Arguments
```sh
python CVE-2024-6387-Checker.py [-h] [-p PORT] [-c] input [-w WORKERS]
```
- `input`: Host(s) to scan (single IP, comma-separated, CIDR, or file path)
- `-p, --port`: SSH port (default: 22)
- `-c, --csv`: Input is a CSV file with IP and port columns
- `-w, --workers`: Specify number of workers (default: 10)
## Examples
Single Host on Default Port (22)
```sh
python CVE-2024-6387-Checker.py 192.168.1.1
```
Multiple Hosts (comma-separated)
```sh
python CVE-2024-6387-Checker.py 192.168.1.1,192.168.1.2
```
CIDR Notation
```sh
python CVE-2024-6387-Checker.py 192.168.1.0/24
```
Hosts from a File
Create a file hosts.txt with each host on a new line:

```sh
python CVE-2024-6387-Checker.py hosts.txt
```
Specify an Alternative Port
```sh
python CVE-2024-6387-Checker.py 192.168.1.1 -p 2222
```
Scan from a CSV File
Create a CSV file `hosts.csv` with columns `ip` and `port`:

```csv
ip,port
192.168.1.1,22
192.168.1.2,2222
```
Scan using the CSV file:

```sh
python CVE-2024-6387-Checker.py -c hosts.csv -c
```
Specify Number of Workers:
```sh
python scan_openssh.py 192.168.1.0/24 -w 20
```
## Script Overview
`check_ssh_version(host, port)`
Attempts to connect to the specified host and port, retrieves the SSH banner, and checks if it matches vulnerable OpenSSH versions.

`scan_hosts(hosts, port)`
Scans a list of hosts on the specified port.

`scan_csv(file_path)`
Reads a CSV file with ip and port columns and scans each host.

`main()`
Parses command-line arguments and initiates the appropriate scan based on the input format.

## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

## Contributing
Contributions are welcome. Please submit pull requests for any enhancements or bug fixes.
File Snapshot

[4.0K] /data/pocs/56cfdefedeb04d1641a14fc8213b50a033347fe4 ├── [4.9K] CVE-2024-6387-Checker.py ├── [ 59] example.csv ├── [1.0K] LICENSE ├── [2.1K] README.md └── [ 34] requirements.txt 0 directories, 5 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →