Skip to content

HASSH fingerprints for identifying OpenSSH servers potentially vulnerable to CVE-2024-6387 (regreSSHion).

License

Notifications You must be signed in to change notification settings

0x4D31/cve-2024-6387_hassh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CVE-2024-6387 HASSH Fingerprints

HASSH fingerprints for identifying OpenSSH servers potentially vulnerable to CVE-2024-6387 (regreSSHion).

The primary goal of this repository is to share the generated HASSH fingerprint database. The scripts use the Shodan API to compile a list of HASSH fingerprints for vulnerable OpenSSH versions. The generated database can be used to query Shodan or Censys to identify potentially vulnerable OpenSSH servers. The hasshdb.txt database can also be used with my Nmap NSE script available at hassh-utils.

Background

SSH Server Identification String (aka version string) is not a reliable way to identify SSH server implementations and versions, as it can be easily spoofed, as seen in honeypots like Cowrie. HASSH, developed by Ben Reardon (with contributions from me and John Althouse), is a fingerprinting technique that combines KEX, Encryption, MAC, and Compression algorithms from the SSH_MSG_KEXINIT message to create a fingerprint for specific SSH implementations. For more information about HASSH, refer to the Salesforce engineering blog post and the HASSH repository.

Considering the recent RCE vulnerability in OpenSSH (Qualys blog post), I thought it was worth generating a fingerprint database, as HASSH is supported in both Shodan and Censys and provides a more reliable method of identifying specific SSH server implementations and versions.

The HASSH fingerprint can be searched in Shodan using the ssh.hassh query and in Censys using the services.ssh.hassh_fingerprint query.

Generated Data

The Shodan scripts produce the following data files:

  • hasshdb.txt: A text file containing formatted HASSH fingerprints and their associated OpenSSH versions, including confidence percentages.
  • hasshdb.json: A JSON file with the HASSH database, mapping each HASSH fingerprint to its OpenSSH versions and counts.
  • potentially-vulnerable.json: A JSON file containing HASSH fingerprints of potentially vulnerable servers, total counts, and top 100 version/identification strings.

Note: The scripts use Shodan's facets and the count() method, which doesn't return detailed results and doesn't require a paid API plan. This method is also much faster than the search() method.

About

HASSH fingerprints for identifying OpenSSH servers potentially vulnerable to CVE-2024-6387 (regreSSHion).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages