Vulnerability Discussion
Protecting the integrity of the tools used for auditing purposes is a critical step toward ensuring the integrity of audit information. Audit information includes all information (e.g., audit records, audit settings, and audit reports) needed to successfully audit information system activity.
Audit tools include, but are not limited to, vendor-provided and open-source audit tools needed to successfully view and manipulate audit information system activity and records. Audit tools include custom queries and report generators.
It is not uncommon for attackers to replace the audit tools or inject code into the existing tools to provide the capability to hide or erase system activity from the audit logs.
To address this risk, audit tools must be cryptographically signed to provide the capability to identify when the audit tools have been modified, manipulated, or replaced. An example is a checksum hash of the file or files.
Satisfies: SRG-OS-000256-GPOS-00097, SRG-OS-000257-GPOS-00098, SRG-OS-000258-GPOS-00099, SRG-OS-000278-GPOS-00108Check
Verify that OL 9 is configured so that Advanced Intrusion Detection Environment (AIDE) uses cryptographic mechanisms to protect the integrity of audit tools.
Check the selection lines to ensure AIDE is configured to add/check with the following command:
$ sudo grep -H -E '^/usr/sbin/(auditctl|auditd|ausearch|aureport|autrace|rsyslogd|augenrules)' /etc/aide.conf /etc/aide/aide.conf.d/*
/etc/aide/aide.conf.d/90-stig_audit_tools:/usr/sbin/auditctl p+i+n+u+g+s+b+acl+xattrs+sha512
/etc/aide/aide.conf.d/90-stig_audit_tools:/usr/sbin/auditd p+i+n+u+g+s+b+acl+xattrs+sha512
/etc/aide/aide.conf.d/90-stig_audit_tools:/usr/sbin/ausearch p+i+n+u+g+s+b+acl+xattrs+sha512
/etc/aide/aide.conf.d/90-stig_audit_tools:/usr/sbin/aureport p+i+n+u+g+s+b+acl+xattrs+sha512
/etc/aide/aide.conf.d/90-stig_audit_tools:/usr/sbin/autrace p+i+n+u+g+s+b+acl+xattrs+sha512
/etc/aide/aide.conf.d/90-stig_audit_tools:/usr/sbin/rsyslogd p+i+n+u+g+s+b+acl+xattrs+sha512
/etc/aide/aide.conf.d/90-stig_audit_tools:/usr/sbin/augenrules p+i+n+u+g+s+b+acl+xattrs+sha512
If AIDE is not installed, ask the system administrator (SA) how file integrity checks are performed on the system.
If any of the audit tools listed above do not have a corresponding line, ask the SA to indicate what cryptographic mechanisms are being used to protect the integrity of the audit tools. If there is no evidence of integrity protection, this is a finding.Fix
Configure OL 9 to use cryptographic mechanisms to protect the integrity of audit tools.
Create a dedicated configuration directory for custom security rules if it does not already exist:
$ sudo mkdir -p /etc/aide/aide.conf.d
Ensure the main configuration file (/etc/aide.conf) is configured to include files from this directory. Edit "/etc/aide.conf" and verify the following line exists at the bottom of the file:
@@include /etc/aide/aide.conf.d/90-stig_audit_tools
Create the dedicated audit tools configuration file:
$ sudo vi /etc/aide/aide.conf.d/90-stig_audit_tools
Populate the file with the following configuration rules:
# Audit Tools
/usr/sbin/auditctl p+i+n+u+g+s+b+acl+xattrs+sha512
/usr/sbin/auditd p+i+n+u+g+s+b+acl+xattrs+sha512
/usr/sbin/ausearch p+i+n+u+g+s+b+acl+xattrs+sha512
/usr/sbin/aureport p+i+n+u+g+s+b+acl+xattrs+sha512
/usr/sbin/autrace p+i+n+u+g+s+b+acl+xattrs+sha512
/usr/sbin/rsyslogd p+i+n+u+g+s+b+acl+xattrs+sha512
/usr/sbin/augenrules p+i+n+u+g+s+b+acl+xattrs+sha512
If any of the audit tools listed above are already defined inside the main "/etc/aide.conf" file, comment those lines out to prevent duplicate definition conflicts.
Initialize the updated baseline database and promote it to production:
$ sudo aide --init
Rename the new database:
$ sudo cp -p /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz