
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.
Install the required libraries using pip:
pip install paramiko netaddr pandas termcolor
Command-line Arguments
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)Single Host on Default Port (22)
python CVE-2024-6387-Checker.py 192.168.1.1
Multiple Hosts (comma-separated)
python CVE-2024-6387-Checker.py 192.168.1.1,192.168.1.2
CIDR Notation
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:
python CVE-2024-6387-Checker.py hosts.txt
Specify an Alternative Port
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:
ip,port
192.168.1.1,22
192.168.1.2,2222
Scan using the CSV file:
python CVE-2024-6387-Checker.py -c hosts.csv -c
Specify Number of Workers:
python scan_openssh.py 192.168.1.0/24 -w 20
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.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome. Please submit pull requests for any enhancements or bug fixes.