"HASSH"是一种网络指纹识别标准,可用于识别特定的客户端和服务器SSH实现。这些指纹可以以MD5指纹的形式轻松存储、搜索和共享。
HASSH于2018年在Salesforce发明。然而,该项目已不再由Salesforce积极维护。其原始创建者Ben Reardon在Corelight维护着活跃的分支。
"hassh"和"hasshServer"是由各种SSH客户端和服务器应用程序支持的一组特定算法构造的MD5哈希。这些算法在初始TCP三次握手后以称为"SSH_MSG_KEXINIT"消息的明文数据包进行交换,是最终加密SSH通道建立的组成部分。 这些算法的存在和顺序足够独特,可以用作指纹来帮助识别底层客户端和服务器应用程序或独特实现,而忽略诸如"Client"或"Server"字符串等更高级别的表面标识。
对于"Cyberduck" SFTP客户端(具体为SSH-2.0-Cyberduck/6.7.1.28683 (Mac OS X/10.13.6) (x86_64)),支持的算法集如下:
将这些算法用";"分隔符连接起来得到hasshAlgorithms,这对于详细分析非常有用。
[email protected],diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group14-sha256,diffie-hellman-group15-sha512,diffie-hellman-group16-sha512,diffie-hellman-group17-sha512,diffie-hellman-group18-sha512,[email protected],diffie-hellman-group15-sha256,[email protected],[email protected],diffie-hellman-group16-sha256,[email protected],[email protected],[email protected];aes128-cbc,aes128-ctr,aes192-cbc,aes192-ctr,aes256-cbc,aes256-ctr,blowfish-cbc,blowfish-ctr,cast128-cbc,cast128-ctr,idea-cbc,idea-ctr,serpent128-cbc,serpent128-ctr,serpent192-cbc,serpent192-ctr,serpent256-cbc,serpent256-ctr,3des-cbc,3des-ctr,twofish128-cbc,twofish128-ctr,twofish192-cbc,twofish192-ctr,twofish256-cbc,twofish256-ctr,twofish-cbc,arcfour,arcfour128,arcfour256;hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96,hmac-sha2-256,hmac-sha2-512;[email protected],zlib,none
最后,hassh就是hasshAlgorithms的MD5值,用于存储、搜索和共享。以下是一些示例:
de30354b88bae4c2810426614e1b6976 Powershell Renci.SshNet.SshClient.0.0.1(用于Empire利用模块)
fafc45381bfde997b6305c4e1600f1bf Ruby/Net::SSH_5.0.2 x86_64-linux(用于Metasploit利用模块)
b5752e36ba6c5979a575e43178908adf Python Paramiko_2.4.1(用于Metasploit利用模块)
16f898dd8ed8279e1055350b4e20666c Dropbear_2012.55(用于物联网嵌入式系统)
8a8ae540028bf433cd68356c1b9e8d5b CyberDuck版本6.7.1 (28683)
06046964c022c6407d15a27b12a6a4fb OpenSSH_7.7p1 Ubuntu-4
对于一个标准的SSH-2.0-OpenSSH_5.3 SSH服务器,支持的算法集如下:
| 功能 | SSH_MSG_KEXINIT数据包中出现的算法 |
|---|
将这些算法用";"分隔符连接起来得到hasshServerAlgorithms,这对于详细分析非常有用。
diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1;aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected];hmac-md5,hmac-sha1,[email protected],hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96;none,[email protected]
最后,hasshServer就是hasshServerAlgorithms的MD5值,以下是一些示例:
c1c596caaeb93c566b8ecf3cae9b5a9e SSH-2.0-dropbear_2016.74
d93f46d063c4382b6232a4d77db532b2 SSH-2.0-dropbear_2016.72
2dd9a9b3dbebfaeec8b8aabd689e75d2 SSH-2.0-AWSCodeCommit
696e7f84ac571fdf8fa5073e64ee2dc8 SSH-2.0-FTP
hassh和hasshServer由Ben Reardon (@benreardon) 在Salesforce的Detection Cloud团队中构思和开发,灵感与贡献来自Adel Karimi (@0x4d31) 以及JA3团队的成员:John B. Althouse、Jeff Atkinson和Josh Atkins。
| 功能 | SSH_MSG_KEXINIT数据包中出现的算法 |
|---|
| 密钥交换方法 | [email protected],diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group14-sha256,diffie-hellman-group15-sha512,diffie-hellman-group16-sha512,diffie-hellman-group17-sha512,diffie-hellman-group18-sha512,[email protected],diffie-hellman-group15-sha256,[email protected],[email protected],diffie-hellman-group16-sha256,[email protected],[email protected],[email protected] |
| 加密 | aes128-cbc,aes128-ctr,aes192-cbc,aes192-ctr,aes256-cbc,aes256-ctr,blowfish-cbc,blowfish-ctr,cast128-cbc,cast128-ctr,idea-cbc,idea-ctr,serpent128-cbc,serpent128-ctr,serpent192-cbc,serpent192-ctr,serpent256-cbc,serpent256-ctr,3des-cbc,3des-ctr,twofish128-cbc,twofish128-ctr,twofish192-cbc,twofish192-ctr,twofish256-cbc,twofish256-ctr,twofish-cbc,arcfour,arcfour128,arcfour256 |
| 消息认证 | hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96,hmac-sha2-256,hmac-sha2-512 |
| 压缩 | [email protected],zlib,none |
| 密钥交换方法 | diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 |
| 加密 | aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected] |
| 消息认证 | hmac-md5,hmac-sha1,[email protected],hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96 |
| 压缩 | none,[email protected] |