News for hackers. Stuff that matters.
Re:SSH server 0-day exploit by dryicerx on Tuesday July 07, 2009 @03:10PM (#692204)
For the time being, would be also a good idea to move the ssh port to something other than 22 to avoid getting carpet-bombed by automated exploiting scripts.
Re:SSH server 0-day exploit by lanaer on Tuesday July 07, 2009 @03:46PM (#692287)
That is always a good idea, anyway. Been a long while since I’ve used the standard ssh port on servers under my control.
Re:SSH server 0-day exploit by buugs on Tuesday July 07, 2009 @04:22PM (#692361)
I don't understand why people don't do this it is so much harder if not impossible for people to break into your server by normal means especially when you add MaxAuthTries 3
Re:SSH server 0-day exploit by jrockway on Tuesday July 07, 2009 @05:31PM (#692576)
I am pretty sure that 0-day remote exploits don't respect MaxAuthTries.
Re:SSH server 0-day exploit by lanaer on Tuesday July 07, 2009 @08:13PM (#692935)
So long as the exploit doesn’t require multiple login attempts at all (which I assume it wouldn’t) yeah. MaxAuthTries protects against other things.
Re:SSH server 0-day exploit by weaksauce on Tuesday July 07, 2009 @05:35PM (#692586)
The default setting is 6. You are not throttling the attack too much by setting this to 3. I would set it to 0 so if you make one bad attempt you are out.

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.

Re:SSH server 0-day exploit by sho on Tuesday July 07, 2009 @05:32PM (#692577)
MaxAuthTries only logs errors, right? That by itself is not enough. You'd want fail2ban or bansshee or something, which tail those log files and blackhole any IP that causes an auth/username failure too many times in a certain period.

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.

Re:SSH server 0-day exploit by deutronium on Tuesday July 07, 2009 @03:44PM (#692278)
Or possibly set up port knocking, may be overkill though
Re:SSH server 0-day exploit by tlrobinson on Tuesday July 07, 2009 @03:48PM (#692290)
Is port knocking a common defense these days? I remember reading about it awhile ago, and thought it was a neat idea but didn't really think people would actually use it.
Re:SSH server 0-day exploit by brk on Tuesday July 07, 2009 @03:52PM (#692299)
I use it. It's really handy, but somewhat cumbersome if you just want to jump on an SSH shell to a box from a new machine.

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.

Re:SSH server 0-day exploit by deutronium on Tuesday July 07, 2009 @03:54PM (#692305)
I don't think it is that popular too be honest, while it is good at preventing access from port scanners etc., the clients aren't standard utilities.

[EDIT] You could always just set up iptables to accept traffic from your ISPs subnet and deny the rest.

Re:SSH server 0-day exploit by Gibbon on Tuesday July 07, 2009 @06:13PM (#692698)
I use a simplified one port "port knocker" with iptables setup such that an ascending or descending linear port-scan will leave the ssh port closed upon completion.

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.

Re:SSH server 0-day exploit by lamnk on Tuesday July 07, 2009 @08:28PM (#692962)
IMO port knocking isn't good defense, people can always use nmap to scan for open ports then try some combinations on them. Certificate authentication is way better (in combination with disabling password login)
Re:SSH server 0-day exploit by mariorz on Tuesday July 07, 2009 @09:26PM (#693008)
Certificate authorization alone may not protect you from 0-day exploits to your ssh server. Not all port knockers use that pinging ports combination technique. Again, I recommend a look at fwknop which addresses your concerns by using certificates actually.
Re:SSH server 0-day exploit by ars on Wednesday July 08, 2009 @03:21AM (#693486)
Port knocking doesn't use open ports. It acts as a packet sniffer, and doesn't do anything to the port.
Re:SSH server 0-day exploit by mariorz on Tuesday July 07, 2009 @03:44PM (#692277)
Probably better to use a port knocker. I recommend fwknop.