Installing #AIDE on #CentOS 5.2

On March 8, 2009, in Centos, by How2CentOS

centosAIDE (Advanced Intrusion Detection Environment) is a free replacement for Tripwire. It does the same things as the semi-free Tripwire and more. This is a must have when maintaining the integrity of your servers.

Installing Aide

# yum install aide

Initializing Aide’s Records

The next thing we need to do is create the initial AIDE database. Run the following command:

# /usr/sbin/aide --init

This will take a little bit of time to run, depending on the size of your file system and you’ll have some disk churn while aide interrogates your system and creates a baseline database. Once this is done, we’re going to test by doing an initial query of the system. Run the command below:

# cp /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz
# /usr/sbin/aide --check

This copies the initial database to the current database, then checks them against each other. In theory you should not have any differences. If you do, investigate them. As we’re still setting this up, they’re likely to be mundane .viminfo files or something similar. Keep in mind that when you update applications via ‘yum update’ that you may see aide go a bit nuts, just as tripwire or others would. You’re replacing files on your system when you update, and this is exactly what aide is designed to warn you about. In a perfect world, you should get some output like the text below:

# aide --check
AIDE, version 0.13.1
### All files match AIDE database. Looks okay!

Add the following to Crontab

# crontab -e
# Daily AIDE integrity check
0       1       * * * /usr/sbin/aide --check | /bin/mail -s "$HOSTNAME - Daily AIDE integrity check" admin@georgerushby.com

This runs a check once a day.

No related posts.

Tagged with:  

View Comments to “Installing #AIDE on #CentOS 5.2”

  1. Ian says:

    Are you suggesting that it's desirable or even practical to check every single file on a system?

  2. How2CentOS says:

    Absolutely not, the above installation guide is just the foundation.

    AIDE can be configured and optimized to ignore files and folders at the Admins discretion (i.e. excluding /proc /var/log).

    Just to clarify, it's an installation guide and not a configuration guide.

  3. Ian says:

    OK, thanks, I understand. My mistake. CentOS appears to come with a default config file, which appears to be sufficient as a starting point. i.e. it doesn't alert on every single changed file on the system.

    Thanks for the install guide. Before I saw it I wasn't even aware there was an rpm in the CentOS repo. Doh!

Leave a Reply

blog comments powered by Disqus
Get Adobe Flash playerPlugin by wpburn.com wordpress themes
Afrigator
Blog WebMastered by All in One Webmaster.