LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 09-27-2007, 06:31 PM   #16
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380

Quote:
Originally Posted by mlnutt View Post
as I stated previously, changing the port is NOT the only thing one should do.
Yes, and it would have been so much better if you could have been as verbose the first time you posted, instead of making it sound like the port change would magically make the box more secure. Yes, his logs will be clean now (expression borrowed from unixfool), but he is still just as vulnerable as he was before. Hopefully he'll implement some of you guys' other suggestions in the near future. It would IMHO be a huge waste if someone with security concerns ends-up only taking measures which essentially add up to nothing more than a cosmetic improvement.

Last edited by win32sux; 09-27-2007 at 06:32 PM.
 
Old 09-27-2007, 06:49 PM   #17
OlRoy
Member
 
Registered: Dec 2002
Posts: 306

Rep: Reputation: 86
Risk = Threat X Vulnerability X Asset Value.

I think people who advocate changing the port are focusing on the threat (worms, botnets, and attackers doing port sweeps). The people who say that isn't effective and you're still just as vulnerable are focusing on the vulnerability part of the equation. Whether you focus on the threat or vulnerability, you're reducing risk which is a good thing.
 
Old 09-27-2007, 06:58 PM   #18
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by OlRoy View Post
I think people who advocate changing the port are focusing on the threat (worms, botnets, and attackers doing port sweeps). The people who say that isn't effective and you're still just as vulnerable are focusing on the vulnerability part of the equation.
FWIW, I agree with you on this. Math rules!

EDIT: I would just add that even though the threat might be reduced a little with regards to automated attacks, it isn't reduced regarding determined attackers. That is a key point, and has a great effect on the equation IMHO. By focusing on the underlying vulnerabilities, risk is reduced way more - which brings us back to the "it's not the only thing you should do" thing, yada yada.

Last edited by win32sux; 09-28-2007 at 05:00 PM.
 
Old 09-28-2007, 01:25 AM   #19
baddah
Member
 
Registered: Feb 2006
Location: Cape Town,South Africa
Distribution: Fedora Core 8
Posts: 188

Original Poster
Rep: Reputation: 30
Hi,Thanks for all the info.

I've done the following steps.

* Changed the port
* I've lowered the LoginGraceTime to 30 seconds
* I've made the MaxAuthTries 2
* I've changed MaxStartups to 3:50:10
* I've disabled root login onto the box,although i need it for some backups,so i did the following
PermitRootLogin forced-commands-only
PermitRootLogin yes
* I only enabled ssh for one user,and i made the username and password solid.

I'd like to enable just ssh-keys authenitication,and play around with hosts.deny,and so on,but currently my logs seems much better,so i'll monitor this before i start playing with that.

Also,how can i check,if someone got in,for possible backdoors on my system.What tools can i use?I'm busy going through all my servers logs now,I've noticed the following on one of them..

Code:
reverse mapping checking getaddrinfo for debian.licanet.cz failed - POSSIBLE BREAKIN ATTEMPT!
What does this mean?

Thanks
 
Old 09-28-2007, 07:23 AM   #20
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Quote:
I've disabled root login onto the box,although i need it for some backups,so i did the following
PermitRootLogin forced-commands-only
PermitRootLogin yes
You are MUCH better off disallowing root login and using either su or sudo to do root work over an SSH connection.

Quote:
but currently my logs seems much better,so i'll monitor this before i start playing with that.
This is the root cause of why I complain about moving ports in the first place. Absent any other changes, this is a false sense of security. Just because you're not getting pounded doesn't mean that the next try won't succeed.

Quote:
reverse mapping checking getaddrinfo for debian.licanet.cz failed - POSSIBLE BREAKIN ATTEMPT!
What it means is that the SSH server wasn't able to verify that the address being used is legit. In other words, someone is spoofing IP addresses or domains. If this occurred on your new SSH port, then they've found you again.

Quote:
Also,how can i check,if someone got in,for possible backdoors on my system.
You could use chkrootkit and rkhunter to look for things. You should also look through your logs and see if anyone actually managed to log into SSH that you don't recognize. Also look through the output of lsof -i and see if there are any services listening that you don't recognize. Looking at root's .bash_history couldn't hurt either. You also might want to install Aide, Samhain or Tripwire to monitor the status of the files on your computer. These won't stop a break in but they can tell you what was done.

Of course none of this makes any difference if you actually were compromised as the skilled crackers will take steps to hide their steps from the normal sorts of approaches and checkers like Aide won't detect a break in if they are installed after it occurred.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hack Attempt? keysorsoze Linux - Security 6 05-18-2007 11:32 PM
Apache logs - Hack attempt or not? lawadm1 Linux - Software 6 11-05-2004 11:53 PM
newbie question: do these logs show a hack attempt lucastic Linux - Security 4 08-13-2003 08:07 AM
not linux related, had a hack attempt neo77777 General 13 03-22-2002 04:57 PM
access.log:Possible Hack attempt? plisken Linux - Security 5 01-04-2002 02:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration