<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="Osso Notes">
<title></title></head>
<body>
<p>> On Sat, 2010-08-28 at 01:22 +0100, Daniel Case wrote:
<br>> > Hi there,
<br>> >
<br>> > One of my servers has recently been attacked, it has one remote SSH
<br>> > user which cannot run 'sudo', i made it like that so that if it was
<br>> > comprimized, no-one would be able to do much.
<br>> >
<br>> > However, someone managed to gain the password to that account on the
<br>> > server then used "vi /etc/passwd" to gain a list of users, then
<br>> > launched a bruteforce using su against my admin account.
<br>> > (that's what I can gather from the logs)
<br>> >
<br>> > This did not get very far before I saw and kicked the user off and
<br>> > changed all of the passwords, but I would like to know how to prevent
<br>> > this sort of thing happening again.
<br>> >
<br>> > I need to know mainly how to stop the SSH user running su in the first
<br>> > place and how to stop the user seeing files like /etc/passwd
<br>> >
<br>> > Anyone have any suggestions?
<br>>
<br>> Denyhosts is quite useful in stopping brute force attacks. After so many
<br>> failed attempts it just blocks the attacking IP.
<br>>
<br>> -Matt Daubney
<br><snip>
<br>Also consider using fail2ban. You could also configure your server to not permit root logins in the /etc/ssh/sshd_config
<br>
<br>Also start using key based authentication and do not permit password based logins (if this is possible for your situation!)
<br>
<br>Hope this helps.
<br>
<br>P <br></p>
</body>
</html>