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/oseasfr/scanner_cve_openssh
ReconnaissanceVulnerability ScannersVulnerability AnalysisInformation GatheringNetwork SecurityPenetration Testing
GitHuboseasfr/scanner_cve_openssh

Scanner_CVE_OpenSSH

Scanner para identificação de servidores com softwares SSH possivelmente vulnerável às CVEs CVE-2024-6387 e CVE-2023-48795.

View Repository
12 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
image

Scanner for identifying servers with SSH software possibly vulnerable to CVEs CVE-2024-6387 and CVE-2023-48795.


Covered CVEs

CVENameConditionSeverity
CVE-2024-6387regreSSHionOpenSSH < 9.8p1CRITICAL
CVE-2023-48795TerrapinOpenSSH < 9.6HIGH

CVE-2024-6387 — regreSSHion

Race condition in the SIGALRM signal handler of the OpenSSH server allows unauthenticated RCE as root on Linux systems with glibc. Affects all OpenSSH versions prior to 9.8p1.

CVE-2023-48795 — Terrapin

Prefix truncation attack on the SSH handshake (binary protocol) that allows a MITM adversary to remove security extension messages negotiated at the start of the session. Affects OpenSSH < 9.6.

How it works

The script directly connects to the SSH port of the targets and reads the identification banner (e.g., SSH-2.0-OpenSSH_9.7), without sending any credentials. With the version in hand, it compares against the fixed versions of each CVE and classifies the host.

root@kitploit:~
Target → TCP connection port 22 → Read SSH banner → Software identification
     → Parse OpenSSH version → Compare with fixed versions → Classification + Log + CSV

The script also identifies the SSH vendor/software from the banner, recognizing:

Requirements

root@kitploit:~
pip install requests packaging urllib3 dnspython

dnspython is optional but highly recommended — parallel reverse resolution is significantly faster with it. Without dnspython, the script uses socket as a fallback.

Usage

root@kitploit:~
# IP individual
python ssh_scanner.py --ip 192.168.1.10

# Faixa CIDR
python ssh_scanner.py --cidr 10.0.0.0/24

# Múltiplos CIDRs
python ssh_scanner.py --cidr 10.0.0.0/24 192.168.1.0/24

# ASN (prefixos resolvidos via RIPE Stat, fallback para bgp.tools)
python ssh_scanner.py --asn AS12345

# Combinação de entradas
python ssh_scanner.py --asn AS12345 --cidr 10.0.0.0/8 --ip 1.2.3.4

# A partir de um arquivo (um IP, CIDR ou ASN por linha)
python ssh_scanner.py --file alvos.txt

# Portas adicionais (além da 22)
python ssh_scanner.py --cidr 10.0.0.0/24 --ports 22 2222 22222

Optional parameters

DNS resolution is performed in batch before the SSH scan, with a dedicated thread queue, preventing DNS latency from impacting scan speed.

Output

All results are written to ./logs/:

FileContent

Structured CSV (formato_estruturado.csv)

Columns present:

Example lines:

root@kitploit:~
IP               | PORTA | TIMESTAMP_UTC        | DOMINIO                  | FABRICANTE | SW_NAME | SW_VERSAO | CVEs                          | BANNER
192.168.1.10     | 22    | 2026-05-20T00:39:33Z | host.exemplo.com         | OpenSSH    | OpenSSH | 9.7       | cve-2024-6387;cve-2023-48795  | SSH-2.0-OpenSSH_9.7
192.168.1.20     | 22    | 2026-05-20T12:46:03Z | host2.exemplo.com        | OpenSSH    | OpenSSH | 9.4       | cve-2023-48795;cve-2024-6387  | SSH-2.0-OpenSSH_9.4
192.168.1.30     | 22    | 2026-05-20T12:47:11Z | router.exemplo.com       | Mikrotik   | ROSSSH  | N/D       |                               | SSH-2.0-ROSSSH

At the end of the scan, if there are vulnerable hosts, the script automatically displays a preview of the first 20 lines of the structured CSV in the terminal.

Host Status

Remediation

Update OpenSSH to version 9.8p1 or higher (covers both CVEs):

root@kitploit:~
# Ubuntu / Debian — via repositório do sistema
sudo apt update && sudo apt install --only-upgrade openssh-server
ssh -V

# CentOS / RHEL / Rocky
sudo dnf update openssh-server
ssh -V

# Compilação a partir do fonte (versão mais recente)
wget https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.9p1.tar.gz
tar xzf openssh-9.9p1.tar.gz
cd openssh-9.9p1 && ./configure && make && sudo make install

After updating, restart the service:

root@kitploit:~
sudo systemctl restart sshd

References

  • NVD CVE-2024-6387: https://nvd.nist.gov/vuln/detail/CVE-2024-6387
  • NVD CVE-2023-48795: https://nvd.nist.gov/vuln/detail/CVE-2023-48795
  • OpenSSH Release Notes: https://www.openssh.com/releasenotes.html

Legal Disclaimer

This script is intended for use on your own infrastructure or under explicit authorization. Unauthorized scanning may violate various laws, so use with caution.

Any actions and consequences resulting from misuse of this tool are your own responsibility.

If you have suggestions for improvement or find bugs, open an issue or submit a Pull Request. All contributions are welcome! 🚀

Download Tool
BannerIdentified vendor
SSH-2.0-OpenSSH_9.7OpenSSH
SSH-2.0-ROSSSHMikrotik
SSH-2.0-Cisco-1.25Cisco
SSH-2.0-dropbear_2022.83Dropbear
SSH-2.0-libssh-0.9.6libssh
SSH-2.0-AsyncSSH_2.13.2AsyncSSH
SSH-2.0-paramiko_2.9.5Paramiko
SSH-2.0-Bitvise-...Bitvise
SSH-2.0-WolfSSH_1.4.14wolfSSH
Other unmappedName extracted from banner
ParameterDefaultDescription
--ports22SSH port(s) to scan
--workers60Concurrent threads for SSH scan
--timeout3.0SSH connection timeout in seconds
--dns-workers200Concurrent threads for reverse DNS resolution
--dns-timeout1.5DNS query timeout in seconds
--no-confirm—Skip confirmation before starting (useful in automation)
ssh_scan_<timestamp>.logFull scan log (all discovered SSH hosts)
ssh_scan_<timestamp>_vulneraveis.txtOnly hosts classified as VULNERÁVEL
ssh_scan_<timestamp>_resultados.csvAll SSH hosts with full status
ssh_scan_<timestamp>_formato_estruturado.csvStructured CSV with IP, port, timestamp, domain, vendor and CVEs
ColumnDescription
IPHost IP address
PORTASSH port where the banner was captured
TIMESTAMP_UTCISO 8601 UTC timestamp of the scan moment
DOMINIOHostname via reverse DNS (PTR) or SEM-PTR
FABRICANTEVendor identified from the banner
SW_NAMESSH software name extracted from the banner
SW_VERSAOSSH software version
CVEsAffected CVEs separated by ; (lowercase)
BANNERFull captured SSH banner
StatusMeaning
VULNERÁVELOpenSSH version confirmed below the fixed version
SEGUROOpenSSH version confirmed at or above the fixed version
VERSÃO-OCULTASSH detected but version not disclosed — not confirmed safe
SSH-NÃO-OPENSSHSSH server found but not OpenSSH (Dropbear, Cisco, etc.)
NÃO-SSHPort responded but banner does not match SSH protocol