Select any two versions of this STIG to compare the individual requirements
Select any old version/release of this STIG to view the previous requirements
Ensure the root account for any bootable partitions has a password assigned in the /etc/security/passwd file.
Assign a root account password for any bootable partition.
Use the last command to check for multiple accesses to an account from different workstations/IP addresses. If users log directly onto accounts, rather than using the su command from their own named account to access them, this is a finding (such as logging directly on to Oracle). Also, ask the SA or the IAO if shared accounts are logged into directly or if users log on to an individual account and switch user to the shared account. # last <unix account> Shared or Application accounts can have direct login disabled by setting the rlogin parameter to false in the users stanza of the /etc/security/user file. #lsuser -a rlogin < user_id > If users log directly on to shared accounts, this is a finding.
Use the switch user (su) command from a named account login to access shared accounts. Maintain audit trails to identify the actual user of that account name. Document requirements and procedures for users/administrators to log into their own accounts first and then switch user (su) to the account that must be shared. Direct login to shared or application accounts can be prevented by setting the rlogin = false in the accounts stanza of the /etc/security/user file. Additional hardening of the shared/application accounts can be done with the sugroups = in the accounts stanza of the /etc/security/user file. #chuser rlogin=false < user id >
Perform the following to ensure there are no duplicate account names: # usrck -n ALL If any duplicate account names are found, this is a finding.
Change user account names, or delete accounts, so each account has a unique name.
Perform the following to ensure there are no duplicate UIDs: # usrck -n ALL If any duplicate UIDs are found, this is a finding.
Edit user accounts to provide unique UIDs for each account.
Access the system console and make a logon attempt. Check for either of the following login banners based on the character limitations imposed by the system. An exact match is required. If one of these banners is not displayed, this is a finding. "You are accessing a U.S. Government (USG) Information System (IS) that is provided for USG-authorized use only. By using this IS (which includes any device attached to this IS), you consent to the following conditions: -The USG routinely intercepts and monitors communications on this IS for purposes including, but not limited to, penetration testing, COMSEC monitoring, network operations and defense, personnel misconduct (PM), law enforcement (LE), and counterintelligence (CI) investigations. -At any time, the USG may inspect and seize data stored on this IS. -Communications using, or data stored on, this IS are not private, are subject to routine monitoring, interception, and search, and may be disclosed or used for any USG-authorized purpose. -This IS includes security measures (e.g., authentication and access controls) to protect USG interests--not for your personal benefit or privacy. -Notwithstanding the above, using this IS does not constitute consent to PM, LE or CI investigative searching or monitoring of the content of privileged communications, or work product, related to personal representation or services by attorneys, psychotherapists, or clergy, and their assistants. Such communications and work product are private and confidential. See User Agreement for details. " OR "I've read & consent to terms in IS user agreem't."
Edit /etc/security/login.cfg and assign the herald value for the default and /dev/console stanzas to one of the DoD login banners (based on the character limitations imposed by the system). # chsec -f /etc/security/login.cfg -s default -a herald="<DoD Login Banner>" OR # vi /etc/security/login.cfg and add a herald = <DoD Login Banner> statement to the default stanza DoD Login Banners: "You are accessing a U.S. Government (USG) Information System (IS) that is provided for USG-authorized use only. By using this IS (which includes any device attached to this IS), you consent to the following conditions: -The USG routinely intercepts and monitors communications on this IS for purposes including, but not limited to, penetration testing, COMSEC monitoring, network operations and defense, personnel misconduct (PM), law enforcement (LE), and counterintelligence (CI) investigations. -At any time, the USG may inspect and seize data stored on this IS. -Communications using, or data stored on, this IS are not private, are subject to routine monitoring, interception, and search, and may be disclosed or used for any USG-authorized purpose. -This IS includes security measures (e.g., authentication and access controls) to protect USG interests--not for your personal benefit or privacy. -Notwithstanding the above, using this IS does not constitute consent to PM, LE or CI investigative searching or monitoring of the content of privileged communications, or work product, related to personal representation or services by attorneys, psychotherapists, or clergy, and their assistants. Such communications and work product are private and confidential. See User Agreement for details. " OR "I've read & consent to terms in IS user agreem't."
Determine if successful logons are being logged. # last | more Determine if unsuccessful logons are being logged. # last -f /etc/security/failedlogin | more If the commands do not return successful and unsuccessful logins, this is a finding.
Edit /etc/syslog.conf and add local log destinations for auth.* or both auth.notice and auth.info. "auth.info /var/log/authlog" Verify service startup scripts for syslog and utmp (if present) are enabled. # vi /etc/rc.tcpip Check the syslogd service is not commented out. Refresh syslogd. #refresh -s syslogd
# /usr/sbin/lsuser -a loginretries ALL | more Check all active accounts on the system for the maximum number of tries before the system will lock the account. If a user has values set to 0 or greater then 3, this is a finding.
Use the chsec command to configure the number of unsuccessful logins resulting in account lockout. # chsec -f /etc/security/user -s default -a loginretries=3 # chsec -f /etc/security/user -s <user id> -a loginretries=3
Check the logindelay parameter. # more /etc/security/login.cfg OR #grep logindelay /etc/security/login.cfg | grep -v \* Verify the value of the logindelay variable is 4 or more in each stanza. If the value of logindelay is not 4 or more, this is a finding.
Use vi or the chsec command to change the login delay time period. #chsec -f /etc/security/login.cfg -s default -a logindelay=4 OR # vi /etc/security/login.cfg Add logindelay = 4 to the default stanza.
If there is an application running on the system continuously in use (such as a network monitoring application), ask the SA what the name of the application is. Execute the following to determine which user owns the process(es) associated with the application. If the owner is root, this is a finding. # ps -ef | more
Configure the system so the owner of a session requiring a continuous screen display, such as a network management display, is not root. Ensure the display is also located in a secure, controlled access area. Document and justify this requirement. Ensure the terminal and keyboard for the display (or workstation) are secure from all but authorized personnel by maintaining them in a secure area, in a locked cabinet where a swipe card, or other positive forms of identification, must be used to gain entry.
Verify no accounts have blank passwords. # pwdck -n ALL If any account with a blank password is found, this is a finding.
Remove or configure a password for any account with a blank password. # passwd <user id> # smitty passwd To remove an account with a blank password. # smitty rmuser
Check the system for duplicate UID 0 assignments by listing all accounts assigned UID 0. Procedure: # grep ":0:" /etc/passwd | awk -F":" '{print$1":"$3":"}' | grep ":0:" If any accounts other than root are assigned UID 0, this is a finding.
Remove or change the UID of accounts other than root that have UID 0.
Determine if root is assigned a home directory other than / by listing its home directory. Procedure: # grep "^root" /etc/passwd | awk -F":" '{print $6}' If the root user home directory is /, this is a finding.
The root home directory should be something other than / (such as /root). Procedure: # mkdir /root # chown root /root # chgrp sys /root # chmod 700 /root # cp -r /.??* /root/. Then, edit the passwd file and change the root home directory to /root. The cp -r /.??* command copies all files and subdirectories of file names that begin with "." into the new root directory, which preserves the previous root environment. Must be in the "/" directory when executing the "cp" command.
Check the mode of the root home directory. Procedure: # grep "^root" /etc/passwd | awk -F":" '{print $6}' # ls -ld <root home directory> If the mode of the directory is not equal to 0700, this is a finding. If the home directory is /, this is not applicable.
The root home directory will have permissions of 0700. Do not change the protections of the / directory. Use the following command to change protections for the root home directory. # chmod 0700 /root.
To view the root user's PATH, log in as the root user, and execute the following. # env | grep PATH This variable is formatted as a colon-separated list of directories. If there is an empty entry, such as a leading or trailing colon or two consecutive colons, this is a finding. If an entry starts with a character other than a slash (/), this is a finding. If directories beyond those in the vendor's default root path are present, this is a finding.
Edit the root user's local initialization files. Change any found PATH variable settings to the vendor's default path for the root user. Remove any empty path entries or references to relative paths. # cd <root's home directory> # vi .profile .cshrc If the bash shell is installed, edit these additional files. # vi .bashrc .bash_profile
Check for world-writable permissions on all directories in the root user's executable search path. Procedure: # ls -ld `echo $PATH | sed "s/:/ /g"` If any of the directories in the PATH variable are world-writable, this is a finding.
For each world-writable path in root's executable search path, perform one of the following. 1. Remove the world-writable permission on the directory. Procedure: # chmod o-w <path> 2. Remove the world-writable directory from the executable search path. Procedure: Identify and edit the initialization file referencing the world-writable directory and remove it from the PATH variable.
Check the remote login ability of the root account. Procedure: # lsuser -a rlogin root If the rlogin value is not false, this is a finding.
The root account can be protected from non-console device logins by setting rlogin = false in the root: stanza of the /etc/security/user file. #chsec -f /etc/security/user -s root -a rlogin=false
# more /etc/passwd Confirm all accounts with a GID of 99 and below (499 and below for Linux) are used by a system account. If a GID reserved for system accounts, 0 - 99 (0 - 499 for Linux), is used by a non-system account, this is a finding.
Change the primary group GID numbers for non-system accounts with reserved primary group GIDs (those less or equal to 99 in general, or 499 for Linux). # smitty chuser
Perform the following to ensure there are no GIDs referenced in /etc/passwd not defined in /etc/group: # usrck -n ALL If GIDs referenced in /etc/passwd are not defined in /etc/group are returned, this is a finding.
Add a group to the system for each GID referenced without a corresponding group. # smitty mkgroup
Ask the SA or IAO if a host-based intrusion detection application is loaded on the system. Determine if the application is loaded on the system. Procedure: # find / -name <daemon name> -print Determine if the application is active on the system. Procedure: # ps -ef | grep <daemon name> If no host-based intrusion detection system is installed on the system, this is a finding.
Install a host-based intrusion detection tool.
Obtain the list of available security patches from IBM. Verify the available patches and service packs have been installed on the system. Check the currently running TL (Technology Levels and Service Packs). #oslevel -s Perform the following to obtain a list of installed patches. # /usr/sbin/instfix -i If there are security patches available and applicable for the system that have not been installed, this is a finding.
Use a web browser to access the vendor's support web site. Download the service packs and patches. Use SMIT to apply the updates. #smitty update_all
Check system directories for uneven file permissions. Procedure: # ls -lL /etc /bin /usr/bin /usr/lbin /usr/ucb /sbin /usr/sbin Uneven file permissions exist if the file owner has less permissions than the group or other user classes. If any of the files in the above listed directories contain uneven file permissions, this is a finding.
Change the mode of files with uneven permissions so owners do not have less permission than group or world users.
Check the system for files with no assigned owner. Procedure: # find / -nouser -print If any files have no assigned owner, this is a finding.
All directories and files (executable and data) will have an identifiable owner and group name. Either trace files to an authorized user, change the file's owner to root, or delete them. Determine the legitimate owner of the files and use the chown command to set the owner and group to the correct value. If the legitimate owner cannot be determined, change the owner to root (but make sure none of the changed files remain executable because they could be Trojan horses or other malicious code). Examine the files to determine their origin and the reason for their lack of an owner/group. #chown <a-valid-user> <directory>/<file>
Check the mode of network services daemons. # ls -la /usr/sbin /usr/bin If the mode of a network services daemon is more permissive than 0755, this is a finding. NOTE: Network daemons that may not reside in these directories (such as httpd or sshd) must also be checked for the correct permissions.
Change the mode of the network services daemon. # chmod 0755 <path>
Check the mode of log files. Procedure: # ls -lL /var/log /var/log/syslog /var/adm If any of the log files have modes more permissive than 0640, this is a finding.
Change the mode of the system log file(s) to 0640 or less permissive. Procedure: # chmod 0640 /path/to/system-log-file NOTE: Do not confuse system log files with audit logs. Any subsystems that require less stringent permissions must be documented.
Check skeleton files permissions. Procedure: # ls -l /etc/security/.profile If a skeleton file has a mode more permissive than 0644, this is a finding. Check the mkuser.sys file. The /etc/security/mkuser.sys is a script containing items used in creation of users' ~/.profile files. This script needs to be both protected from unauthorized modification, but also needs to be executable, therefore the permissions need to be at the mode of 755. #ls -l /etc/security/mkuser.sys If the mkuser.sys file has a mode more permissive than 0755, this is a finding.
Change the mode of skeleton files with incorrect mode. # chmod 0644 /etc/security/.profile #chmod 0755 /etc/security/mkuser.sys
Perform the following to check NIS file ownership. # ls -lRa /var/nis /var/yp /usr/lib/nis /usr/lib/netsvc/yp If the file ownership is not root, sys, or bin, this is a finding.
Change the owner of the NIS files to root, sys, or bin. Procedure (example): # chown root < directory>/< file >
Check the group ownership of the NIS files. Procedure: # ls -lRa /var/nis /var/yp /usr/lib/nis /usr/lib/netsvc/yp If the file group owner is not sys, bin, or system, this is a finding.
Change the group owner of the NIS files to sys, bin, system, or other. Procedure: # chgrp system < directory>/< file >
Perform the following to check NIS file mode # ls -lRa /var/nis /var/yp /usr/lib/nis /usr/lib/netsvc/yp If the file's mode is more permissive than 0755, this is a finding.
Change the mode of NIS/NIS+/yp files to 0755 or less permissive. Procedure (example): # chmod 0755 <filename>
Check the mode of the manual page files. Procedure: # ls -lLR /usr/share/man /usr/share/info /usr/share/infopage If any of the manual page files have a mode more permissive than 0644, this is a finding.
Change the mode of manual page files to 0644 or less permissive. Procedure (example): # chmod 0644 <path>/<manpage>
Check the mode of library files. Procedure: # ls -lLR /usr/lib /lib If any of the library files have a mode more permissive than 0755, this is a finding.
Change the mode of library files to 0755 or less permissive. Procedure (example): # chmod 0755 <path>/<library-file> NOTE: Library files should have an extension of .a or .so (a=archive, so=shared object) extension, possibly followed by a version.
Check the permissions for files in /etc, /bin, /usr/bin, /usr/lbin, /usr/ucb, /sbin, and /usr/sbin. Procedure: # ls -lL /etc /bin /usr/bin /usr/lbin /usr/ucb /sbin /usr/sbin If any command file is listed and has a mode more permissive than 0755, this is a finding. NOTE: Elevate to Severity Code I if any command file listed is world-writable.
Change the mode for system command files to 0755 or less permissive. Procedure: # chmod 0755 <filename>
Check the ownership of system files, programs, and directories. Procedure: # ls -lLa /etc /bin /usr/bin /usr/lbin /usr/ucb /sbin /usr/sbin If any of the system files, programs, or directories are not owned by a system account, this is a finding. For this check, the system-provided "ipsec" user is considered to be a system account.
Change the owner of system files, programs, and directories to a system account. Procedure: # chown root /some/system/file (A different system user may be used in place of root.)
Check the group ownership of system files, programs, and directories. Procedure: # ls -lLa /etc /bin /usr/bin /usr/lbin /usr/ucb /sbin /usr/sbin If any system file, program, or directory is not group-owned by a system group, this is a finding. For this check, the system-provided "ipsec" group is also acceptable.
Change the group owner of system files to a system group. Procedure: # chgrp sys /path/to/system/file (System groups other than sys may be used.)
Check the ownership of the /etc/security/passwd file. Procedure: # ls -lL /etc/security/passwd If the owner of this file is not root, this is a finding.
Change the ownership of the /etc/security/passwd file. # chown root /etc/security/passwd
Check the mode of the /etc/passwd file. Procedure: # ls -lL /etc/passwd If /etc/passwd has a mode more permissive than 0644, this is a finding.
Change the mode of the passwd file to 0644. Procedure: # chmod 0644 /etc/passwd Document all changes.
Check the mode of the /etc/security/passwd file. Procedure: # ls -lL /etc/security/passwd If the mode of this file is more permissive than 0400, this is a finding.
Change the mode of the /etc/security/passwd file. # chmod 0400 /etc/security/passwd
Files with the setuid bit set will allow anyone running these files to be temporarily assigned the user or group ID of the file. If an executable with setuid allows shell escapes, the user can operate on the system with the effective permission rights of the user or group owner. List all setuid files on the system. Procedure: # find / -perm -4000 -exec ls -l {} \; | more NOTE: Executing these commands may result in large listings of files; the output may be redirected to a file for easier analysis. Ask the SA or IAO if files with the setuid bit set have been documented. If any undocumented file has its setuid bit set, this is a finding.
Document the files with the setuid bit set or unset the setuid bit on the executable.
Locate all setgid files on the system. Procedure: # find / -perm -2000 If the ownership, permissions, location, and ACLs of all files with the setgid bit set are not documented, this is a finding.
All files with the sgid bit set will be documented in the system baseline and authorized by the Information Systems Security Officer. Locate all sgid files with the following command: #find / -perm -2000 -exec ls -lL {} \; # find / -perm -2000 -exec aclget {} \; Ensure sgid files are part of the operating system software, documented application software, documented utility software, or documented locally developed software. Ensure none are text files or shell programs.
Determine if a weekly automated or manual process is used to generate a list of setuid files on the system and compare it with the prior list. If no such process is in place, this is a finding.
Establish a weekly automated or manual process to generate a list of setuid files on the system and compare it with the prior list. To create a list of setuid files use the following command. # find / -perm -4000 > setuid-file-list
Determine if a weekly automated or manual process is used to generate a list of setgid files on the system and compare it with the prior list. If no such process is in place, this is a finding.
Establish a weekly automated or manual process to generate a list of setgid files on the system and compare it with the prior list. To create a list of setgid files use the following command. # find / -perm -2000 > setgid-file-list
Check /etc/filesystems and verify the nosuid mount option is used on file systems mounted from removable media, network shares, or any other file system not containing approved setuid or setgid files. Each file system stanza must contain a device special file and may additionally contain all of the following fields type = , options = , and check = . # more /etc/filesystems # lsfs If any of these files systems do not mount with the nosuid option, it is a finding.
Edit /etc/filesystems and add the options = nosuid to the stanza of file system mounted from removable media or network shares, and any file system not containing approved setuid or setgid files. OR Add the nosuid option with the chfs command. # chfs -a options=nosuid <filesystem>
Verify all world-writable directories have the sticky bit set. Procedure: # find / -type d -perm -002 ! -perm -1000 > wwlist If the sticky bit is not set on a world-writable directory, this is a finding.
Set the sticky bit on all public directories. Procedure: # chmod 1777 /tmp (Replace /tmp with the public directory missing the sticky bit, if necessary.)
Check the ownership of all public directories. Procedure: # find / -type d -perm -1002 -exec ls -ld {} \; If any public directory is not owned by root or an application user, this is a finding.
Change the owner of public directories to root or an application account. Procedure: # chown root /tmp (Replace root with an application user and/or /tmp with another public directory as necessary.)
Check global initialization files for the configured umask value. Procedure: # grep umask /etc/* Check local initialization files for the configured umask value. Procedure: # grep umask /userhomedirectory/.* If the system and user default umask is not 077, this is a finding. NOTE: If the default umask is 000 or allows for the creation of world-writable files, this becomes a Severity Code I (CAT I) finding.
Edit local and global initialization files that contain "umask" and change them to use 077 instead of the current value.
Determine if default system accounts (such as those for guest, sys, bin, uucp, nuucp, daemon, smtp, and lpd) have been disabled. Procedure: # lsuser -a account_locked ALL If there are any unlocked default system accounts, this is a finding.
Lock the default system account(s). # chuser account_locked=true <user>
Determine if auditing is enabled. # /usr/sbin/audit query | head -1 If the response Auditing On is not returned, this is a finding.
Use SMIT or command line to enable auditing on the system. #audit start Additionally, make sure auditing subsystem starts on system startup. #mkitab -i cron "audit:2:once:/usr/sbin/audit start 2>&1 > /dev/console"
Perform the following to determine the location of audit logs and then check the ownership. Procedure: # grep -p bin: /etc/security/audit/config Directories to search will be listed under the bin stanza. # ls -la <audit directories> If any audit log file is not owned by root, this is a finding.
Change the ownership of the audit log file(s). Procedure: # chown root <audit log file>
Perform the following to determine the location of audit logs and then check the mode of the files. Procedure: # grep -p bin: /etc/security/audit/config Directories to search will be listed under the bin stanza. # ls -la <audit directories> If any audit log file has a mode more permissive than 0640, this is a finding.
Change the mode of the audit log directories/files. # chmod 0750 <audit directory> # chmod 0640 <audit file>
Check the system audit configuration to determine if failed attempts to access files and programs are audited. Check system activities (events) to audit are listed in the /etc/security/audit/events file. Procedure: # more /etc/security/audit/events If the FILE_Open event is not configured, this is a finding. Check the FILE_Open audit event is defined in the audit classes' stanza classes: of the /etc/security/audit/config file. Procedure: #more /etc/security/audit/config Make note of the audit class(es) that the FILE_Open event is associated with. If the FILE_Open event is not associated with any audit classes in the classes: stanza, this is a finding. Verify the audit class is associated with the default user and all other user ids listed in the users: stanza of the /etc/security/audit/config file. Procedure: #more /etc/security/audit/config If the class(es) the FILE_Open event is(/are) not associated with the default user and all the system users in the users: stanza, this is a finding. Supplementary Information: Successful setup of AIX auditing requires several files and stanza's to be correctly configured. 1. The /etc/security/audit/events must have the system call defined. 2. The /etc/security/audit/config has 2 stanzas that need to be configured a. "classes:" stanza. Each entry in this stanza defines two things. The first is the name of a class to group the events to be audited on. The class is linked to users of the system for auditing. The second is the event(s) to be audited in this class: stanza. Example: classes: DISA_CLASS = FILE_Open, File_Unlink, FS_Rmdir b. "users:" stanza. There are two options of specifying what users audit on. The first is to explicitly spell out user names. EXAMPLE: users: root = DISA_CLASS The second is to specify a default catching all users not listed elsewhere in the users: stanza EXAMPLE users: root = DISA_CLASS default = DISA_CLASS 3. An approach to setup auditing to meet STIG requirements would be to create class stanza with all audit events that are required. The users: stanza would then be populated with the root user, any other user ids with special requirements and finally a default user. 4. The /usr/lib/security/mkuser.default file can have under the users: stanza an entry auditclasses = class(es) of events to be audited for each new user added to the system.
Edit /etc/security/audit/events and add the FILE_Open event to the list of audited events. Edit /etc/security/audit/config and add the FILE_Open audit event to an audit class in the classes: stanza. Edit the /etc/security/audit/config and assign the audit classes that have the FILE_Open event to the users listed in the users: stanza.
Check the system audit configuration to determine if failed attempts to access files and programs are audited. # more /etc/security/audit/events If auditing of the FILE_Unlink or FS_Rmdir events is not configured, this is a finding. If no results are returned, this is a finding. Check the FILE_Unlink and FS_Rmdir audit event(s) are defined in the audit classes' stanza classes: of the /etc/security/audit/config file. #more /etc/security/audit/config Make note of the audit class(es) that the File_Unlink and FS_Rmdir events are associated with. If the FILE_Unlink and FS_Rmdir events are not associated with any audit classes in the classes: stanza this is a finding. Verify the audit class is associated with the default user and all other user ids listed in the users: stanza of the /etc/security/audit/config file. #more /etc/security/audit/config If the class(es) that the FILE_Unlink and FS_Rmdir events are not associated with the default user and all the system users in the users: stanza, this is a finding.
Edit /etc/security/audit/events and add the FILE_Unlink or FS_Rmdir events to the list of audited events. Edit /etc/security/audit/config and add the FILE_Unlink and FS_Rmdir audit events to an audit class in the classes: stanza. Edit the /etc/security/audit/config and assign the audit classes containing the FILE_Unlink and FS_Rmdir events to the all users listed in the users: stanza.
Check the auditing configuration of the system. # more /etc/security/audit/events Verify the following events are configured. ACCT_Disable, ACCT_Enable, AUD_it, BACKUP_Export, DEV_Change, DEV_Configure, DEV_Create, FILE_Chpriv, FILE_Fchpriv, FILE_Mknod, FILE_Owner, FS_Chroot, FS_Mount, FS_Umount, PASSWORD_Check, PROC_Adjtime, PROC_Kill, PROC_Privilege, PROC_Setpgid, PROC_SetUserIDs, RESTORE_Import, TCBCK_Delete, USER_Change, USER_Create, USER_Reboot, USER_Remove, and USER_SetEnv If any of these events are missing from the configuration, this is a finding. Check the ACCT_Disable, ACCT_Enable, AUD_it, BACKUP_Export, DEV_Change, DEV_Configure, DEV_Create, FILE_Chpriv, FILE_Fchpriv, FILE_Mknod, FILE_Owner, FS_Chroot, FS_Mount, FS_Umount, PASSWORD_Check, PROC_Adjtime, PROC_Kill, PROC_Privilege, PROC_Setpgid, PROC_SetUserIDs, RESTORE_Import, TCBCK_Delete, USER_Change, USER_Create, USER_Reboot, USER_Remove, and USER_SetEnv audit events are defined in the audit classes' stanza 'classes:' of the /etc/security/audit/config file. #more /etc/security/audit/config Make note of the audit class(es) that the ACCT_Disable, ACCT_Enable, AUD_it, BACKUP_Export, DEV_Change, DEV_Configure, DEV_Create, FILE_Chpriv, FILE_Fchpriv, FILE_Mknod, FILE_Owner, FS_Chroot, FS_Mount, FS_Umount, PASSWORD_Check, PROC_Adjtime, PROC_Kill, PROC_Privilege, PROC_Setpgid, PROC_SetUserIDs, RESTORE_Import, TCBCK_Delete, USER_Change, USER_Create, USER_Reboot, USER_Remove, and USER_SetEnv events are associated with. If the ACCT_Disable, ACCT_Enable, AUD_it, BACKUP_Export, DEV_Change, DEV_Configure, DEV_Create, FILE_Chpriv, FILE_Fchpriv, FILE_Mknod, FILE_Owner, FS_Chroot, FS_Mount, FS_Umount, PASSWORD_Check, PROC_Adjtime, PROC_Kill, PROC_Privilege, PROC_Setpgid, PROC_SetUserIDs, RESTORE_Import, TCBCK_Delete, USER_Change, USER_Create, USER_Reboot, USER_Remove, and USER_SetEnv events are not associated with any audit classes in the classes: stanza, this is a finding. Verify the audit class is associated with the default user and all other user ids listed in the users: stanza of the /etc/security/audit/config file. #more /etc/security/audit/config If the class(es) that the ACCT_Disable, ACCT_Enable, AUD_it, BACKUP_Export, DEV_Change, DEV_Configure, DEV_Create, FILE_Chpriv, FILE_Fchpriv, FILE_Mknod, FILE_Owner, FS_Chroot, FS_Mount, FS_Umount, PASSWORD_Check, PROC_Adjtime,PROC_Kill, PROC_Privilege, PROC_Setpgid, PROC_SetUserIds, RESTORE_Import, TCBCK_Delete, USER_Change, USER_Create, USER_Reboot, USER_Remove, and USER_SetEnv events are not associated with the default user and all the system users in the 'users:' stanza, this is a finding.
Edit /etc/security/audit/events and add the following events to the list of audited events: ACCT_Disable, ACCT_Enable, AUD_it, BACKUP_Export, DEV_Change, DEV_Configure, DEV_Create, FILE_Chpriv, FILE_Fchpriv, FILE_Mknod, FILE_Owner, FS_Chroot, FS_Mount, FS_Umount, PASSWORD_Check, PROC_Adjtime, PROC_Kill, PROC_Privilege, PROC_Setpgid, PROC_SetUserIDs, RESTORE_Import, TCBCK_Delete, USER_Change, USER_Create, USER_Reboot, USER_Remove, and USER_SetEnv. Edit /etc/security/audit/config and add the ACCT_Disable, ACCT_Enable, AUD_it, BACKUP_Export, DEV_Change, DEV_Configure, DEV_Create, FILE_Chpriv, FILE_Fchpriv, FILE_Mknod, FILE_Owner, FS_Chroot, FS_Mount, FS_Umount, PASSWORD_Check, PROC_Adjtime, PROC_Kill, PROC_Privilege, PROC_Setpgid, PROC_SetUserIDs, RESTORE_Import, TCBCK_Delete, USER_Change, USER_Create, USER_Reboot, USER_Remove, and USER_SetEnv audit events to an audit class in the classes: stanza. Edit the /etc/security/audit/config and assign the audit classes with the ACCT_Disable, ACCT_Enable, AUD_it, BACKUP_Export, DEV_Change, DEV_Configure, DEV_Create, FILE_Chpriv, FILE_Fchpriv, FILE_Mknod, FILE_Owner, FS_Chroot, FS_Mount, FS_Umount, PASSWORD_Check, PROC_Adjtime, PROC_Kill, PROC_Privilege, PROC_Setpgid, PROC_SetUserIDs, RESTORE_Import, TCBCK_Delete, USER_Change, USER_Create, USER_Reboot, USER_Remove, and USER_SetEnv events to the all users listed in the users: stanza.
Check the system's audit configuration. # more /etc/security/audit/events Confirm the following events are configured: USER_Login, USER_Logout, INIT_Start, INIT_End and USER_SU. If any of these events are not present, this is a finding. Check the USER_Login, USER_Logout, INIT_Start, INIT_End, and USER_SU audit events are defined in the audit classes' stanza 'classes:' of the /etc/security/audit/config file. #more /etc/security/audit/config Make note of the audit class(es) the USER_Login, USER_Logout, INIT_Start, INIT_End, and USER_SU events are associated with. If the USER_Login, USER_Logout, INIT_Start, INIT_End, and USER_SU events are not associated with any audit classes in the classes: stanza, this is a finding. Verify the audit class is associated with the default user and all other user ids listed in the users: stanza of the /etc/security/audit/config file. #more /etc/security/audit/config If the class(es) the USER_Login, USER_Logout, INIT_Start, INIT_End, and USER_SU events are not associated with the default user and all the system users in the users: stanza, this is a finding.
Edit /etc/security/audit/events and add the USER_Login, USER_Logout, INIT_Start, INIT_End, and USER_SU events to the list of audited events. Edit /etc/security/audit/config and add the USER_Login, USER_Logout, INIT_Start, INIT_End, and USER_SU audit events to an audit class in the classes: stanza. Edit the /etc/security/audit/config and assign the audit classes with the USER_Login, USER_Logout, INIT_Start, INIT_End, and USER_SU events to the all users listed in the users: stanza.
Check the system's audit configuration. # more /etc/security/audit/events Confirm the following events are configured: FILE_Acl, FILE_Fchmod, FILE_Fchown, FILE_Mode, and FILE_Owner. If any of these events are not configured, this is a finding. Check the FILE_Acl, FILE_Fchmod, FILE_Fchown, FILE_Mode, and FILE_Owner audit events are defined in the audit classes' stanza classes: of the /etc/security/audit/config file. #more /etc/security/audit/config Make note of the audit class(es) the FILE_Acl, FILE_Fchmod, FILE_Fchown, FILE_Mode, and FILE_Owner events are associated with. If the FILE_Acl, FILE_Fchmod, FILE_Fchown, FILE_Mode, and FILE_Owner events are not associated with any audit classes in the classes: stanza, this is a finding. Verify the audit class is associated with the default user and all other user ids listed in the users: stanza of the /etc/security/audit/config file. If the class(es) the FILE_Acl, FILE_Fchmod, FILE_Fchown, FILE_Mode, and FILE_Owner events are not associated with the default user and all the system users in the users: stanza, this is a finding.
Edit /etc/security/audit/events and add the FILE_Acl, FILE_Fchmod, FILE_Fchown, FILE_Mode, and FILE_Owner events to the list of audited events. Edit /etc/security/audit/config and add the FILE_Acl, FILE_Fchmod, FILE_Fchown, FILE_Mode, and FILE_Owner audit events to an audit class in the classes: stanza. Edit the /etc/security/audit/config and assign the audit classes with the FILE_Acl, FILE_Fchmod, FILE_Fchown, FILE_Mode, and FILE_Owner events to the all users listed in the users: stanza.
Check the ownership of inetd.conf file. Procedure: # ls -lL /etc/inetd.conf This is a finding if any of the above files or directories are not owned by root or bin.
Change the ownership of the inetd.conf file to root or bin. Procedure: # chown root /etc/inetd.conf
Check the mode of inetd.conf file. # ls -lL /etc/inetd.conf If the mode of the file(s) is more permissive than 0440, this is a finding.
Change the mode of the inetd.conf file. # chmod 0440 /etc/inetd.conf
Check the ownership of the services file. Procedure: # ls -lL /etc/services If the services file is not owned by root or bin, this is a finding.
Change the ownership of the services file to root or bin. Procedure: # chown root /etc/services
Check the mode of the services file. Procedure: # ls -lL /etc/services If the services file has a mode more permissive than 0444, this is a finding.
Change the mode of the services file to 0444 or less permissive. Procedure: # chmod 0444 /etc/services
Check global initialization files for the presence of mesg -n or mesg n. Procedure: # grep "mesg" /etc/.login /etc/profile /etc/bashrc /etc/environment /etc/security/environ /etc/security/.profile /etc/csh.login /etc/csh.cshrc If no global initialization files contain mesg -n or mesg n, this is a finding.
Edit /etc/profile or another global initialization script and add the mesg -n command.
Look for the presence of a print service configuration file. Procedure: # find /etc -name hosts.lpd -print # find /etc -name Systems -print # find /etc -name printers.conf If none of the files are found, this check should be marked not applicable. Otherwise, examine the configuration file. Procedure: # more <print service file> Check for entries containing a "+" character by itself on any line. If any are found, this is a finding.
Remove the "+" entries from the hosts.lpd (or equivalent) file.
Locate any print service configuration file on the system. Consult vendor documentation to verify the names and locations of print service configuration files on the system. Procedure: # find /etc -name hosts.lpd -print # find /etc -name Systems -print If no print service configuration file is found, this is not applicable. Check the ownership of the print service configuration file(s). Procedure: # ls -lL <print service file> If the owner of the file is not root, sys, bin, or lp, this is a finding.
Change the owner of the /etc/hosts.lpd file (or equivalent, such as /etc/lp/Systems) to root, lp, or another privileged UID. Consult vendor documentation to determine the name and location of print service configuration files. Procedure: # chown root /etc/hosts.lpd
Locate any print service configuration file on the system. Consult vendor documentation for the name and location of print service configuration files. Procedure: # find /etc -name hosts.lpd -print # find /etc -name Systems -print If no print service configuration file is found, this is not applicable. Check the mode of the print service configuration file. Procedure: # ls -lL <print service file> If the mode of the print service configuration file is more permissive than 0644, this is a finding.
Change the mode of the /etc/hosts.lpd file (or equivalent, such as /etc/lp/Systems) to 0644 or less permissive. Consult vendor documentation for the name and location of print service configuration files. Procedure: # chmod 0644 /etc/hosts.lpd
Check the ownership of the alias file. Procedure: # ls -lL /etc/mail/aliases If the file is not owned by root, this is a finding.
Change the owner of the /etc/mail/aliases file (or equivalent, such as /usr/lib/aliases) to root. Procedure: # chown root /etc/mail/aliases
Check the mode of the alias file. Procedure: # ls -lL /etc/mail/aliases If the alias file has a mode more permissive than 0644, this is a finding.
Change the mode of the /etc/mail/aliases file. Procedure: # chmod 0644 /etc/mail/aliases
Find the aliases file on the system. Procedure: # find / -name aliases -depth -print # more < aliases file location > Examine the aliases file for any directories or paths that may be utilized. Procedure: # ls -lL < path > Check if the file or parent directory is owned by root. If not, this is a finding.
Edit the /etc/mail/aliases file (alternatively, /usr/lib/sendmail.cf). Locate the entries executing a program. They will appear similar to the following line. Aliasname: : /usr/local/bin/ls (or some other program name) Ensure root owns the programs and the directory(ies) they reside in by using the chown command to change owner to root. Procedure: # chown root filename
Find the aliases file on the system. Procedure: # find / -name aliases -depth -print Examine the aliases file for any directories or paths that may be utilized. Procedure: # more <aliases file location> Check the permissions for any paths referenced. Procedure: # ls -lL <path> If any file referenced from the aliases file has a mode more permissive than 0755, this is a finding.
Use the chmod command to change the access permissions for files executed from the alias file. For example: # chmod 0755 < filename >
Check if Sendmail logging is set to level 9. Procedure: # grep "O L" /etc/mail/sendmail.cf OR # grep LogLevel /etc/mail/sendmail.cf If logging is set to less than 9, this is a finding.
Edit the sendmail.conf file, locate the "O L" or LogLevel entry and change it to 9.
Check the syslog configuration file for mail.crit logging configuration. The syslog.conf file critical mail logging option line will typically appear as one of the following examples: mail.crit /var/log/syslog *.crit /var/log/syslog mail.* /var/log/syslog Procedure: # more /etc/syslog.conf If syslog is not configured to log critical Sendmail messages, this is a finding.
Edit the syslog.conf file and add a configuration line specifying an appropriate destination for mail.crit syslogs.
Locate any mail log files by checking the syslog configuration file. Procedure: # more /etc/syslog.conf Identify any log files configured for the mail service at any severity level, or those configured for all services. Check the ownership of these log files. Procedure: # ls -lL <file location> If any mail log file is not owned by root, this is a finding.
Change the ownership of the Sendmail log file. # chown root <sendmail log file>
Check the mode of the SMTP service log file. Procedure: # more /etc/syslog.conf Check the configuration to determine which log files contain logs for mail.crit, mail.debug, or *.crit. Procedure: # ls -lL <file location> If the log file permissions are greater than 0644, this is a finding.
Change the mode of the SMTP service log file. Procedure: # chmod 0644 <sendmail log file>
Check for the existence of the ftpusers file. # ls -l /etc/ftpusers If the ftpusers file does not exist, this is a finding.
Create a /etc/ftpusers file containing a list of accounts not authorized for FTP.
Check the contents of the ftpusers file. If the system has accounts not allowed to use FTP and are not listed in the ftpusers file, this is a finding. # more /etc/ftpusers
Add accounts not allowed to use FTP to the /etc/ftpusers file.
Check the ownership of the ftpusers file. # ls -l /etc/ftpusers If the ftpusers file is not owned by root, this is a finding.
Change the owner of the ftpusers file to root. # chown root /etc/ftpusers
Check the permissions of the ftpusers file. # ls -l /etc/ftpusers If the ftpusers file has a mode more permissive than 0640, this is a finding.
Change the mode of the ftpusers file to 0640. # chmod 0640 /etc/ftpusers
Perform: # grep ftpd /etc/inetd.conf, Check the line for ftpd to check if the -l argument. If the ftpd is invoked without the -l argument, this is a finding. Check the /etc/syslog.conf file for daemon.info or *.info. # more /etc/syslog.conf If daemon.info or *.info is not being logged, this is a finding.
Edit the /etc/inetd.conf file and add the -l argument to the ftpd service line. # vi /etc/inetd.conf Restart inetd.conf # refresh -s inetd Add daemon.info or *.info to the /etc/syslog.conf file. #vi /etc/syslog.conf *.info /var/log/syslog Restart the syslog daemon. # refresh -s syslogd
Attempt to log into this host with a user name of anonymous and a password of guest (also try the password of guest@mail.com). If the logon is successful, this is a finding. Procedure: # ftp localhost Name: anonymous 530 Guest login not allowed on this machine.
Remove user "anonymous" from /etc/passwd.
If the system is not running tftp, this is not applicable. Determine if tftpd is running in secure mode. # more /etc/tftpaccess.ctl If the file does not exist, this is a finding. If the file does not contain an entry restricting access to the tftp user home directory, this is a finding. If other configuration is in the file, this is a finding.
Edit /etc/tftpaccess.ctl to only contain an entry restricting access to the tftp user home directory.
Check the mode of the TFTP daemon. Procedure: # find / -name "*tftpd" -print # ls -lL <file location> If the mode of the file is more permissive than 0755, this is a finding.
Change the mode of the TFTP daemon. Procedure: # chmod 0755 <tftp server>
Check the /etc/passwd file to determine if TFTP is configured properly. Procedure: # grep tftp /etc/passwd If a TFTP user account does not exist and TFTP is active, this is a finding. Check the user shell for the TFTP user. If it is not /bin/false or equivalent, this is a finding. Check the home directory assigned to the TFTP user. If no home directory is set, or the directory specified is not dedicated to the use of the TFTP service, this is a finding.
Create a TFTP user account if none exists. Assign a non-login shell to the TFTP user account, such as /bin/false. Assign a home directory to the TFTP user account.
Check for .Xauthority files being utilized by looking for such files in the home directory of a user that uses X. Procedure: # cd ~someuser # ls -la .Xauthority If the .Xauthority file does not exist, ask the SA if the user is using X Windows. If the user is utilizing X Windows and the .Xauthority file does not exist, this is a finding.
Ensure the X Windows host is configured to write .Xauthority files into user home directories. Edit the Xaccess file. Ensure the line that writes the .Xauthority file is uncommented.
Perform the following to determine if NIS is active on the system. # ps -ef | egrep '(ypbind|ypserv)' If NIS is found active on the system, this is a finding.
Disable the use of NIS. Possible replacements are NIS+ and LDAP.
Use usrck to verify home directory assignments are present. Procedure: # usrck -n ALL If any user is not assigned a home directory, this is a finding.
Assign a home directory to any user without one.
Use pwck to check that assigned home directories exist. Procedure: # usrck -n ALL If any user's assigned home directory does not exist, this is a finding.
If a user has no home directory, determine why. If possible, delete accounts with no home directory. If the account is valid, then create the home directory using the appropriate system administration utility or manually create, i.e., mkdir <directory name>; copy the skeleton files into the directory; chown <user name> <directory name> for the new directory and the skeleton files. Document all changes.
Check the home directory mode of each user in /etc/passwd. Procedure: # cut -d : -f 6 /etc/passwd | xargs -n1 ls -ld | more If a user's home directory's mode is more permissive than 0750, this is a finding. NOTE: Application directories are allowed and may need 0755 permissions (or greater) for correct operation.
Change the mode of users' home directories to 0750 or less permissive. Procedure (example): # chmod 0750 <home directory>
Check the ownership of each user's home directory listed in the /etc/passwd file. Procedure: # ls -lLd <user home directory> If any user's home directory is not owned by the assigned user, this is a finding.
Change the owner of a user's home directory to its assigned user. Procedure: # chown <user> <home directory>
Check the group ownership for each user in the /etc/passwd file. Procedure: # ls -lLd <user home directory> If any user's home directory is not group-owned by the assigned user's primary group, this is a finding. Home directories for application accounts requiring different group ownership must be documented using site-defined procedures.
Change the group owner for user's home directories to the primary group of the assigned user. Procedure: # chgrp groupname directoryname (Replace examples with appropriate group and home directory.) Document all changes.
NOTE: The following commands must be run in the BASH shell. Check the ownership of local initialization files. Procedure (using a shell that supports ~USER as USER's home directory): # cut -d : -f 1 /etc/passwd | xargs -n1 -IUSER sh -c "ls -l ~USER/.[a-z]*" # cut -d : -f 1 /etc/passwd | xargs -n1 -IUSER find ~USER/.dt ! -fstype nfs ! -user USER -exec ls -ld {} \; If local initialization files are not owned by the home directory's user, this is a finding.
Change the ownership of the startup and login files in the user's directory to the user or root, as appropriate. Examine each user's home directory and verify all file names beginning with "." are owned by the owner of the directory or root. If they are not, use the chown command to change the owner to the user and research the reasons why the owners were not assigned as required. Procedure: # chown username .filename Document all changes.
Check the modes of local initialization files. Procedure: # ls -al /<usershomedirectory>/.login # ls -al /<usershomedirectory>/.cshrc # ls -al /<usershomedirectory>/.logout # ls -al /<usershomedirectory>/.profile # ls -al /<usershomedirectory>/.bash_profile # ls -al /<usershomedirectory>/.bashrc # ls -al /<usershomedirectory>/.bash_logout # ls -al /<usershomedirectory>/.env # ls -al /<usershomedirectory>/.dtprofile (permissions should be 0755) # ls -al /<usershomedirectory>/.dispatch # ls -al /<usershomedirectory>/.emacs # ls -al /<usershomedirectory>/.exrc # find /<usershomedirectory>/.dt ! -fstype nfs \( -perm -0002 -o -perm -0020 \) -exec ls -ld {} \; (permissions not to be more permissive than 0755) If local initialization files are more permissive than 0740, the .dt directory or the .dtprofile file is more permissive than 0755, this is a finding.
Ensure user startup files have permissions of 0740 or more restrictive. Examine each user's home directory and verify all file names beginning with "." have access permissions of 0740 or more restrictive. If they do not, use the chmod command to correct the vulnerability. Procedure: # chmod 0740 .filename NOTE: The period is part of the file name and is required.
Check run control script modes. # cd /etc # find rc* -ls If any run control script has a mode more permissive than 0755, this is a finding.
Ensure all system startup files have mode 0755 or less permissive. Examine the rc files, all files in the rc1.d (rc2.d, and so on) directories, and in the /etc/init.d directory to ensure they are not world-writable. If the files are world-writable, use the chmod command to correct the vulnerability and research why they are world-writable. Procedure: # chmod 755 startupfile Document all changes.
Verify run control scripts' library search paths. Procedure: # grep -r PATH /etc/rc* This variable is formatted as a colon-separated list of directories. If there is an empty entry, such as a leading or trailing colon, or two consecutive colons, this is a finding. If an entry begins with a character other than a slash (/), this is a relative path, and this is a finding.
Edit the run control script and remove the relative path entry from the executable search path variable.
Check the permissions on the files or scripts executed from system startup scripts to see if they are world-writable. Create a list of all potential run command level scripts. ls -l /etc/init.d/* | tr '\011' ' ' | tr -s ' ' | cut -f 9,9 -d " " Create a list of world writeable files. # find / -perm -002 -type f >> worldWriteableFileList Determine if any of the world writeable files in worldWriteableFileList are called from the run command level scripts. Note: Depending upon the number of scripts vs world writeable files, it may be easier to inspect the scripts manually. # more `ls -l /etc/init.d/* | tr '\011' ' ' | tr -s ' ' | cut -f 9,9 -d "` If any system startup script executes any file or script that is world-writable, this is a finding.
Remove the world-writable permission from programs or scripts executed by run control scripts. Procedure: # chmod o-w <program or script executed from run control script>
Check the system for the existence of any .netrc files. Procedure: # find / -name .netrc If any .netrc file exists, this is a finding.
Remove the .netrc file(s). Procedure: # rm .netrc
For each user in the /etc/passwd file, check for the presence of files and directories within the user's home directory not owned by the home directory owner. Procedure: # find /<usershomedirectory> ! -fstype nfs ! -user <username> ! \( -name .login -o -name .cshrc -o -name .logout -o -name .profile -o -name .bash_profile -o -name .bashrc -o -name .env -o -name .dtprofile -o -name .dispatch -o -name .emacs -o -name .exrc \) -exec ls -ld {} \; If user's home directories contain files or directories not owned by the home directory owner, this is a finding.
Change the ownership of files and directories in user's home directories to the owner of the home directory. Procedure: # chown accountowner filename OR # find /<usershomedirectory> ! -fstype nfs ! -user <username> ! /( -name .login -o -name .cshrc -o -name .logout -o -name .profile -o -name .bash_profile -o -name .bashrc -o -name .env -o -name .dtprofile -o -name .dispatch -o -name .emacs -o -name .exrc \) -exec chown <username> {} \;
For each user in the /etc/passwd file, check for files and directories with a mode more permissive than 0750. Procedure: # find /<usershomedirectory> ! -fstype nfs ! \( -name .login -o -name .cshrc -o -name .logout -o -name .profile -o -name .bash_profile -o -name .bashrc -o -name .env -o -name .dtprofile -o -name .dispatch -o -name .emacs -o -name .exrc \) \( -perm -0001 -o -perm -0002 -o -perm -0004 -o -perm -0020 -o -perm -2000 -o -perm -4000 \) -exec ls -ld {} \; If user's home directories contain files or directories more permissive than 0750, this is a finding.
Change the mode of files and directories within user's home directories to 0750. Procedure: # chmod 0750 filename Document all changes.
Check /etc/security/login.cfg for a shells stanza. Procedure: # grep -p usw: /etc/security/login.cfg | grep "shells =" If no such stanza exists, this is a finding. Check the /etc/shells file. Procedure: # more /etc/shells If the /etc/shells file does not exist, this is a finding.
Edit the /etc/security/login.cfg file and add a shells stanza containing a list of valid shells. #chsec -f /etc/security/login.cfg -s usw -a shells=<list of approved shells> Create the /etc/shells file. #vi /etc/shells
Confirm the login shells referenced in the /etc/passwd file are listed in the /etc/security/login.cfg file's shells =variable in the usw stanza. # more /etc/security/login.cfg # more /etc/shells The /usr/bin/false, /bin/false, /dev/null, /sbin/nologin, (and equivalents), and sdshell will be considered valid shells for use in the /etc/passwd file, but will not be listed in the shells stanza. If a shell referenced in /etc/passwd is not listed in the shells stanza, excluding the above mentioned shells, then this is a finding.
Use the chsh utility or edit the /etc/passwd file and correct the error by changing the default shell of the account in error to an acceptable shell name contained in the /etc/shells file. Alternatively, use the SMIT to change the /etc/passwd shell entry.
Indications of inactive accounts are those without entries in the last log. Check the date in the last log to verify it is within the last 35 days. If an inactive account is not disabled via an invalid login shell /bin/false entry in the shell field of the /etc/passwd file or account_locked = true in /etc/security/user file, this is a finding.
All inactive accounts will have /bin/false, /usr/bin/false, or /dev/null as the default shell in the /etc/passwd file and have the password disabled. Disable the inactive accounts. Examine the inactive accounts using the last command. Note the date of last login for each account. If any (other than system and application accounts) exceed 35 days, then disable them by placing a shell of /bin/false or /dev/null in the shell field of the passwd file entry for that account. An alternative, and preferable method, is to disable the account using SMIT or the chsec command. Change the accounts login shell. #chsh <account> /bin/false Lock the account in /etc/security/user file. #chuser account_locked=true < user id > OR # smitty chuser
Obtain a list of system shells from /etc/security/login.cfg and check the ownership of these shells. Procedure: #grep shells /etc/security/login.cfg | grep -v \* | cut -f 2 -d = | sed s/,/\ /g | xargs -n1 ls -l If any shell is not owned by root or bin, this is a finding. Obtain a list of system shells from /etc/shells and check the ownership of these shells. Procedure: #cat /etc/shells | xargs -n1 ls -l If any shell is not owned by root or bin, this is a finding.
Change the ownership of the shell with incorrect ownership. # chown root < shell >
Obtain a list of system shells from /etc/security/login.cfg and check the permissions of these shells. Procedure: #grep shells /etc/security/login.cfg | grep -v \* | cut -f 2 -d = | sed s/,/\ /g | xargs -n1 ls -l If any shell has a mode more permissive than 0755, this is a finding. Obtain a list of system shells from /etc/shells and check the ownership of these shells. Procedure: #cat /etc/shells | xargs -n1 ls -l If any shell has a mode more permissive than 0755, this is a finding.
Change the mode of the shell. # chmod 0755 < shell >
Check the system for an automated job, or check with the SA, to determine if the system is checked for extraneous device files on a weekly basis. If no automated or manual process is in place, this is a finding.
Establish a weekly automated or manual process to create a list of device files on the system and determine if any files have been added, moved, or deleted since the last list was generated. Generate a list of device files. # find / -type b -o -type c > device-file-list
Find all device files existing anywhere on the system. Procedure: # find / -type b -print > devicelist # find / -type c -print >> devicelist Check the permissions on the directories above subdirectories containing device files. If any of the device files or their parent directories is world-writable, excepting device files specifically intended to be world-writable, such as /dev/null, this is a finding.
Remove the world-writable permission from the device file(s). Procedure: # chmod o-w <device file> Document all changes.
Check the system for world-writable device files. Procedure: # find / -perm -2 -a \( -type b -o -type c \) -exec ls -ld {} \; If any device file(s) used for backup are writable by users other than root, this is a finding (Typical backup devices for tape are/dev/rmt* and cd/dvd writers are /dev/cd*).
Use the chmod command to remove the world-writable bit from the backup device files. Procedure: # chmod o-w <back device filename> Document all changes.
If the system is not using NIS+, this is not applicable. Check the system to determine if NIS+ security level 2 is implemented. Procedure: # niscat cred.org_dir If the second column does not contain DES, the system is not using NIS+ security level 2, and this is a finding.
Configure the NIS+ server to use security level 2.
Check the owner of the exports file. Example: # ls -lL /etc/exports If the export configuration file is not owned by root, this is a finding.
Change the owner of the exports file to root. Example: # chown root /etc/exports
# ls -lL /etc/exports If the file has a mode more permissive than 0644, this is a finding.
# chmod 0644 /etc/exports
Check for NFS exported file systems. Procedure: # exportfs -v This will display all of the exported file systems. For each file system displayed, check the ownership. Procedure: # ls -lLa <exported file system path> If the files and directories are not owned by root, this is a finding.
Change the ownership of exported file systems not owned by root. Procedure: # chown root <path>
Check if the anon option is set correctly for exported file systems. List exported file systems. # exportfs -v Each of the exported file systems should include an entry for the 'anon=' option set to -1 or an equivalent (60001, 60002, 65534, or 65535). If an appropriate 'anon=' setting is not present for an exported file system, this is a finding.
Edit /etc/exports and set the anon=-1 option for exported file systems without it. Re-export the file systems. # exportfs -a
Check the permissions on exported NFS file systems. Procedure: # exportfs -v If the exported file systems do not contain the rw or ro options specifying a list of hosts or networks, this is a finding.
Edit /etc/exports and add ro and/or rw options (as appropriate) specifying a list of hosts or networks which are permitted access. Re-export the file systems.
Determine if the NFS server is exporting with the root access option. Procedure: # exportfs -v | grep "root=" If an export with the root option is found, this is a finding.
Edit /etc/exports and remove the root= option for all exports. Re-export the file systems.
Check the system for NFS mounts not using the nosuid option. Procedure: # lsfs -v nfs If the mounted file systems do not have the nosuid option, this is a finding.
Edit /etc/filesystems and add the nosuid option for all NFS file systems. Remount the NFS file systems to make the change take effect.
Determine if TCP_WRAPPERS is being used. # grep tcpd /etc/inetd.conf If no services are listed, this is a finding.
Edit /etc/inetd.conf and use tcpd to wrap services. Use SMIT to install TCP Wrappers from the AIX Expansion pack media as fileset netsec.options.tcpwrappers.
Normally, TCPD logs to the mail facility in /etc/syslog.conf. Determine if syslog is configured to log events by TCPD. Procedure: # more /etc/syslog.conf Look for entries similar to the following: mail.debug /var/adm/maillog mail.none /var/adm/maillog mail.* /var/log/mail auth.info /var/log/messages The above entries would indicate mail alerts are being logged. If no entries for mail exist, then TCPD is not logging and this is a finding.
Configure the access restriction program to log every access attempt. Ensure the implementation instructions for TCP_WRAPPERS are followed, so system access attempts are logged into the system log files. If an alternate application is used, it must support this function.
Perform: # /bin/tcbck If TCB is not installed, the output will show an error code of 3001-101 and/or a text message indicating TCB is not installed, this is a finding.
Ensure the Trusted Computing Base (TCB) software is implemented. TCB can only be installed at OS installation time.
Check for the existence of the cron.allow and cron.deny files. # ls -lL /var/adm/cron/cron.allow # ls -lL /var/adm/cron/cron.deny If neither file exists, this is a finding.
Create /var/adm/cron/cron.allow and/or /var/adm/cron/cron.deny with appropriate content.
Check mode of the cron.allow file. Procedure: # ls -lL /var/adm/cron/cron.allow If the file has a mode more permissive than 0640, this is a finding.
Change the mode of the cron.allow file to 0640. Procedure: # chmod 0640 /var/adm/cron/cron.allow
List all cronjobs on the system. Procedure: # ls /var/spool/cron/crontabs/ If cron jobs exist under any of the above directories search for programs executed by cron. Procedure: # more <cron job file> Determine if the file is group-writable or world-writable. Procedure: # ls -la <cron program file> If cron executes group-writable or world-writable files, this is a finding.
Remove the world-writable and group-writable permissions from the cron program file(s) identified. # chmod go-w <cron program file>
List all cronjobs on the system. Procedure: # ls /var/spool/cron/crontabs/ If cron jobs exist under any of the above directories search for programs executed by cron. Procedure: # more <cron job file> Determine if the directory containing programs executed from cron is world-writable. Procedure: # ls -ld <cron program directory> If cron executes programs in world-writable directories, this is a finding.
Remove the world-writable permission from the cron program directories identified. Procedure: # chmod o-w <cron program directory>
Check the modes of the crontab and cron job script files. If the mode is more permissive than 0600 for crontab files or 0700 for cron job script files, this is a finding.
Change the modes of crontab files to 0600 and cron job script files to 0700.
Check the mode of the crontab directory. # ls -ld /var/spool/cron/crontabs If the mode of the crontab directory is more permissive than 0755, this is a finding.
Change the mode of the crontab directory. # chmod 0755 /var/spool/cron/crontabs
Check the owner of the crontab directory. # ls -ld /var/spool/cron/crontabs If the owner of the crontab directory is not root or bin, this is a finding.
Change the owner of the crontab directory. # chown root /var/spool/cron/crontabs
Check the group owner of cron and crontab directories. Procedure: # ls -ld /var/spool/cron/crontabs If a cron or crontab directory is not group-owned by sys, system, bin, or cron, this is a finding.
Change the group owner of the crontab directories to sys, system, bin, or cron. Procedure: # chown cron /var/spool/cron/crontabs
# ls -lL /var/adm/cron/log If this file does not exist or is older than the last cron job, this is a finding.
Enable cron logging on the system.
Check the mode of the cron log file. # ls -lL /var/adm/cron/log If the mode is more permissive than 0600, this is a finding.
Change the mode of the cron log file. # chmod 0600 /var/adm/cron/log
Check for the existence of at.allow and at.deny files. # ls -lL /var/adm/cron/at.allow # ls -lL /var/adm/cron/at.deny If neither file exists, this is a finding.
Create at.allow and/or at.deny files containing appropriate lists of users to be allowed or denied access to the "at" daemon.
# more /var/adm/cron/at.deny If the at.deny file exists and is empty, this is a finding.
Add appropriate users to the at.deny file, or remove the empty at.deny file if an at.allow file exists.
# more /var/adm/cron/at.allow If default accounts (such as bin, sys, adm, and others) are listed in the at.allow file, this is a finding.
Remove the default accounts (such as bin, sys, adm, and others) from the at.allow file.
Check the mode of the at.allow file. # ls -lL /var/adm/cron/at.allow If the at.allow file has a mode more permissive than 0640, this is a finding.
Change the mode of the at.allow file. # chmod 0640 /var/adm/cron/at.allow
List the "at" jobs on the system. Procedure: # ls -la /var/spool/cron/atjobs /var/spool/atjobs For each "at" job file, determine which programs are executed. Procedure: # more <at job file> Check each program executed by "at" for group- or world-writable permissions. Procedure: # ls -la <at program file> If "at" executes group- or world-writable programs, this is a finding.
Remove group-write and world-write permissions from files executed by "at" jobs. Procedure: # chmod go-w <file>
List any "at" jobs on the system. Procedure: # ls /var/spool/cron/atjobs /var/spool/atjobs For each "at" job, determine which programs are executed. Procedure: # more <at job file> Check the directory containing each program executed by "at" for world-writable permissions. Procedure: # ls -la <at program file directory> If "at" executes programs in world-writable directories, this is a finding.
Remove the world-writable permission from directories containing programs executed by "at". Procedure: # chmod o-w <at program directory>
Check the SNMP configuration for default passwords. Locate and examine the SNMP configuration. Procedure: # find / -name "snmp*.conf" -print # more <snmpd.conf> Identify any community names or user password configuration. If any community name or password is set to a default value such as public, private, snmp-trap, or password, or any value which does not meet DISA password requirements, this is a finding.
Change the default passwords. To change them, locate the file /etc/snmpd.conf or the file /etc/snmpd3.conf. Edit the file. Locate the line system-group-read-community which has a default password of public and make the password something more random (less guessable). Do the same for the lines that read system-group-write-community, read-community, write-community, trap, and trap-community. Read the information in the file carefully. The trap is defining who to send traps to, for instance, by default. It is not a password, but the name of a host.
Check the mode of the SNMP daemon configuration file. Locate the SNMP daemon configuration file. Consult vendor documentation to verify the name and location of the file. Procedure: # find / -name "snmpd*.conf" Check the mode of the SNMP daemon configuration file. Procedure: # ls -lL <snmpd conf>
Change the mode of the SNMP daemon configuration file to 0600. Procedure: # chmod 0600 /etc/snmpd.conf # chmod 0600 /etc/snmpdv3.conf
Check the modes for all Management Information Base (MIB) files on the system. Procedure: # find / -name *.mib -print # ls -lL <mib file> If any file is returned that does not have mode 0640 or less permissive, this is a finding.
Change the mode of MIB files to 0640. Procedure: # chmod 0640 <mib file>
Check the system for world-writable files and directories. Procedure: # find / -perm -2 -a \( -type d -o -type f \) -exec ls -ld {} \; If any world-writable files or directories are located, except those required for proper system or application operation, such as /tmp and /dev/null, this is a finding.
Remove or change the mode for any world-writable file or directory on the system that is not required to be world-writable. Procedure: # chmod o-w <file/directory> Document all changes.
Determine if inetd or xinetd has logging or tracing enabled. # ps -ef |grep inetd |grep -e "-d" If no results are returned, this is a finding.
Edit the inetd startup script to contain the "-d" parameter for the inetd process. #vi /etc/rc.tcpip # chssys -s inetd -a '-d'
Determine if the system is configured to boot from devices other than the system startup media. # bootlist -m normal -o The returned values should be hdisk{x}. If the system is setup to boot from a non-hard disk device, this is a finding. Additionally, ask the SA if the machine is setup for multi-boot in the SMS application. If multi-boot is enabled, the firmware will stop at boot time and request which image to boot from the user. If multi-boot is enabled, this is a finding.
Configure the system to only boot from system startup media. # bootlist -m normal hdisk< x > Set multi-boot to off in the SMS application.
# ps -ef | egrep "innd|nntpd" If an INN server is running, this is a finding.
Disable the INN server.
Check the system for an enabled SWAT service. # grep -i swat /etc/inetd.conf If SWAT is found enabled, it must be utilized with SSL to ensure a secure connection between the client and the server. Ask the SA to identify the method used to provide SSL protection for the SWAT service. Verify (or ask the SA to demonstrate) this configuration is effective by accessing SWAT using an HTTPS connection from a web browser. If SWAT is found enabled and has no SSL protection, this is a finding.
Disable SWAT (e.g., remove the "swat" line from inetd.conf or equivalent, and restart the service) or configure SSL protection for the SWAT service.
Check the ownership of the /usr/lib/smb.conf file. Procedure: # ls -l /usr/lib/smb.conf If an smb.conf file is not owned by root, this is a finding.
Change the ownership of the smb.conf file. Procedure: # chown root /usr/lib/smb.conf
Check the mode of the smb.conf file. Procedure: # ls -lL /usr/lib/smb.conf If the smb.conf has a mode more permissive than 0644, this is a finding.
Change the mode of the smb.conf file to 0644 or less permissive. Procedure: # chmod 0644 /usr/lib/smb.conf
Check the ownership of the smbpasswd file. # ls -l /var/private/smbpasswd If an smbpasswd file is not owned by root, this is a finding.
Change the owner of the smbpasswd file to root. # chown root /var/private/smbpasswd
Examine the smb.conf file. # more /usr/lib/smb.conf If the hosts option is not present to restrict access to a list of authorized hosts and networks, this is a finding.
Edit the smb.conf file and set the hosts option to permit only authorized hosts to access Samba.
Check the minage field for each user. # /usr/sbin/lsuser -a minage ALL If the minage field is less than 1 for any user, this is a finding.
Use SMIT or the chsec command to set the minimum password age to 1 week. # chsec -f /etc/security/user -s default -a minage=1 # chsec -f /etc/security/user -s <user id> -a minage=1 OR # smitty chuser
Determine if root has logged in over an unencrypted network connection. First, determine if root has logged in over a network. Procedure: # last | grep "^root " | egrep -v "reboot|console" | more Next, determine if the SSH daemon is running. Procedure: # ps -ef |grep sshd If root has logged in over the network and SSHD is not running, this is a finding.
Install OpenSSH from AIX installation media or AIX Expansion Pack. #smitty installp Enable SSH on the system and use it for all remote connections used to attain root access. Disable direct root login. # chsec -f /etc/security/user -s root -a rlogin=false
Determine if the SSH daemon is configured to permit root logins. Procedure: # find / -name sshd_config -ls # grep -v "^#" <sshd_config path and file> | grep -i permitrootlogin If the PermitRootLogin entry is not found or is not set to no, this is a finding.
Edit the /etc/ssh/sshd_config file and set the PermitRootLogin option to no and refresh sshd. #kill -1 <pid of sshd>
Check the mode of audio devices. # /usr/sbin/lsdev -C | grep -i audio # ls -lL /dev/*aud0 If the mode of audio devices are more permissive than 0660, this is a finding.
Change the mode of audio devices. # chmod o-w <audio device>
Check the owner of audio devices. Procedure: # /usr/sbin/lsdev -C | grep -i audio # ls -lL /dev/*aud0 If the owner of any audio device file is not root, this is a finding.
Change the owner of the audio device. # chown root <audio device>
Check the group ownership of the smb.conf file. Procedure: # ls -l /usr/lib/smb.conf If an smb.conf file is not group-owned by bin, sys, or system, this is a finding.
Change the group owner of the smb.conf file. Procedure: # chgrp system /usr/lib/smb.conf
Check smbpasswd ownership. # ls -lL /var/private/smbpasswd If smbpasswd is not group-owned by sys, or system, this is a finding.
Use the chgrp command to change the group owner of the smbpasswd file to system. # chgrp system /var/private/smbpasswd
Check smbpasswd mode. Procedure: # ls -lL /var/private/smbpasswd If smbpasswd has a mode more permissive than 0600, this is a finding.
Change the mode of the smbpasswd file to 0600. Procedure: # chmod 0600 /var/private/smbpasswd
Check the group owner of audio devices. Procedure: # /usr/sbin/lsdev -C | grep -i audio # ls -lL /dev/*aud0 If the group owner of an audio device is not root, sys, bin, or system, this is a finding.
Change the group owner of the audio device. Procedure: # chgrp system <audio device>
Log into a graphical desktop environment provided by the system. Allow the session to remain idle for 15 minutes. If the desktop session is not automatically locked after 15 minutes, or does not require re-authentication to resume operations, this is a finding.
Consult vendor documentation to determine the settings required for the system to lock graphical desktop environments. Configure the system to lock graphical desktop environments after 15 minutes of inactivity and require re-authentication to resume operations.
Procedure: #lsuser -a histsize ALL If the returned histsize for any user is less than 5, this is a finding.
Use the chsec command to configure the system to prohibit the reuse of passwords within five iterations. # chsec -f /etc/security/user -s default -a histsize=5 # chuser histsize=5 < user id >
Check local initialization files for any executed world-writable programs or scripts. Procedure: # more /<usershomedirectory>/.* # ls -al <program or script> If any local initialization file executes a world-writable program or script, this is a finding.
Remove the world-writable permission of files referenced by local initialization scripts, or remove the references to these files in the local initialization scripts.
Check the run control scripts' ownership. Procedure: # ls -lL /etc/rc* If any run control script is not owned by root or bin, this is a finding.
Change the ownership of the run control script(s) with incorrect ownership. # chown root <run control script>
Check run control scripts' group ownership. Procedure: # ls -lL /etc/rc* If any run control script is not group-owned by sys, bin, other, or system, this is a finding.
Change the group ownership of the run control script(s) with incorrect group ownership. Procedure: # chgrp sys <run control script>
Check the ownership of any files executed from system startup scripts. If any of these files are not owned by root, bin, sys, or other, this is a finding.
Change the ownership of the file executed from system startup scripts to root, bin, sys, or other. # chown root <executed file>
Ask the SA if a password has been given to the Service processors ADMIN account. If a password has not been assigned to the service processor, this is a finding.
Access the system's service processor. Set a supervisor/administrator password if one has not been set. Disable a user-level password if one has been set.
Check the servers boot lists for the normal, service, both, or prevboot modes. # bootlist -m <mode> -o Ensure hdisk{x} is the only devices listed. If boot devices, such as cd{x}, fd{x}. rmt{x}, ent{x} are used, this is a finding.
Configure the system to use a bootloader installed on fixed media. # bootlist -m normal hdisk0 # bootlist -m service hdisk0
Ask the SA if the system boots from removable media. If so, ask if the boot media is stored in a secure container when not in use. If it is not, this is a finding.
Store the system boot media in a secure container when not in use.
Check the system for unnecessary user accounts. Procedure: # more /etc/passwd Some examples of unnecessary accounts includes guest, uucp, games, news, gopher, ftp, and lp. If any unnecessary accounts are found, this is a finding.
Remove all unnecessary accounts, such as games, from the /etc/passwd file before connecting a system to the network. Other accounts, such as news and gopher, that are associated with a service not in use should also be removed. # rmuser -p <username>
Check /etc/news/hosts.nntp permissions. # find / -name hosts.nntp # ls -lL < hosts.nntp file > If /etc/news/hosts.nntp has a mode more permissive than 0600, this is a finding.
Change the mode of the hosts.nntp file to 0600. # chmod 0600 < hosts.nntp file>
Check /etc/news/hosts.nntp.nolimit permissions. # find / -name hosts.nntp.nolimit # ls -lL < hosts.nntp.nolimit file > If hosts.nntp.nolimit has a mode more permissive than 0600, this is a finding.
Change the mode of hosts.nntp.nolimit to 0600. # chmod 0600 < hosts.nntp.nolimit file>
Check /etc/news/nnrp.access permissions. # find / -name nnrp.access # ls -lL < nnrp.access > If /etc/news/nnrp.access has a mode more permissive than 0600, this is a finding.
Change the mode of the nnrp.access file to 0600. # chmod 0600 < nnrp.access >
Check /etc/news/passwd.nntp permissions. # find / -name passwd.nntp # ls -lL < passwd.nntp > If passwd.nntp has a mode more permissive than 0600, this is a finding.
Change the mode of the passwd.nntp file. # chmod 0600 < passwd.nntp >
Check the ownership of the files in /etc/news. Procedure: # ls -al /etc/news If any files are not owned by root or news, this is a finding.
Change the ownership of the files in /etc/news to root or news. Procedure: # chown root /etc/news/*
Check /etc/news files group ownership. Procedure: # ls -al /etc/news If /etc/news files are not group-owned by system or news, this is a finding.
Change the group owner of the files in /etc/news to system or news. Procedure: # chgrp news /etc/news/*
The securetcpip command is in /etc. If it is not there, this is a finding. Perform: more /etc/security/config If the stanza below is not there, this is a finding. tcpip: netrc = ftp, rexec The stanza indicates the securetcpip command, which disables all the unsafe tcpip commands, (e.g., rsh, rlogin, tftp) has been executed.
Ensure secure tcp/ip has been invoked before allowing operations on the system.
Perform the following command with no parameters to ensure the system is in trusted mode. # /bin/tcbck If TCB is not installed, the output will show an error code of 3001-101 and/or a text message indicating TCB is not installed. If the output from the command indicates it is not in trusted mode, this is not reviewed. Otherwise, check the root crontab to verify tcbck is executed weekly. If it is not in the crontab, ask the SA if the check is run manually and to see the results of the check.
Add tcbck command as a weekly cronjob with the output sent to the SA.
Examine the sshd configuration file. # grep -i Protocol /etc/ssh/sshd_config If Protocol 2,1 or Protocol 1 are defined on a line without a leading comment, this is a finding.
Edit the configuration file and modify the Protocol line. Protocol 2 Restart sshd: /sbin/init.d/secsh stop /sbin/init.d/secsh start
Check /etc/security/login.cfg # more /etc/security/login.cfg If an alternate console is defined, this is a finding.
Edit /etc/security/login.cfg and remove the alternate console definition.
Verify if NTP running. # lssrc -s xntpd or # ps -ef | egrep "xntpd|ntpd" or # ntpq -p Verify xntpd is started at boot time and scheduled to run. #grep xntpd /etc/rc.tcpip | grep -v \# If NTP is running use the following command. # more /etc/ntp.conf and # ntpq -p Confirm the servers and peers or multicastclient (as applicable) are local or an authoritative U.S. DoD source. If a non-local/non-authoritative (U.S. DoD source) time-server is used, this is a finding.
Use a local authoritative time server that synchronizes to an authorized DoD time source. Ensure all systems in the facility feed from one or more local time servers feeding from the authoritative time server. View the (x)ntp/(x)ntpd man page(s). # man xntpd Create/edit the /etc/ntp.conf file, delete any non-local and/or non-US/DoD sources and insert the local or an authoritative US/DoD source. Start or restart the NTP service. # refresh -s xntpd OR # stopsrc -s xntpd # startsrc -s xntpd
Logging should be enabled for those types of files systems that do not turn on logging by default. Procedure: # mount #lsfs JFS, JFS2, VXFS, HFS, XFS, reiserfs, EXT3, and EXT4 all turn logging on by default and will not be a finding. The ZFS file system uses other mechanisms to provide for file system consistency, and will not be a finding. For other file system types, if the root file system does not have the logging option, this is a finding. If the nolog option or the log=NULL option is set on the root file system, this is a finding.
Implement file system journaling for the root file system, or use a file system using other mechanisms to ensure consistency. If the root file system supports journaling, enable it. If the file system does not support journaling or another mechanism to ensure consistency, a migration to a different file system will be necessary.
Check the system for a running Samba server. Procedure: # ps -ef |grep smbd If the Samba server is running, ask the SA if the Samba server is operationally required. If it is not, this is a finding.
If there is no functional need for Samba and the daemon is running, disable the daemon by killing the process ID as noted from the output of ps -ef |grep smbd. The utility should also be removed or not installed if there is no functional requirement.
Check for any crontab entries that rotate audit logs. Procedure: # crontab -l If such a cron job is found, this is not a finding. Otherwise, query the SA. If there is a process automatically rotating audit logs, this is not a finding. If the SA manually rotates audit logs, this is still a finding, because if the SA is not there, it will not be accomplished. If the audit output is not archived daily, to tape or disk, this is a finding. This can be ascertained by looking at the audit log directory and, if more than one file is there, or if the file does not have today's date, this is a finding.
Configure a cron job or other automated process to rotate the audit logs on a daily basis.
Check the mode of the cron.deny file. # ls -lL /var/adm/cron/cron.deny If the cron.deny file is more permissive than 0640, this is a finding.
Change the mode of the cron.deny file. # chmod 0640 /var/adm/cron/cron.deny
Determine if there are any crontabs by viewing a long listing of the directory. If there are crontabs, examine them to determine what cron jobs exist. Check for any programs specifying an umask. # ls -lL /var/spool/cron/crontabs # cat <crontab file> # grep umask <cron program> If there are no cron jobs present, this vulnerability is not applicable. If any cron job contains an umask value more permissive than 077, this is a finding.
Edit cron script files and modify the umask to 077.
# ls -lL /var/adm/cron/cron.allow If the cron.allow file is not owned by root, sys, or bin, this is a finding.
# chown root /var/adm/cron/cron.allow
Check the mode of the at directory. # ls -lLd /var/spool/cron/atjobs If the directory mode is more permissive than 0755, this is a finding.
Change the mode of the "at" directory to 0755. Procedure: # chmod 0755 < at directory >
Check the ownership of the at directory. Procedure: # ls -ld /var/spool/cron/atjobs If the directory is not owned by root, bin, sys, daemon, or cron, this is a finding.
Change the owner of the at directory to root, bin, sys, daemon, or cron. Procedure: # chown bin /var/spool/cron/atjobs
Determine what "at" jobs exist on the system. Procedure: # ls /var/spool/cron/atjobs /var/spool/atjobs If there are no "at" jobs present, this is not applicable. Determine if any of the "at" jobs or any scripts referenced execute the umask command. Check for any umask setting more permissive than 077. # grep umask <at job or referenced script> If any "at" job or referenced script sets umask to a value more permissive than 077, this is a finding.
Edit "at" jobs or referenced scripts to remove umask commands setting umask to a value less restrictive than 077.
# ls -lL /var/adm/cron/at.allow If the at.allow file is not owned by root, sys, or bin, this is a finding.
Change the owner of the at.allow file. # chown root /var/adm/cron/at.allow
# ls -lL /var/adm/cron/at.deny If the at.deny file is not owned by root, sys, or bin, this is a finding.
Change the owner of the at.deny file. # chown root /var/adm/cron/at.deny
# ls -lL /usr/bin/traceroute If the traceroute command is not owned by root, this is a finding.
Change the owner of the traceroute command to root. Example: # chown root /usr/bin/traceroute
Check the group ownership of the traceroute file. Procedure: # ls -lL /usr/bin/traceroute If the traceroute command is not group-owned by sys, bin, or system, this is a finding.
Change the group owner of the traceroute command to sys, bin, or system. Procedure: # chgrp system /usr/bin/traceroute
# ls -lL /usr/bin/traceroute If the traceroute command has a mode more permissive than 0700, this is a finding.
Change the mode of the traceroute command. # chmod 0700 /usr/bin/traceroute
Look in the root account home directory for a .netscape or a .mozilla directory. If none exists, this is not a finding. If there is one, verify with the root users and the IAO what the intent of the browsing is. Some evidence may be obtained by using the browser to view cached pages under the .netscape directory.
Enforce policy requiring administrative accounts use web browsers only for local service administration.
Check for the Sendmail version being displayed in the greeting. # telnet localhost 25 If a version number is displayed, this is a finding.
Ensure Sendmail or its equivalent has been configured to mask the version information. If necessary, change the O SmtpGreetingMessage line in the /etc/sendmail.cf file. O SmtpGreetingMessage=$j Sendmail $v/$Z; $b Change it to: O SmtpGreetingMessage= Mail Server Ready ; $b
Search for any .forward files on the system. # find / -name .forward -print This is considered a finding if any .forward files are found on the system.
Remove .forward files from the system.
Check the shell for the anonymous FTP account. Procedure: # grep "^ftp" /etc/passwd This is a finding if the seventh field is empty (the entry ends with a ':') or if the seventh field does not contain one of the following. /bin/false /dev/null /usr/bin/false /bin/true /sbin/nologin
Configure anonymous FTP accounts to use a non-functional shell. If necessary, edit the /etc/passwd file to remove any functioning shells associated with the FTP account and replace them with non-functioning shells, such as, /dev/null.
Ask the SA if this is an NMS server. If it is an NMS server, then ask what other applications run on it. If there is anything other than network management software and DBMS software used only for the storage and inquiry of NMS data, this is a finding.
Ensure only authorized software is loaded on a designated NMS server. Authorized software is limited to the NMS software itself, a database management system for the NMS server if necessary, and network management software.
Check /etc/syslog.conf ownership. # ls -lL /etc/syslog.conf If /etc/syslog.conf is not owned by root, this is a finding.
Use the chown command to set the owner to root. # chown root /etc/syslog.conf
Check /etc/syslog.conf group ownership. Procedure: # ls -lL /etc/syslog.conf If /etc/syslog.conf is not group-owned by sys, bin, or system, this is a finding.
Change the group owner of the /etc/syslog.conf file to bin, sys, or system. Procedure: # chgrp system /etc/syslog.conf
Examine the syslog.conf file for any references to remote log hosts. # grep -v "^#" /etc/syslog.conf | grep '@' Destination locations beginning with an @ represent log hosts. If the log host name is a local alias, such as log host, consult the /etc/hosts or other name databases as necessary to obtain the canonical name or address for the log host. Determine if the host referenced is a log host documented using site-defined procedures. If an undocumented log host is referenced, this is a finding.
Remove, replace, or document the referenced undocumented log host.
Check the system for an IPv4 default route. Procedure: # netstat -r |grep default If a default route is not defined, this is a finding.
Set a default gateway for IPv4. # smitty route OR # route add 0 < ip address of gateway >
Ask the SA if the system is a designated router. If it is not, this is not applicable. Check the system for non-routing network services. Procedure: # netstat -a | grep -i listen # ps -ef If non-routing services, including Web servers, file servers, DNS servers, or applications servers, but excluding management services, such as SSH and SNMP, are running on the system, this is a finding.
Ensure only authorized software is loaded on a designated router. Authorized software will be limited to the most current version of routing protocols and SSH for system administration purposes.
If the system does not use NIS or NIS+, this is not applicable. Check if NIS or NIS+ is implemented using UDP. Procedure: # rpcinfo -p | grep yp | grep udp If NIS or NIS+ is implemented using UDP, this is a finding.
Configure the system to not use UDP for NIS and NIS+. Consult vendor documentation for the required procedure.
Locate and examine all .rhosts, .shosts, hosts.equiv, and shosts.equiv files. Procedure: # find / -name .rhosts # more /<directorylocation>/.rhosts # find / -name .shosts # more /<directorylocation>/.shosts # find / -name hosts.equiv # more /<directorylocation>/hosts.equiv # find / -name shosts.equiv # more /<directorylocation>/shosts.equiv If any .rhosts, .shosts, hosts.equiv, or shosts.equiv file contains other than host-user pairs, this is a finding.
If possible, remove the .rhosts, .shosts, hosts.equiv, and shosts.equiv files. If the files are required, remove any content from the files except for necessary host-user pairs.
# find / -type f -name .rhosts # ls -alL /<directorylocation>/.rhosts # find / -type f -name .shosts # ls -alL /<directorylocation>/.shosts # find / -type f -name hosts.equiv # ls -lL /<directorylocation>/hosts.equiv # find / -type f -name shosts.equiv # ls -lL /<directorylocation>/shosts.equiv If the .rhosts, .shosts, hosts.equiv, or shosts.equiv files have permissions greater than 700, this is a finding.
Ensure the permission for these files is set at 700 or less and the owner is the owner of the home directory that it is in. These files, outside of home directories (other than hosts.equiv which is in /etc and owned by root), have no meaning.
# ls -lL /var/adm/cron/cron.deny If the cron.deny file is not owned by root, sys, or bin, this is a finding.
# chown root /var/adm/cron/cron.deny
# grep -v "^#" /etc/inetd.conf |grep rshd If rshd is found to be enabled, this is a finding.
Edit /etc/inetd.conf and comment out the rshd service. Restart the inetd service.
# grep -v "^#" /etc/inetd.conf |grep rexec If any results are returned, this is a finding.
Edit /etc/inetd.conf and comment out the line for the rexec service. Refresh the inetd daemon. # refresh -s inetd
Determine the version of the SMTP service software. Locate the sendmail daemon. Procedure: # find / -name sendmail Obtain version information for the Sendmail daemon. Procedure: # what < file location > OR # strings < file location > | grep version OR # echo \$Z | sendmail -d0 Version 8.14.5 is the latest released version. If the Sendmail version is not at least 8.14.5 or the vendor's latest version, this is a finding.
Obtain and install a newer version of Sendmail from the operating system vendor or from http://www.sendmail.org or ftp://ftp.cs.berkeley.edu/ucb/sendmail.
Check for an enabled debug command provided by the SMTP service. Procedure: # telnet localhost 25 debug If the command does not return a 500 error code of command unrecognized, this is a finding. If telnet is unavailable for testing, check the version of sendmail installed on the system. # echo \$Z | /usr/sbin/sendmail -bt -d0 If the sendmail reported version is less than 8.6, this is a finding.
Obtain and install a more recent version of Sendmail, which does not implement the DEBUG feature.
Check the SMTP service for an active decode command. Procedure: # telnet localhost 25 decode If the command does not return a 500 error code of command unrecognized, this is a finding.
Disable mail aliases for decode and uudecode. If the /etc/aliases or /usr/lib/aliases (mail alias) file contains entries for these programs, remove them or disable them by placing # at the beginning of the line, and then executing the "newaliases" command. For more information on mail aliases, refer to the man page for aliases. Disabled aliases would be similar to the examples below: # decode: |/usr/bin/uudecode # uudecode: |/usr/bin/uuencode -d
Perform the following to determine if EXPN is disabled: # telnet localhost 25 expn root If the command does not return a 500 error code of command unrecognized, this is a finding. OR Locate the sendmail.cf configuration file by: # find / -name sendmail.cf -print # grep -v "^#" <sendmail.cf location> |grep -i privacyoptions The O PrivacyOptions should have the noexpn or the goaway option (covering both noexpn and novrfy). If the EXPN command is not disabled, this is a finding.
Edit the sendmail.cf file and add or edit the following line: O PrivacyOptions=goaway Restart the Sendmail service.
Determine if VRFY is disabled. Procedure: # telnet localhost 25 vrfy root If the command does not return a 500 error code of command unrecognized, this is a finding. OR Locate the sendmail.cf configuration file. Procedure: # find / -name sendmail.cf -print # grep -v "^#" |grep -i vrfy Ensure the VRFY command is disabled with an entry in the sendmail.cf file. The entry could be any one of Opnovrfy, novrfy, or goaway, which could also have other options included, such as noexpn. The goaway argument encompasses many things, such as novrfy and noexpn. If no setting to disable VRFY is found, this is a finding.
If you are running Sendmail, add the line Opnovrfy to your Sendmail configuration file, usually located in /etc/sendmail.cf. For other mail servers, contact the vendor for information on how to disable the verify command. Newer versions of Sendmail are available at http://www.sendmail.org or from ftp://ftp.cs.berkeley.edu/ucb/sendmail.
Locate the sendmail.cf configuration file and check for wiz configuration. Procedure: # find / -name sendmail.cf -print # grep -v "^#" <sendmail.cf location> |grep -i wiz If an entry is found for wiz, this is a finding.
If the WIZ command is enabled on Sendmail, it should be disabled by adding this line to the sendmail.cf configuration file (it must be typed in uppercase). OW* For the change to take effect, kill the Sendmail process, refreeze the sendmail.cf file, and restart the Sendmail process.