4.1.15 Ensure system administrator command executions (sudo) are collected - b32 actions

Information

sudo provides users with temporary elevated privileges to perform operations. Monitor the administrator with temporary elevated privileges and the operation(s) they performed.

Note: Reloading the auditd config to set active settings requires the auditd service to be restarted, and may require a system reboot.

Rationale:

creating an audit log of administrators with temporary elevated privileges and the operation(s) they performed is essential to reporting. Administrators will want to correlate the events written to the audit trail with the records written to sudo logfile to verify if unauthorized commands have been executed.

Solution

For 32 bit systems Edit or create a file in the /etc/audit/rules.d/ directory ending in .rules:
Example: 'vi /etc/audit/rules.d/actions.rules
Add the following line:

-a exit,always -F arch=b32 -C euid!=uid -F euid=0 -Fauid>=1000 -F auid!=4294967295 -S execve -k actions

For 64 bit systems Edit or create a file in the /etc/audit/rules.d/ directory ending in .rules:
Example: 'vi /etc/audit/rules.d/actions.rules
Add the following lines:

-a always,exit -F arch=b64 -C euid!=uid -F euid=0 -Fauid>=1000 -F auid!=4294967295 -S execve -k actions
-a always,exit -F arch=b32 -C euid!=uid -F euid=0 -Fauid>=1000 -F auid!=4294967295 -S execve -k actions

See Also

https://workbench.cisecurity.org/files/2920

Item Details

Category: AUDIT AND ACCOUNTABILITY

References: 800-53|AU-3, CSCv7|4.9

Plugin: Unix

Control ID: a3838c6a987a24c9100493e1e0776cebb0ad4c084e845152132df004ce2e5bb9