AIDE (Advanced Intrusion Detection Environment) is a host-based intrusion detection tool that implements file integrity monitoring (FIM): it builds a baseline database capturing cryptographic hashes and metadata for every file it is configured to watch, and on subsequent runs compares the live filesystem against that database, reporting anything that has been added, removed, or changed. Its security premise is detection after the fact: AIDE does not prevent modifications (that is the role of fapolicyd, SELinux, and IMA), but it provides a reliable, auditable record that modifications occurred, when a check was run, and which specific attributes changed. An attacker who compromises a system and modifies a binary, a configuration file, a cron job, or an SSH authorized_keys file will leave a fingerprint in the next AIDE check — provided the database has not also been compromised, which is the central operational concern the tool’s deployment model must address.
AIDE’s configuration file (/etc/aide.conf on RHEL) defines the monitoring scope and the attribute groups to record. Each rule maps a path (literal or regular expression) to a named attribute group — a bitmask of properties to capture. The standard RHEL groups include: p (permissions), i (inode number), n (number of hard links), u (user/UID), g (group/GID), s (size), b (block count), m (mtime), c (ctime), a (atime), sha256 and sha512 (content hashes), acl (POSIX ACLs), xattrs (extended attributes including SELinux labels), and e2fsattrs (ext2/4 filesystem flags like immutable). A typical RHEL default rule watches /etc with all attributes including SHA-256 hash, /usr similarly, /boot fully, /var/log for additions only (since log files are expected to grow), and excludes high-churn directories like /var/spool, /tmp, and /proc to suppress noise. The attribute selection is a deliberate trade-off: capturing atime records every file read (very noisy, rarely useful), while capturing SHA-256 records content changes precisely at the cost of a full file read during each check run. The three-command operational lifecycle is: aide --init (build the baseline database at /var/lib/aide/aide.db.new.gz; the file is renamed to aide.db.gz before checks begin), aide --check (compare current filesystem against aide.db.gz and produce a report), and aide --update (re-scan and replace the database after legitimate changes have been reviewed and accepted). Checks are typically scheduled via cron or a systemd timer, and the resulting report sent to a central log or SIEM system.
AIDE’s fundamental weakness is its offline, retrospective nature and the database trust problem. Unlike IMA, which uses the TPM to accumulate a tamper-evident runtime measurement log that cannot be silently modified without breaking the PCR chain, AIDE’s database is a file on the same filesystem it protects — an attacker with root access can modify the database to match their changes and the next AIDE check will report nothing. Mitigating this requires storing the reference database off-system: on a read-only NFS mount, in a version-controlled repository, on a write-once object store, or burned to optical media at baseline time, so that the comparison at check time uses a copy the attacker cannot reach. Similarly, AIDE cannot detect compromises that occurred before the baseline was captured: if the system was already tampered with at aide --init time, the database records the tampered state as the baseline. AIDE also does not detect in-memory-only attacks or modifications to files it is not configured to watch. These limitations define AIDE’s correct positioning in a defence stack: it is a scheduled, retrospective, file-level detection control that complements IMA’s continuous, TPM-anchored, runtime measurement, fapolicyd’s execution-time allowlisting, and SELinux’s behavioural confinement — each covering a different dimension of the same integrity problem. AIDE is a STIG and CIS Benchmark requirement for RHEL servers, satisfying NIST SP 800-53 SI-7 (Software, Firmware, and Information Integrity) and PCI DSS Requirement 11.5, and is configurable at fleet scale via the aide RHEL Ansible system role.
