Mastering AIDE Linux: Essential Guide to Advanced Intrusion Detection and File Integrity Monitoring

Linux Advanced Intrusion Detection Platform – AIDE

AIDE (Advanced Intrusion Detection Environment) on Linux reflects the concept that “everything is a file“. It is a program focused on file and directory integrity comparison and checking.

How AIDE Linux Works

This tool has been around for quite some time and is simpler to operate compared to similar tools like Tripwire. It requires taking a snapshot of the system, recording the HASH values, modification times, and pre-processing done by the administrator. This snapshot allows the administrator to build a database that can then be stored on external devices for safekeeping. When the administrator wants to perform an integrity check on the system, they place the previously constructed database in an accessible area and use AIDE to compare the current system state with the database. Afterwards, AIDE reports any detected changes in the current system to the admin. Additionally, AIDE can be configured to run periodically, using scheduling tools like cron, to report daily checks on the system. This system is mainly used for operations security detection, and AIDE will report any malicious alternations found in the system to the administrator.

Features

Supports message digest algorithms: md5, sha1, rmd160, tiger, crc32, sha256, sha512, whirlpool Supports file attributes: file type, file permissions, inode, UID, GID, link name, file size, block size, link count, Mtime, Ctime, Atime Supports Posix ACL, SELinux, XAttrs, extended file system attributes Plain text configuration files, minimalist database Powerful regular expressions for easily filtering files and directories to monitor Supports Gzip database compression Standalone binary statically compiled client/server monitoring configuration

Download Address http://aide.sourceforge.net

Installation Configuration

vi /etc/aide.conf

Initialize Base Database

Routine Maintenance

1. Method to Rebuild Database (Normal changes incorporate updates to the base database)

2. Manual Security Verification Method

Email Notification

/home/aide.sh

Loop Script (Prevent attackers from discovering scheduled tasks) /home/defend

Start Command

External Email Configuration /etc/mail.rc

I use 163 for external emails, qq or new 163 accounts using SSL might cause failures in sending emails, you could also try sendEmail