95 points · by sucuri2 · 17y ago · 60 comments
Of course if this is the case then the exploit is likely to be used aggressively sometime in the near future...
However, after it's done that repeatedly (presumably doing some sort of sniffing to work out exactly which version of sshd is running), it then attempts to login. Here's the interesting bit: when it tries to login with a user than doesn't exist, instead of just generating the
"Invalid user test from xx.xx.xx.xx" log entry,
sshd also outputs another log entry, directly afterwards: "input_userauth_request: invalid user test"
which I haven't seen before. I'm not particularly au fait with the internals of sshd, but I would suspect that this new (well, if it is new) script has found an exploit in the part of SSHD which (logically) checks if a user exists first, but the login is being rejected deeper in sshd, when it tries to do the actual authentication.(All the above is speculation, however: I'm no expert on SSH)
This still does not solve the problem but it is a smallish roadblock.
I would also set MaxStartups to 1 if you are the only person to login. This limits the number of unauthenticated people trying to concurrently log in.
However, that wouldn't work in this case anyway because if there's a working exploit in sshd then an auth/username failure would never even be logged. It'd be straight in first try.
I compromised on some of my boxes and made a non-published/non-linked URL that if you hit it, your source IP will end up on the SSH-allowed list. That plus a non-standard SSH port seems to keep 99.9999% of the risk out of the way without being too overly cumbersome to knock-through when needed.
[EDIT] You could always just set up iptables to accept traffic from your ISPs subnet and deny the rest.
Only one knock is needed to keep the port open for my current IP address indefinitely, or it can be closed immediately without losing my ssh connection.
It also precludes the necessity of filling up iptables with boatloads of DROPs to keep out the riff-raff.
I'm only at OpenSSH_3.9p1 yet up2date says everything is up to date.
Our forums see tons of questions about this, with folks assuming that because they have an "old" version of PHP or Apache or whatever, that it has known security vulnerabilities. When, in reality, an RHEL released package is probably at least as well-vetted for security as the latest release from upstream.
But, in this case, since there is no known exploit (and it is possibly fictional), there's nothing vendors can possibly do about the problem. I suppose vendors could have been quietly notified of the problem, and we'd start seeing new releases rolling out; but you'd see errata on the relevant vendors website. Asking random folks on HN wouldn't be the best course of action for reliable answers.
Anyway, OpenSSH.org has nothing on the subject.
Second, it would apparently only concerns old versions of OpenSSH. Quoting the link: "It is against an older version of OpenSSH" (OpenSSH_4.3).
The submitted link seems to copy/paste most of its content from this article, but it didn't include the version information.
Can someone tell me what the anti-sec movement is?
It is a loose movement that kind of fights against the traditional for-profit computer security industry. they think that publicizing security holes and those hole's exploits causes more pain than it helps. They also seem to be kind of anti-capitalist. A bunch of docs have been written about their goals and ideas. They aren't really script kiddies, some of them are very talented security researchers.
google around for the el8 magazine, also 'phrack high council' or just antisec in general
Just clarifying the term.
sshd: IP1 IP2 .domain.com
The .domain.com allows any IP which reverses to .domain.com.I ran:
grep Accepted /var/log/secure*|grep ssh2|perl -lne '/for (\S+) from (\S+)/ && print "$1 $2"'|sort -u
To find all IPs/users that logged in.This may give you trouble if you SSH from e.g. some mobile connection or from random wifis around the world.
$ lsb_release -d
Description: Ubuntu 9.04
$ ssh -v
OpenSSH_5.1p1 Debian-5ubuntu1, OpenSSL 0.9.8g 19 Oct 2007The newest releases use 5.1
$ cat /etc/debian_version
5.0.2
$ ssh -v
OpenSSH_5.1p1 Debian-5, OpenSSL 0.9.8g 19 Oct 2007However, the default version on RHEL, Fedora are vulnerable. So, it is a big issue if there is no patch from your distribution (unless you use ssh from source which is not common).
better check those firewall settings.