OL6-00-000197 - The audit system must be configured to audit failed attempts to access files and programs - b64 EPERM auid=0

Information

Unsuccessful attempts to access files could be an indicator of malicious activity on a system. Auditing these events could serve as evidence of potential system compromise.

The system call rules are loaded into a matching engine that intercepts each syscall made by all programs on the system. Therefore, it is very important to use syscall rules only when absolutely necessary, since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining syscalls into one rule whenever possible.

Solution

At a minimum, the audit system should collect unauthorized file accesses for all users and root. Add the following to '/etc/audit/audit.rules':

-a always,exit -F arch=b32 -S creat,open,openat,truncate,ftruncate,open_by_handle_at -F exit=-EACCES -F auid>=500 -F auid!=4294967295 -k access
-a always,exit -F arch=b32 -S creat,open,openat,truncate,ftruncate,open_by_handle_at -F exit=-EPERM -F auid>=500 -F auid!=4294967295 -k access
-a always,exit -F arch=b32 -S creat,open,openat,truncate,ftruncate,open_by_handle_at -F exit=-EACCES -F auid=0 -k access
-a always,exit -F arch=b32 -S creat,open,openat,truncate,ftruncate,open_by_handle_at -F exit=-EPERM -F auid=0 -k access

If the system is 64-bit, then also add the following:
-a always,exit -F arch=b64 -S creat,open,openat,truncate,ftruncate,open_by_handle_at -F exit=-EACCES -F auid>=500 -F auid!=4294967295 -k access
-a always,exit -F arch=b64 -S creat,open,openat,truncate,ftruncate,open_by_handle_at -F exit=-EPERM -F auid>=500 -F auid!=4294967295 -k access
-a always,exit -F arch=b64 -S creat,open,openat,truncate,ftruncate,open_by_handle_at -F exit=-EACCES -F auid=0 -k access
-a always,exit -F arch=b64 -S creat,open,openat,truncate,ftruncate,open_by_handle_at -F exit=-EPERM -F auid=0 -k access

See Also

https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_Oracle_Linux_6_V2R7_STIG.zip

Item Details

Category: AUDIT AND ACCOUNTABILITY

References: 800-53|AU-12c., CAT|III, CCI|CCI-000172, Rule-ID|SV-208906r810471_rule, STIG-ID|OL6-00-000197, STIG-Legacy|SV-65353, STIG-Legacy|V-51143, Vuln-ID|V-208906

Plugin: Unix

Control ID: c588e4586c6357dcfc3378a38ecb0c9a7099259dfc0d691bcd09a3ff11155767