Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sat Jul 28, 2012 1:16 pm 
Offline
Senior Newbie

Joined: Wed May 16, 2012 1:51 pm
Posts: 12
Suppose I'm an attacker trying to gain access to a server that disallows root login. I assume (as the attacker) the server requires a user name and a password.

Suppose I correctly guess the user name, but give the wrong password for a login attempt.

Is there any way I would know that I've got the user name correct? Or does the failed login basically give me no useful information?


Top
   
PostPosted: Sat Jul 28, 2012 2:11 pm 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
OpenSSH will not reveal to the attacker whether it was the username or the password that was incorrect, just that the login attempt failed.

One could always test a username by trying to send mail to it, which is an imperfect indicator. Other services (e.g., finger) can potentially reveal usernames also.

Installing and using something like fail2ban or denyhosts will reduce the number of brute-force login attempts that clutter your logs.


Top
   
PostPosted: Sat Jul 28, 2012 5:46 pm 
Offline
Senior Newbie

Joined: Wed May 16, 2012 1:51 pm
Posts: 12
Thanks for the help! I was just trying to get a rough sense of how important the relative guessability of the username would be.


Top
   
PostPosted: Sat Jul 28, 2012 8:21 pm 
Offline
Senior Member
User avatar

Joined: Sun Dec 27, 2009 11:12 pm
Posts: 1038
Location: Colorado, USA
xenox wrote:
I assume (as the attacker) the server requires a user name and a password


Never assume the attacker is dumber then you are.

Setup SSH to use ONLY certs, then you don't care who or what guesses your user names.

_________________
Either provide enough details for people to help, or sit back and listen to the crickets chirp.
Security thru obscurity is a myth - and really really annoying.


Top
   
PostPosted: Sun Jul 29, 2012 12:18 am 
Offline
Senior Member

Joined: Wed Jun 27, 2012 10:00 pm
Posts: 87
Website: http://hemonc.org/wiki/Main_Page
vonskippy wrote:
xenox wrote:
I assume (as the attacker) the server requires a user name and a password


Never assume the attacker is dumber then you are.

Setup SSH to use ONLY certs, then you don't care who or what guesses your user names.
Yeah, this was a security policy that I used for the first time while setting up my Linode. After seeing the bafflingly large number of attempted logins in my logs for root and various other usernames, I'm very happy that I set this up and that it is commonly mentioned as part of various guides.

_________________
Amateur, eager to learn.
My hematology, oncology, and chemotherapy regimen wiki


Top
   
PostPosted: Mon Jul 30, 2012 8:16 pm 
Offline
Junior Member

Joined: Thu Feb 05, 2009 12:48 pm
Posts: 24
Why not just change the port and/or only permit access from trusted ip's?


Top
   
PostPosted: Mon Jul 30, 2012 8:23 pm 
Offline
Senior Member
User avatar

Joined: Sun Dec 27, 2009 11:12 pm
Posts: 1038
Location: Colorado, USA
Because security thru assumed obscurity isn't (hint: they're called port scans).

And some people don't have static IP's or need to access their systems while on the road so a "trusted IP" isn't always available.

_________________
Either provide enough details for people to help, or sit back and listen to the crickets chirp.
Security thru obscurity is a myth - and really really annoying.


Top
   
PostPosted: Tue Jul 31, 2012 9:28 am 
Offline
Junior Member

Joined: Thu Feb 05, 2009 12:48 pm
Posts: 24
vonskippy wrote:
Because security thru assumed obscurity isn't (hint: they're called port scans).

And some people don't have static IP's or need to access their systems while on the road so a "trusted IP" isn't always available.

It will still eliminate 99.9% of your failed login attempts.


Top
   
PostPosted: Tue Jul 31, 2012 9:32 am 
Offline
Senior Member

Joined: Mon Jul 05, 2010 5:13 pm
Posts: 392
There are two situations where security is concerned:

1) You're using strong passwords/keys, and those 99.9% don't have a chance anyway. They're just log spam.

2) You're not using strong passwords/keys, and you're dead in the water anyway, because any half-decent attempt will succeed, regardless of changing ports or whatever.

If you're concerned with log spam, use logrotate. That's what it's there for.

- Les


Top
   
PostPosted: Tue Jul 31, 2012 9:49 am 
Offline
Senior Member

Joined: Sun May 23, 2010 1:57 pm
Posts: 315
Website: http://www.jebblue.net
I recommend at least ip rate limiting plus maybe fail2ban or something like it. This is because
I do not know the motivations of the people running the feeble hacking tool.


Top
   
PostPosted: Tue Jul 31, 2012 7:53 pm 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
vonskippy wrote:
Because security thru assumed obscurity isn't (hint: they're called port scans).

And some people don't have static IP's or need to access their systems while on the road so a "trusted IP" isn't always available.

Here's the funny thing, though.

If you're being targetted by an attacker then, yes, a port scan will expose the port anyway. BUT if you're just seeing random internet noise then simply changing the port will stop this because your random zombie doesn't port scan before hand (it takes too long, especially if you DROP traffic).

This means that you're not wasting CPU cycles negotiating SSL; you're not wasting disk space on logs, CPU on fail2ban or similar, resources on accepting connections etc etc.

It's a very very small win, but it is a win :-)

_________________
Rgds
Stephen
(Linux user since kernel version 0.11)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group