Share
## https://sploitus.com/exploit?id=649197A2-0224-5B5C-9C4E-B5791D42A9FB
# 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.