Configure Periodic Execution of AIDE
An XCCDF Rule
Description
At a minimum, AIDE should be configured to run a weekly scan.
To implement a daily execution of AIDE at 4:05am using cron, add the following line to /etc/crontab
:
05 4 * * * root /usr/bin/aide.wrapper --config /etc/aide/aide.conf --checkTo implement a weekly execution of AIDE at 4:05am using cron, add the following line to
/etc/crontab
:
05 4 * * 0 root /usr/bin/aide.wrapper --config /etc/aide/aide.conf --checkAIDE can be executed periodically through other means; this is merely one example. The usage of cron's special time codes, such as
@daily
and
@weekly
is acceptable.
Rationale
By default, AIDE does not install itself for periodic execution. Periodically
running AIDE is necessary to reveal unexpected changes in installed files.
Unauthorized changes to the baseline configuration could make the system vulnerable
to various attacks or allow unauthorized access to the operating system. Changes to
operating system configurations can have unintended side effects, some of which may
be relevant to security.
Detecting such changes and providing an automated response can help avoid unintended,
negative consequences that could ultimately affect the security state of the operating
system. The operating system's Information Management Officer (IMO)/Information System
Security Officer (ISSO) and System Administrators (SAs) must be notified via email and/or
monitoring system trap when there is an unauthorized modification of a configuration item.
- ID
- xccdf_org.ssgproject.content_rule_aide_periodic_cron_checking
- Severity
- Medium
- References
- Updated
Remediation - Ansible
- name: Ensure AIDE is installed
package:
name: '{{ item }}'
state: present
with_items:
- aide
Remediation - Shell Script
# Remediation is applicable only in certain platforms
if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
DEBIAN_FRONTEND=noninteractive apt-get install -y "aide"
# AiDE usually adds its own cron jobs to /etc/cron.daily. If script is there, this rule is