This document
provides a list of configuration changes which enhance the security of a Sun
SolarisTM (SunOS 5.X) system.
Auditing
- Enable the Basic Security Module (BSM):/etc/security/bsmconv
- Configure the classes of events to log in /etc/security/audit_control:dir:/var/auditflags:lo,ad,pc,fc,fd,fmnaflags:lo,ad## lo - login/logout events# ad - administrative actions: mount, exportfs, etc.# pc - process operations: fork, exec, exit, etc.# fc - file creation# fd - file deletion# fm - change of object attributes: chown, flock, etc.#
- Create /etc/security/newauditlog.sh:#!/sbin/sh## newauditlog.sh - Start a new audit file and expire the old logs#AUDIT_EXPIRE=30AUDIT_DIR="/var/audit"/usr/sbin/audit -ncd $AUDIT_DIR # in case it is a link/usr/bin/find . $AUDIT_DIR -type f -mtime +$AUDIT_EXPIRE \-exec rm {} > /dev/null 2>&1 \;
- Run the script nightly from cron:chmod 500 /etc/security/newauditlog.sh/usr/bin/crontab -e root0 0 * * * /etc/security/newauditlog.sh
- The audit files generated are
not human readable. The praudit(1M) command can be used to convert audit
data into several ASCII formats.