LinuxQuestions.org
Visit Jeremy's Blog.
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 03-21-2007, 07:40 PM   #1
x42bn6
LQ Newbie
 
Registered: Oct 2006
Distribution: Ubuntu 9.10
Posts: 24

Rep: Reputation: 15
A "recipe" to check server security briefly


Alright, I help run a forum that runs an old version of RedHat and I don't have full access to the server but I do have console access. I intend to check the server every day for weird things happening. If it is possible for anyone to give a list of commands they recommend to run? I can interpret a few things and I notice suspicious stuff easily. Obvious ones are probably lsof and dmesg, any others?
 
Old 03-21-2007, 09:05 PM   #2
fukawi2
Member
 
Registered: Oct 2006
Location: Melbourne, Australia
Distribution: ArchLinux, ArchServer, Fedora, CentOS
Posts: 449

Rep: Reputation: 34
Some basic tools to add to that would be last, lastlog, lastb, cat /var/log/secure, top

That is assuming that if your server is compromised, then the intruder hasn't modified those programs to hide their activities (ie, a rootkit)

chkrootkit and rkhunter are some good programs to help detects rootkits, although there are some caveats to look out for in running them. Another good tool is LogWatch which will give you the daily highlights for your log files.

If you're really paranoid and can spend the time setting it up and configuring it, have a look at OSSEC HIDS - I run it on my publicly accessible mail server and it's quite annoying, but I always know when there's something unusual happening...
 
Old 03-22-2007, 03:51 PM   #3
pileofrogs
LQ Newbie
 
Registered: Mar 2007
Location: Seattle
Distribution: CentOS, Fedora, Ubuntu
Posts: 17

Rep: Reputation: 0
netstat -an | grep LISTEN
df -h
uptime
free

Are personal favorites of mine. They're not really about detecting if you've been haxored, but more about detecting if things aren't as you hope they should be. And you can put them in a cron job and get the results emailed to you every day, so you can do that daily check every day without having to remember to log into your box.
 
Old 03-22-2007, 08:31 PM   #4
OlRoy
Member
 
Registered: Dec 2002
Posts: 306

Rep: Reputation: 86
You could also try using "Artifical Ignorance" to find interesting entries in logs.

http://www.ranum.com/security/comput.../ai/index.html
 
Old 03-23-2007, 12:29 AM   #5
xerophyte
LQ Newbie
 
Registered: Dec 2003
Location: Toronto,Ontario,Canada
Posts: 18

Rep: Reputation: 1
you can also install some Host-based Intrusion Detection System and monitor the system, try http://ossec.net which is good one to monitor the server
 
  


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
apache security for intranet: "listen 80" vs. "listen 127.0.0.1:80" pulper Linux - Software 3 09-27-2006 06:24 AM
difference between "Web server local URL" and "IPv4 address"? kpachopoulos Linux - General 2 09-17-2004 01:30 PM
"YOU" says "could not write server list to disk" dushkinup Linux - Distributions 4 07-26-2004 12:01 PM
Mandrake 10: Issues with "higher" security setting and web server maverick106 Mandriva 6 04-26-2004 10:39 AM
What is "Xlib: connection to ":0.0" refused by server " rack201 Linux - Software 1 02-04-2004 07:49 AM

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

All times are GMT -5. The time now is 05:55 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