/etc/aide/aide.conf

The /etc/aide/aide.conf file is the main configuration file for AIDE (Advanced Intrusion Detection Environment), a host-based intrusion detection system (HIDS) used to monitor file integrity on Unix-like systems. This file allows administrators to define which files, directories, and attributes to monitor for changes, configure reporting options, and set exclusion rules. Here’s an overview of what you might find in /etc/aide/aide.conf and its significance:

Purpose of /etc/aide/aide.conf

The primary purpose of /etc/aide/aide.conf is to:

  • Define the scope of file and directory monitoring for AIDE.

  • Specify which attributes of files and directories (like permissions, checksums, and timestamps) to include in integrity checks.

  • Configure how often integrity checks should occur and where reports should be sent.

Typical Configuration Options

  1. Selection of Files and Directories: Specify which files and directories to include or exclude from monitoring.

    /bin
    /sbin
    /lib
    !/lib/init/initramfs-tools
  2. Attributes to Monitor: Define which file attributes to include in integrity checks, such as permissions, checksums, and modification times.

    /var
      p+i+n+u+g+s+b+m+c+md5+sha256
  3. Report and Notification Settings: Configure how and where AIDE should report changes and alerts.

    verbose=20
    report_url=stdout
  4. Database and Initialization: Settings related to the AIDE database, initialization process, and update mechanisms.

    database=file:/var/lib/aide/aide.db
    database_out=file:/var/lib/aide/aide.db.new
    database_new=file:/var/lib/aide/aide.db.new
  5. Logging and Output: Options related to logging and output formats for AIDE reports.

    log_to_syslog=yes
    log_to_syslog_priority=LOG_NOTICE
    log_to_stderr=yes

Example Configuration

Here’s a simplified example of what /etc/aide/aide.conf might look like:

# Define the directories and files to monitor
/bin
/sbin
/lib
!/lib/init/initramfs-tools

# Define attributes to monitor for /var directory
/var
  p+i+n+u+g+s+b+m+c+md5+sha256

# Report settings
verbose=20
report_url=stdout

# Database settings
database=file:/var/lib/aide/aide.db
database_out=file:/var/lib/aide/aide.db.new
database_new=file:/var/lib/aide/aide.db.new

# Logging settings
log_to_syslog=yes
log_to_syslog_priority=LOG_NOTICE
log_to_stderr=yes

Security Considerations

  • Secure Configuration: Ensure that the configuration accurately reflects the security requirements and monitoring scope of your system.

  • Access Controls: Restrict access to the AIDE configuration file (/etc/aide/aide.conf) to prevent unauthorized modifications.

  • Regular Reviews: Periodically review and update the AIDE configuration to adapt to changes in system environment and security policies.

Conclusion

/etc/aide/aide.conf plays a crucial role in configuring AIDE to monitor file integrity effectively on Unix-like systems. By understanding and correctly configuring this file, administrators can enhance their system’s security posture by detecting unauthorized changes promptly and maintaining system integrity.

Last updated