Course contentsShow
← Security
Lesson 1501 of 3,05230. Operating System Security - MonitoringFree lesson

FIM Implementation with AIDE

Installing and configuring AIDE (Advanced Intrusion Detection Environment) to create file baselines and detect modifications.

FIM Implementation with AIDE

What You'll Learn

You'll learn how to install and configure AIDE (Advanced Intrusion Detection Environment) to establish file baselines and automatically detect unauthorized modifications to critical system files.

What is AIDE?

AIDE is a file integrity monitoring tool that works like taking a detailed photograph of your filesystem. It records cryptographic checksums, permissions, timestamps, and other attributes of files, then periodically compares the current state against that baseline to catch tampering, rootkits, or unauthorized changes.

Think of AIDE as a security camera for your files—it doesn't prevent break-ins, but it definitely tells you when someone's been messing with your stuff.

Installing AIDE

On most Linux distributions, installation is straightforward:

sudo apt install aide          # Debian/Ubuntu
sudo yum install aide          # RHEL/CentOS

Creating Your Initial Baseline

The first step is initializing AIDE's database—capturing the "before" snapshot:

sudo aideinit

This creates /var/lib/aide/aide.db.new, which becomes your reference database. Move it into place:

sudo mv /var/lib/aide/aide.db.new /var/lib/aide/aide.db

Configuring What to Monitor

Edit /etc/aide/aide.conf to specify directories and what attributes to track. AIDE uses rules like:

/bin R+a+sha256
/etc p+i+u+g+sha256
!/var/log

These directives tell AIDE to monitor /bin for reads and attributes, track /etc closely, but exclude noisy /var/log.

Running Checks

Perform integrity checks against your baseline:

sudo aide --check

AIDE reports added, removed, or modified files—your alert that something changed.

Key Takeaway: AIDE creates cryptographic snapshots of your filesystem and detects unauthorized changes by comparing current state against trusted baselines—essential for detecting breaches and maintaining system integrity.