News for hackers. Stuff that matters.
Re:OpenSSH user enumeration by tptacek on Sunday August 19, 2018 @01:41AM (#17792795)
If you're a startup and this matters to you, you're doing it very wrong.
Re:OpenSSH user enumeration by ronnier on Sunday August 19, 2018 @02:38AM (#17792922)
Sorry, can you explain what you mean by this? I didn’t follow.
Re:OpenSSH user enumeration by exikyut on Sunday August 19, 2018 @03:28AM (#17793047)

  ChallengeResponseAuthentication no # \
  PasswordAuthentication no          # | nukes "Password: "
  UsePAM no                          # /
  PermitRootLogin no                 # (duh)
  PubkeyAuthentication yes           # enables public keys; very important
  AllowUsers user1 user2             # maybe? combine with an obscure username...
Re:OpenSSH user enumeration by simias on Sunday August 19, 2018 @06:51AM (#17793709)
If you're doing admin on the machine you might not want to disallow root login.
Re:OpenSSH user enumeration by exikyut on Sunday August 19, 2018 @09:03AM (#17794129)
I once set up a Slackware-based recovery partition on a USB HDD, and configured it so I could SSH to the machine, as root, with no password. (Took a bit of doing, too. OpenSSH is well built.) This HDD was only ever used for recovery.

Incidentally I only ever used it at home, on a LAN that only has devices I know about on it. In a work environment I'd only ever do the same running off an isolated lab switch.

But in certain situations, "login to the box as root w/ no pw" is awesome for rapid bringup/diagnosis/repair/whatever.

Re:OpenSSH user enumeration by protomyth on Sunday August 19, 2018 @07:14AM (#17793775)
Use sudo or doas.
Re:OpenSSH user enumeration by oxymoron on Sunday August 19, 2018 @03:12AM (#17793004)
I think he’s saying:

a) Why are you using bleeding edge software in production, and especially so unreleased versions of OpenSSH?

b) Why are your SSH servers exposed to public traffic?

c) User enumeration is useful for finding accounts with weak passwords. Why do you have personal accounts on prod servers? Why do you have _any_ accounts not using public key authentication at all?

Re:OpenSSH user enumeration by exikyut on Sunday August 19, 2018 @03:20AM (#17793021)
FWIW, regarding a),

> We believe that this issue warrants a CVE; it affects all operating systems, all OpenSSH versions (we went back as far as OpenSSH 2.3.0, released in November 2000), and is easier to exploit than previous OpenSSH username enumerations...

As for b) and c), I 100% agree.

In fact: if you're using KVM-based virtualization, and you have VNC or serial access to your node (GCP gives you serial access, via web UI or an SSH-based proxy), you could completely _disable_ standard network-based login. (Writing an admin tool that connects to the serial console, gets a usable shell, and enables your sshd for when you need it, is an exercise for the inspired sysadmin. :P)

But this fun little trick is going to break a lot of stuff.

Re:OpenSSH user enumeration by e12e on Sunday August 19, 2018 @08:16AM (#17793982)
Just remember (at least for non ephemeral systems): always have two ways in. That way if one path is down (fiber cable cut, serial disconnected, cloud admin panel down for maintenance, ssh authorized_keys file has wrong permissions, ssh/ssl cert(s) expired... ) - you can still get in via the other path.
Re:OpenSSH user enumeration by exikyut on Sunday August 19, 2018 @08:42AM (#17794069)
A very good idea.

Perhaps a valuable resource would have a disposable proxy in front of it; then one way in (or even no ways in!) might be viable.

Re:OpenSSH user enumeration by oxymoron on Sunday August 19, 2018 @03:29AM (#17793050)
Ah, my bad. I got the impression that it was introduced in the commit on the 31st of July.
Re:OpenSSH user enumeration by exikyut on Sunday August 19, 2018 @03:30AM (#17793052)
All good!
Re:OpenSSH user enumeration by tjoff on Sunday August 19, 2018 @03:39AM (#17793077)
b) If not SSH what else would one use?

c) Not only production servers utilize internet.

Re:OpenSSH user enumeration by oxymoron on Sunday August 19, 2018 @10:02AM (#17794357)
b) use ssh, but control access with a firewall or vpn.

c) fair enough, although you should probably be using keypairs and a vpn for test and dev envs too.

Re:OpenSSH user enumeration by xorcist on Sunday August 19, 2018 @10:13AM (#17794392)
I see that recommendation a lot, but I'd expect most VPN products in use to be _less_ secure than a standard OpenSSH. It's a comparably less complex protocol and codebase than IPsec, for example, and pretty well audited by now. It's not as if VPN products hasn't been open to this type of attacks before (I'm looking at you, Cisco).
Re:OpenSSH user enumeration by chancecarey on Sunday August 19, 2018 @02:45AM (#17792948)
What do you mean? The email was sent from a a security research group.
Re:OpenSSH user enumeration by thaumaturgy on Sunday August 19, 2018 @03:18AM (#17793019)
To hazard a guess: it should be standard practice to use public key authentication for ssh (>= 2048 bits rsa or ecdsa), so this attack shouldn't make compromising a system any easier. Better yet, use a Yubikey or equivalent.

Other commenters have mentioned this attack getting information on hosted services on the system. But, usually you can get that from a straightforward nmap or other recon tool anyway.

Re:OpenSSH user enumeration by tialaramex on Sunday August 19, 2018 @04:52AM (#17793346)
Without suggesting anybody should use less than 2048-bit RSA in 2018, the security margin for even 1024-bit SSH RSA user authentication is pretty good.

In SSH first every connection is encrypted (before either side knows who the other is, encryption is used already, this is the same approach taken in TLS 1.3), then the server has to authenticate to the client, and then the client authenticates to the server on behalf of a specific user.

User public key authentication is a multi-phase protocol. This would be too awkward for something like HTTP where round trip times may be appalling, but SSH is rarely used at long distances.

In phase 1 the client proposes that it can authenticate for some public key Pn, it sends this proposal to the server, and the server can either say OK, go ahead, or reject this authentication without seeing it done, on the basis that it doesn't trust Pn anyway. It can keep trying different Pn until either it runs out or the server grows tired of this nonsense and disconnects it.

Once it has an OK, in phase 2 the client signs a nonce with the private key corresponding to Pn, which the server can now verify. If the signature checks out, the authentication was successful.

This means an adversary who knows your SSH username but has nothing else would need to literally _guess_ your hypothetical 1024-bit RSA key, not just (already hard but plausibly within the grasp of a resourceful adversary) break a 1024-bit RSA public key to find the associated private key, as your client only tells authenticated servers even the _public_ key.

Aside: One thing I'm surprised I haven't seen done with this part of the SSH design is user TOFU [Trust On First Use]. Lots of home or small / non-security business SSH setups do TOFU for server authentication, sometimes with a fig leaf ("Ask Jerry in IT to tell you the SSH keys" or "The SSH server keys are pasted into this Wiki page"). But I've never seen people do TOFU for the user authentication. In a similarly lax environment why not set up new users, and then when they first connnect just accept whichever public key they offer as "their" key, set that as trusted, and from then on insist on the same key for that user ? I feel like password auth is often left enabled because people are using it for an "initial" authentication step when first setting up without yet trusting any keys - and then never remove it. With "User TOFU" they'd have no incentive to enable password authentication at all.