Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 03-21-2007, 08:40 PM   #1
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, 10:05 PM   #2
Registered: Oct 2006
Location: Melbourne, Australia
Distribution: ArchLinux, ArchServer, Fedora, CentOS
Posts: 448

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, 04:51 PM   #3
LQ Newbie
Registered: Mar 2007
Location: Seattle
Distribution: CentOS, Fedora, Ubuntu
Posts: 17

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

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, 09:31 PM   #4
Registered: Dec 2002
Posts: 304

Rep: Reputation: 86
You could also try using "Artifical Ignorance" to find interesting entries in logs.
Old 03-23-2007, 01:29 AM   #5
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 which is good one to monitor the server


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

All times are GMT -5. The time now is 02:58 AM.

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