POC详情: a97dd7a2a705eae746a2d4375ebdaf35cc00b288

来源
关联漏洞
标题: OpenSSH 竞争条件问题漏洞 (CVE-2018-15473)
描述:OpenSSH(OpenBSD Secure Shell)是OpenBSD计划组的一套用于安全访问远程计算机的连接工具。该工具是SSH协议的开源实现,支持对所有的传输进行加密,可有效阻止窃听、连接劫持以及其他网络级的攻击。 OpenSSH 7.7及之前版本中存在竞争条件问题漏洞。该漏洞源于网络系统或产品在运行过程中,并发代码需要互斥地访问共享资源时,对于并发访问的处理不当。
描述
FAFAF
介绍
# PoC-CVE-2018-15473


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.

CVE: CVE-2018-15473

Write up from https://www.openwall.com/lists/oss-security/2018/08/15/5

without patching the current version, a remote attacker can easily test whether a certain user exists or not (username enumeration) on a target OpenSSH server:


``` c
  87 static int
  88 userauth_pubkey(struct ssh *ssh)
  89 {
 101         if (!authctxt->valid) {
 102                 debug2("%s: disabled because of invalid user", __func__);
 103                 return 0;
 104         }
 105         if ((r = sshpkt_get_u8(ssh, &have_sig)) != 0 ||
 106             (r = sshpkt_get_cstring(ssh, &pkalg, NULL)) != 0 ||
 107             (r = sshpkt_get_string(ssh, &pkblob, &blen)) != 0)
 108                 fatal("%s: parse request failed: %s", __func__, ssh_err(r));
```


The attacker can try to authenticate a user with a malformed packet (for example, a truncated packet), and:

-  if the user is invalid (it does not exist), then userauth_pubkey() returns immediately, and the server sends an SSH2_MSG_USERAUTH_FAILURE to the attacker;

-  if the user is valid (it exists), then sshpkt_get_u8() fails, and the server calls fatal() and closes its connection to the attacker.



```
usage: ssh-check-username.py [-h] [-t HOSTNAME] [-p PORT] [-u USERNAME] [-w WORDLIST]

options:
  -h, --help   show this help message and exit
  -t HOSTNAME  Single target
  -p PORT      port to connect on: Default port is 22
  -u USERNAME  username you want to enumerate
  -w WORDLIST  enumerate multiple users
```

# DISCLAIMER

Please use this script responsibly and only on systems where you have permission to access. Unauthorized access to a system can lead to severe legal consequences.
文件快照

[4.0K] /data/pocs/a97dd7a2a705eae746a2d4375ebdaf35cc00b288 ├── [1.5K] PoC_CVE-2018-15473.py ├── [1.9K] README.md └── [ 24] wordlist.txt 0 directories, 3 files
神龙机器人已为您缓存
备注
    1. 建议优先通过来源进行访问。
    2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
    3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。