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
This can be checked in the /etc/rcS file (on Solaris 5.X systems) to check if the system runs sulogin, or an equivalent, when booting into single-user mode by performing more /etc/rcS/sulogin. Alternatively, perform grep sulogin /etc/rcS. NOTE: The file may be in /sbin. The last resort, if it is not a production system, is to boot the system to single-user mode by pressing stop a, and typing boot -s, at the > or ok prompt. If the system enters single-user mode and no password is required, this is a finding. NOTE: This is a default on Solaris 5.5.1 and later.
Edit /etc/rcS and set sulogin be run for single-user mode. NOTE: This is a default on Solaris 5.5.1 and later.
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.
Use the switch user (su) command from a named account login to access shared accounts. Maintain audit trails that identify the actual user of the account name. Document requirements and procedures for users/administrators to log into their own accounts first and then switch user (su) to the shared account.
Check the system for duplicate account names. Example: # logins -u | sort | uniq -c | awk '$1 > 1 {print $2}' 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. # logins -d 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/issue and add one of the DoD login banners (based on the character limitations imposed by the system). 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. # more /var/adm/loginlog If the commands do not return successful and unsuccessful logins, this is a finding. Check the syslog daemon configuration for authentication logging. # egrep "auth\.(info|debug)" /etc/syslog.conf If there are no entries in syslog for the auth service, this is a finding.
Verify that login logs are handled correctly in the /etc/syslog.conf file. Edit the /etc/syslog.conf file and add one of the entries below. auth.debug /var/log/authlog OR auth.* /var/log/authlog Verify that service startup scripts for syslog and utmp (if present) are enabled.
Verify RETRIES is set in the login file. # grep RETRIES /etc/default/login If RETRIES is not set or is more than 3, this is a finding.
Set the RETRIES parameter to 3 in the /etc/default/login file. # vi /etc/default/login
Check the SLEEPTIME parameter in the /etc/default/login file. # grep SLEEPTIME /etc/default/login If SLEEPTIME is not listed, commented out, or less than 4, this is a finding.
Edit the /etc/default/login file and set SLEEPTIME to 4.
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. # logins -p If any account with a blank password is found, this is a finding.
Remove, lock, or configure a password for any account with a blank password.
Check the system for duplicate UID 0 assignments by listing all accounts assigned UID 0. Procedure: # awk -F: '$3 == 0' /etc/passwd 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 /rootdir). Procedure: # mkdir /rootdir # chown root /rootdir # chgrp root /rootdir # chmod 700 /rootdir # cp -r /.??* /rootdir Edit the passwd file and change the root home directory to /rootdir. The cp -r /.??* command copies all files and subdirectories of file names beginning with "." into the new root directory, which preserves the previous root environment. The cp command must be executed from the / directory.
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 /rootdir.
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.
Check for world-writable permissions on all directories in the root user's executable search path. Procedure (on multiple lines): # echo $PATH | sed 's/ /\\ /g; s/:/ /g' | xargs ls -ld 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 CONSOLE setting in /etc/default/login # grep CONSOLE /etc/default/login If CONSOLE is set to a value other than /dev/console, this is a finding.
Edit the /etc/default/login file and uncomment the line containing /dev/console if it is commented out.
# more /etc/passwd Confirm all accounts with a GID of 99 and below are used by a system account. If a GID reserved for system accounts (0 - 99) 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). # usermod -g <new_group> <user>
Perform the following to ensure there are no GIDs referenced in /etc/passwd not defined in /etc/group. # logins -o | awk -F: '$3 == ""' If any lines are returned, there are GIDs referenced in /etc/passwd that are not defined in /etc/group, this is a finding.
Add a group to the system for each GID referenced that does not have a corresponding group. #/usr/sbin/groupadd < group >
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 patches from Oracle. Verify the available security patches have been installed on the system. To list installed patches, use the patchadd or showrev utilities. Example: # patchadd -p OR # showrev -p If there are patches available and applicable to the system that have not been installed, this is a finding.
Use a web browser to access https://support.oracle.com and download the recommended patch cluster. Ensure the file system containing the cluster has sufficient free space for the decompression of the archive. Uncompress the cluster archive (with uncompress or gunzip as appropriate). Use the command tar -xvf < file name > to extract the patches. Enter single user mode and run ./install_patchset to apply the patches. The system will be unavailable as patches are installed.
Check system directories for uneven file permissions. Procedure: # ls -lL /etc /bin /usr/bin /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.
Check the mode of network services daemons. # ls -la /usr/bin /usr/sbin If the mode of a network services daemon is more permissive than 0755, this is a finding. NOTE: Network daemons not residing in these directories (such as httpd or sshd) must also be checked for the correct permissions. A way to locate network daemons, such as httpd and sshd, is with the ps command. # ps -ef | egrep '(sshd|httpd)'
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. # ls -alL /etc/skel If a skeleton file has a mode more permissive than 0644, this is a finding.
Change the mode of skeleton files with incorrect mode. # chmod 0644 <skeleton file>
Perform the following to check NIS file ownership. # ls -lRa /usr/lib/netsvc/yp /var/yp If the file ownership is not root, sys, or bin, this is a finding.
Change the ownership of NIS/NIS+/yp files to root, bin, or sys. Procedure: # chown -R root /usr/lib/netsvc/yp /var/yp
Perform the following to check NIS file ownership. # ls -lRa /usr/lib/netsvc/yp /var/yp If the file group owner is not root, sys, or bin, this is a finding.
Change the group owner of the NIS files to root, bin, or sys. Procedure: # chgrp -R root /usr/lib/netsvc/yp /var/yp
Perform the following to check NIS file mode. # ls -lRa /usr/lib/netsvc/yp /var/yp If the file's mode is more permissive than 0755, this is a finding.
Change the mode of NIS/NIS+/yp command files to 0755 or less permissive. Procedure: # chmod -R 0755 /usr/lib/netsvc/yp /var/yp
Check the mode of the manual page files. Procedure: # ls -lLR /usr/share/man /usr/sfw/share/man /usr/sfw/man 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 /usr/sfw/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/to/library-file NOTE: Library files should have an extension of .a or .so, possibly followed by a version number.
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.
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.
Change the group owner of system files to a system group. Procedure: # chgrp root /path/to/system/file (System groups other than root may be used.)
Check the ownership of the /etc/shadow file. # ls -lL /etc/shadow If the /etc/shadow file is not owned by root, this is a finding.
Change the ownership of the /etc/shadow file. # chown root /etc/shadow
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/shadow file. # ls -lL /etc/shadow If the /etc/shadow file has a mode more permissive than 0400, this is a finding.
Change the mode of the /etc/shadow (or equivalent) file. # chmod <mode> <file>
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 setgid bit set will be documented in the system baseline and authorized by the Information Systems Security Officer. Locate all setgid files with the following command. find / -perm -2000 -exec ls -lLd {} \; Ensure setgid 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/vfstab and verify the "nosuid" mount option is used on any user filesystem (such as /export/home) or filesystems mounted from removable media or network shares.
Edit /etc/vfstab and add the "nosuid" mount option to any user filesystem (such as /export/home) or filesystems mounted from removable media or network shares.
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.)
NOTE: The following commands must be run in the BASH shell. Check global configuration: # find /etc -type f | xargs grep -i umask Check local initialization files: # cut -d: -f1 /etc/passwd | xargs -n1 -iUSER sh -c "grep umask ~USER/.*" If the system and user default umask is not 077, this a finding. Note: If the default umask is 000 or allows for the creation of world writable files this becomes a CAT I finding..
Edit the /etc/default/login file for Solaris. Set the variable UMASK=077 Edit local and global initialization files containing "umask" and change them to use 077 instead of the correct value.
Determine if default system accounts (such as, those for sys, bin, uucp, nuucp, daemon, smtp, gdm, lp, nobody) have been disabled. # cat /etc/shadow If an account's password field is "*", "*LK*", "NP", or is prefixed with a "!", the account is locked or disabled. If there are any default system accounts not locked, this is a finding.
Lock the default system account(s). # passwd -l <user>
Determine if auditing is enabled. # ps -ef |grep auditd If the auditd process is not found, this is a finding.
Use /etc/security/bsmconv to enable auditing on the system.
Perform the following to determine the location of audit logs and then check the ownership. # more /etc/security/audit_control # ls -lLa <audit log dir> 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. # more /etc/security/audit_control # ls -lLa <audit log dir> If the audit log directory has a mode more permissive than 0750 or 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. # more /etc/security/audit_control If flags -fr or fr are not configured, this is a finding.
Edit /etc/security/audit_control and add the fr or -fr flags to the flags list. Load the new audit configuration. # auditconfig -conf
# grep flags /etc/security/audit_control Confirm flags fd or +fd and -fd are configured.
Edit /etc/security/audit_control and add the fd to the flags list. Load the new audit configuration. # auditconfig -conf
Check the auditing configuration of the system. # grep flags /etc/security/audit_control If the ad flag is not present, and either the -ad or +ad flags is not present, this is a finding.
Edit /etc/security/audit_control and add "ad" to the flags list. Load the new audit configuration. # auditconfig -conf
Check the system's audit configuration. # grep lo /etc/security/audit_control If the lo flag is not set, and both the +lo and -lo flags are not set, this is a finding. If the lo naflag is not set, and both the +lo and -lo naflags are not set, this is a finding.
Edit /etc/security/audit_control and add lo to the flags list and naflags list. Load the new audit configuration. # auditconfig -conf
Check the system's audit configuration. # grep flags /etc/security/audit_control Confirm flags fm or +fm and -fm are configured.
Edit /etc/security/audit_control and add fm to the flags list. Load the new audit configuration. # auditconfig -conf
Check the ownership of inetd.conf file. Procedure: # ls -lL /etc/inet/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/inet/inetd.conf
Check the mode of inetd.conf file. # ls -lL /etc/inet/inetd.conf If the mode of the file is more permissive than 0440, this is a finding.
Change the mode of the inetd.conf file. # chmod 0440 /etc/inet/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/csh.login /etc/csh.cshrc If no existing 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 is not applicable. Otherwise, examine the configuration file. Procedure: # more <print service file> Check for entries that contain a "+" or "_" character. If any are found, this is a finding.
Remove the "+" entries from the hosts.lpd (or equivalent) file.
Check the owner of the print service configuration files. Procedure: # ls -lL /etc/apache/httpd-standalone-ipp.conf /etc/printers.conf /etc/smb.conf /etc/sfw/smb.conf /etc/samba/smb.conf /etc/sfw/samba/smb.conf If the owner of any of the print service configuration files is not root, this is a finding.
Change the owner of the print service configuration files. Procedure: # chown root /etc/apache/httpd-standalone-ipp.conf /etc/printers.conf /etc/sfw/smb.conf
Check the mode of the print service configuration files. Procedure: # ls -lL /etc/apache/httpd-standalone-ipp.conf /etc/printers.conf /etc/smb.conf /etc/sfw/smb.conf /etc/samba/smb.conf /etc/sfw/samba/smb.conf If the mode of any of the print service configuration file is more permissive than 0644, this is a finding.
Change the mode of the print service configuration files to 0644 or less permissive. Procedure: # chmod 0644 /etc/apache/httpd-standalone-ipp.conf /etc/printers.conf /etc/smb.conf /etc/sfw/smb.conf /etc/samba/smb.conf /etc/sfw/samba/smb.conf
Find the aliases file on the system. Procedure: # find / -name aliases -depth -print Check the ownership of the alias file. Procedure: # ls -lL <alias location> 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
Find the alias files on the system. Procedure: # egrep '^O(A| AliasFile)' /etc/mail/sendmail.cf If the alias file is an NIS or LDAP map, this check is not applicable. The default location is /etc/mail/aliases. Check the permissions of the alias file and the hashed version of it used by sendmail. Procedure: # ls -lL /etc/mail/aliases /etc/mail/aliases.db If the alias files have a mode more permissive than 0644, this is a finding.
Change the mode of the /etc/mail/aliases files (or equivalent, such as /usr/lib/aliases) to 0644. Procedure: # chmod 0644 /etc/mail/aliases /etc/mail/aliases.db
Check the syslog configuration file for mail.crit logging configuration. Procedure: # more /etc/syslog.conf Verify a line similar to one of the following lines is present in syslog.conf is configured so that critical mail log data is logged. (Critical log data may also be captured by a remote log host in accordance with GEN005460.) mail.crit /var/adm/messages *.crit /var/log/messages Less severe syslog levels (err, warning, info, and debug) may be substituted for crit, since they will also capture crit level syslog messages. 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/ftpd/ftpusers If the ftpusers file does not exist, this is a finding.
Create a /etc/ftpd/ftpusers file containing a list of accounts not authorized for FTP.
Check the contents of the ftpusers file. Procedure: # more /etc/ftpd/ftpusers If the system has accounts not allowed to use FTP that are not listed in the ftpusers file, this is a finding.
Add accounts not allowed to use FTP to the /etc/ftpd/ftpusers file.
Check the ownership of the ftpusers file. # ls -l /etc/ftpd/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/ftpd/ftpusers
Check the permissions of the ftpusers file. # ls -l /etc/ftpd/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/ftpd/ftpusers
Examine the FTP daemon service configuration. # grep ftpd /etc/inetd.conf, Check the line for ftpd and determine if the -l or -v options are present. If not, this is a finding.
Edit the FTP daemon configuration in /etc/inetd.conf and add the "-l" or "-v" options (as appropriate) to enable verbose logging.
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.
Configure the FTP service to not permit anonymous logins.
Determine if tftpd is running in secure mode. # grep tftp /etc/inetd.conf If any returned service line does not use the "-s" parameter to tftpd, this is a finding.
Edit /etc/inetd.conf and add the "-s" parameter to tftpd.
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>
Verify the tftp service is enabled. # svcs tftp If the tftp service is not installed or enabled, this check is not applicable. 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 pwck to verify home directory assignments are present. # pwck 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 verify assigned home directories exist. # pwck 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 that have no home directory. If the account is valid, then create the home directory using the appropriate system administration utility or manually. For instance: mkdir directoryname; copy the skeleton files into the directory; chown accountname for the new directory and the skeleton files. Document all changes. Update the sixth field in the /etc/passwd file to reflect the user's home directory. # usermod -d OR # vi /etc/passwd
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: # cut -d : -f 6 /etc/passwd | xargs -n1 ls -ld | more 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: # cut -d : -f 6 /etc/passwd | xargs -n1 ls -ld | more 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. # ls -lL /etc/rc* /etc/init.d /lib/svc/method 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, and all files in the rc1.d (rc2.d, and so on) directories, and in the /etc/init.d and /lib/svc/method directories to ensure they are not world-writable. If they are world-writable, use the chmod command to correct the vulnerability and to research why. Procedure: # chmod go-w <startupfile>
Verify run control scripts' executable search paths. Procedure: # find /etc/rc* /etc/init.d /lib/svc/method -type f -print | xargs grep -i 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 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 " " OR # ls -l /sbin/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 " "` OR # more `ls -l /sbin/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 or root. Procedure: # cut -d : -f 6 /etc/passwd | xargs -n1 -IDIR ls -alLR DIR | more OR # find /<usershomedirectory> ! -fstype nfs ! -user <username> -exec ls -ld {} \; | more If user's home directories contain files or directories not owned by the home directory owner or root, 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 \( -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.
Verify /etc/shells exists. # ls -l /etc/shells If the file does not exist, this is a finding.
Create a /etc/shells file containing a list of valid system shells. The list below contains the default shells from the shells(4) man page. Procedure (the command is 24 lines long): cat >/etc/shells <<EOF /bin/bash /bin/csh /bin/jsh /bin/ksh /bin/pfcsh /bin/pfksh /bin/pfsh /bin/sh /bin/tcsh /bin/zsh /sbin/jsh /sbin/sh /usr/bin/bash /usr/bin/csh /usr/bin/jsh /usr/bin/ksh /usr/bin/pfcsh /usr/bin/pfksh /usr/bin/pfsh /usr/bin/sh /usr/bin/tcsh /usr/bin/zsh EOF
Confirm the login shells referenced in the /etc/passwd file are listed in the /etc/shells file. Procedure: # more /etc/passwd # 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 /etc/shells file. If a shell referenced in /etc/passwd is not listed in the shells file, excluding the above mentioned shells, 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.
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. Obtain a listing of user accounts. #cat /etc/passwd | cut -f1 -d ":" Run the last command for each user account. # last < user account > If any user's account has not been accessed in the last 35 days and the account is not disabled via an entry in the password field in the /etc/passwd or /etc/shadow (or equivalent), check the /etc/passwd file to check if the account has a valid shell. If an inactive account is found that is not disabled, 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 smc or the passwd command. # passwd -l < account to lock >
Check the ownership of the system shells. # cat /etc/shells | xargs -n1 ls -lL 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>
If /etc/shells exists, check the group ownership of each shell referenced. # cat /etc/shells | xargs -n1 ls -lL Otherwise, check any shells found on the system. # find / -name "*sh" | xargs -n1 ls -lL If a 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.
Use the chmod command to remove the world-writable bit from the backup device files. Procedure: # chmod o-w backdevicefilename 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.
Ensure the NIS+ server is operating at security level 2 by editing /usr/lib/nis/nisserver and ensuring the line containing SEC= is set to the numeral 2, for example: SEC=2 # 2=DES or 3=RSA Security Level 0 is designed for testing and initial setup of the NIS+ namespace. When running at level 0, the daemon does not enforce access control. Any client is allowed to perform any operation, including updates and deletions. Security level 1 accepts AUTH_SYS and AUTH_DES credentials for authenticating clients and authorizing them to perform NIS+ operations. This is not a secure mode of operation since AUTH_SYS credentials are easily forged. It should not be used on networks in which any untrusted user may potentially have access. Security level 2 accepts only AUTH_DES credentials for authentication and authorization. This is the highest level of security currently provided by the NIS+ service and the default security level if the -S option is not used.
Check the ownership of the dfstab file. Example: # ls -lL /etc/dfs/dfstab If the export configuration file is not owned by root, this is a finding.
Change the owner of the dfstab file to root. Example: # chown root /etc/dfs/dfstab
# ls -lL /etc/dfs/dfstab If the file has a mode more permissive than 0644, this is a finding.
Change the permissions of the dfstab file to 664 or less permissive. # chmod 0644 /etc/dfs/dfstab
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/dfs/dfstab and add the "anon=-1" option for exports lacking it. Re-export the filesystems.
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/dfs/dfstab 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.
Perform the following on NFS servers. # grep "^default" /etc/nfssec.conf Check to ensure the second column does not equal 0. This would indicate the default is set to none. Perform the following to check currently exported file systems. # more /etc/exports OR # more /etc/dfs/dfstab If the option sec=none is set on any of the exported file systems, this is a finding.
Edit the /etc/dfs/dfstab file and add the sec=XXX option to the share line as an option. XXX must be a valid option for the system other than none.
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 the /etc/dfs/dfstab file and remove the root= option from all exports. Re-export the file systems.
Check the system for NFS mounts not using the nosuid option. Procedure: # mount -v | grep " type nfs " | grep -v nosetuid OR # grep nfs /etc/mnttab | grep -v nosuid | grep -v :vold If the mounted file systems do not have the nosetuid/nosuid option, this is a finding. NOTE: Mount options for the volume management daemon (vold) are controlled by the /etc/rmmount.conf file.
Edit /etc/vfstab and add the nosuid option for all NFS file systems. Remount the NFS file systems to make the change take effect.
# grep -i enable_tcpwrappers /etc/default/inetd If the value returned is not set to yes and /etc/inetd.conf does not contain tcpd, this is a finding.
Edit /etc/default/inetd and set enable_tcpwrappers to true. Edit /etc/inetd.conf and use tcpd to wrap services.
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.
Determine if ASET is being used. # crontab -l | grep aset Check the configuration of ASET. # more /usr/aset/asetenv OR Check that asetenv has not been modified since installation. # pkgchk SUNWast If there are any changes below the following two lines that are not comments, this is a finding. # Don't change from here on down ... # # there shouldn't be any reason to. # In addition, if any of the following lines do not match, this is a finding. TASKS="firewall env sysconf usrgrp tune cklist eeprom" CKLISTPATH_LOW=${ASETDIR}/tasks:#${ASETDIR} \ /util:${ASETDIR}/masters:/etc CKLISTPATH_MED=${CKLISTPATH_LOW}:/usr/bin:/usr/ucb CKLISTPATH_HIGH=${CKLISTPATH_MED}:/usr/lib:/sbin: \ /usr/sbin:/usr/ucblib YPCHECK=false PERIODIC_SCHEDULE="0 0 * * *" UID_ALIASES=${ASETDIR}/masters/uid_aliases (The default asetenv file can be found on the Solaris installation media.)
Restore the ASET configuration to vendor default and only modify the portions of the configuration designated as customizable.
Perform the following to determine if ASET is configured to check NIS+. # grep YPCHECK /usr/aset/asetenv If NIS+ is running and the YPCHECK variable is set to false, then this is a finding.
Edit the ASET configuration and set YPCHECK to true on systems running NIS. (If NIS+ is configured, YPCHECK must only be set to false to avoid going into NIS compatibility mode.) Configure NIS to use YPCHECK.
Determine if ASET is being used. # crontab -l | grep aset If ASET is not used on the system, this is not applicable. If ASET is being used, but is not invoked with the "-u /usr/aset/userlist" option, this is a finding. Check the /usr/aset/userlist file. # ls -lL /usr/aset/userlist If /usr/aset/userlist file does not exist, this is a finding. An empty /usr/aset/userlist file, while not optimal, is not a finding.
Create the /usr/aset/userlist file and populate it with a list of authorized users.
If ASET is not used on the system, this is not applicable. Check the ownership of the /usr/aset/userlist file. # ls -lL /usr/aset/userlist If the owner of the file is not root, this is a finding.
Use the chmod command to change the owner of the /usr/aset/userlist file. # chown root /usr/aset/userlist
# ls -lL /usr/aset/userlist If /usr/aset/userlist has a mode more permissive than 0600, this is a finding.
Change the mode of the /usr/aset/userlist file to 0600. # chmod 0600 /usr/aset/userlist
If the system does not have an OBP / EEPROM, this is not applicable. # eeprom | grep security-mode If the EEPROM security-mode parameter is not set to full or command, this is a finding.
Set the system EEPROM security-mode parameter to full or command. # eeprom security-mode=full OR # eeprom security-mode=command The system will prompt the user for a password. This should be securely stored.
Check for the existence of the cron.allow and cron.deny files. # ls -lL /etc/cron.d/cron.allow # ls -lL /etc/cron.d/cron.deny If neither file exists, this is a finding.
Create /etc/cron.d/cron.allow and/or /etc/cron.d/cron.deny with appropriate content.
Check mode of the cron.allow file. Procedure: # ls -lL /etc/cron.d/cron.allow If either file has a mode more permissive than 0600, this is a finding.
Change the mode of the cron.allow file to 0600. Procedure: # chmod 0600 /etc/cron.d/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 mode of the crontab files. # ls -lL /var/spool/cron/crontabs/ If any crontab file has a mode more permissive than 0600, this is a finding.
Change the mode of the crontab files. # chmod 0600 /var/spool/cron/crontabs/*
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 the crontab directories. Procedure: # ls -ld /var/spool/cron/crontabs If the directory is not group-owned by root, sys, or bin, this is a finding.
Change the group owner of the crontab directories to root, sys, or bin. Procedure: # chgrp root /var/spool/cron/crontabs
# ls -lL /var/cron/log If this file does not exist, or is older than the last cron job, this is a finding. # more /etc/default/cron If a CRONLOG=YES line does not exist, this is a finding.
Edit /etc/default/cron and set CRONLOG=YES.
Check the mode of the cron log file. # ls -lL /var/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/cron/log
Check for the existence of at.allow and at.deny files. # ls -lL /etc/cron.d/at.allow # ls -lL /etc/cron.d/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 /etc/cron.d/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 /etc/cron.d/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 /etc/cron.d/at.allow If the at.allow file has a mode more permissive than 0600, this is a finding.
Change the mode of the at.allow file. # chmod 0600 /etc/cron.d/at.allow
List the "at" jobs on the system. Procedure: # ls -la /var/spool/cron/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 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 snmpd.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, password, or any value which does not meet DISA password requirements, this is a finding.
Change the default passwords. To change them, locate the snmpd.conf file and edit it. Locate the line system-group-read-community which has a default password of public and make the password something more random (less guessable). Make the same changes 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> If the snmpd.conf file has a mode more permissive than 0600, this is a finding.
Change the mode of the SNMP daemon configuration file to 0600. Procedure: # chmod 0600 <snmpd.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.
# ps -ef |grep inetd |grep "-t" If no results are returned, this is a finding.
Edit the inetd startup script and add the -t parameter.
Determine if the system is configured to boot from devices other than the system startup media. If so, this is a finding. In most cases, this will require access to the BIOS or system controller. The exact procedure will be hardware-dependent, and the SA should be consulted to identify the specific configuration. In the event the BIOS or system controller is not accessible without adversely impacting (e.g., restarting) the system, the SA may be interviewed to determine compliance with the requirement.
Configure the system to only boot from system startup media.
# ps -ef | egrep "innd|nntpd" If an INN server is running, this is a finding.
Disable the INN server.
Verify the SWAT daemon is running under inetd. # svcs swat If SWAT is disabled or not installed, this is not applicable. Verify that TCP_wrappers is enabled for the SWAT daemon. # inetadm -l swat | grep tcp_wrappers If the tcp_wrappers value is unset or is set to FALSE, this is a finding. Verify access to the SWAT daemon is limited to localhost through the use of TCP_Wrappers. # more /etc/hosts.allow # more /etc/hosts.deny If the hosts.allow and hosts.deny access control files are configured such that remote access to SWAT is enabled, this is a finding. Ask the SA if SSH port forwarding is used to enable remote access to SWAT. If it is, this is not a finding. If all access to SWAT is via localhost using a local web browser, this is not a finding.
Enable tcp_wrappers for the SWAT daemon. # inetadm -m swat tcp_wrappers=true OR # inetadm -M tcp_wrappers=true Relfresh the inetd daemon. # svcadm refresh inetd Configure the hosts.allow and hosts.deny files to limit access to SWAT to localhost. Example: # echo ALL: ALL >> /etc/hosts.deny # echo swat: localhost >> /etc/hosts.allow
Check the ownership of the smb.conf file. Default locations for this file include /etc, /etc/sfw, /etc/samba, and /etc/sfw/samba. If the system has Samba installed in non-standard locations, also check the smb.conf in those locations. Procedure: # ls -lL /etc/smb.conf /etc/sfw/smb.conf /etc/samba/smb.conf /etc/sfw/samba/smb.conf # ls -l /etc/smb.conf /etc/sfw/smb.conf /etc/samba/smb.conf /etc/sfw/samba/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 /etc/smb.conf /etc/sfw/smb.conf /etc/samba/smb.conf /etc/sfw/samba/smb.conf
Check the mode of the smb.conf file. Procedure: # find / -name smb.conf # ls -lL <smb.conf file> 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 smb.conf
Check the ownership of the smbpasswd file. # find / -name smbpasswd # ls -l <smbpasswd file> If an smbpasswd file is not owned by root, this is a finding.
Use the chown command to configure the smbpasswd file. # chown root /etc/smbpasswd
Examine the smb.conf file. Default locations for this file include /etc, /etc/sfw, /etc/samba, and /etc/sfw/samba. If the system has Samba installed in non-standard locations, also check the smb.conf in those locations. # more /etc/smb.conf /etc/sfw/smb.conf /etc/samba/smb.conf /etc/sfw/samba/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 minimum time period between password changes for each user account is 1 day or greater. # awk -F: '$4 < 1 {print $1}' /etc/shadow If any results are returned that are not associated with a system account, this is a finding.
Edit the /etc/default/passwd file and set the variable "MINWEEKS" to 1 or greater. Set the per-user minimum password change times by using the following command on each user account. # passwd -n <number of days> <accountname>
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.
Enable SSH on the system and use it for all remote connections used to attain root access.
Determine if the SSH daemon is configured to permit root logins. Procedure: # grep -v "^#" /etc/ssh/sshd_config | grep -i permitrootlogin If the PermitRootLogin entry is not found or is not set to "no", this is a finding.
Edit the configuration file and set the PermitRootLogin option to no.
Check the mode of audio devices. # ls -lL /dev/audio If the mode of audio devices are more permissive than 0660, this is a finding.
Change the mode of the audio device. # chmod -R 0660 /dev/audio
Check the owner of audio devices. # ls -lL /dev/audio 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. Default locations for this file include /etc, /etc/sfw, /etc/samba, and /etc/sfw/samba. If the system has Samba installed in non-standard locations, also check the smb.conf in those locations. Procedure: # ls -l /etc/smb.conf /etc/sfw/smb.conf /etc/samba/smb.conf /etc/sfw/samba/smb.conf If an smb.conf file is not group-owned by root, bin, or sys, this is a finding.
Change the group owner of the smb.conf file. Procedure: # chgrp root /etc/smb.conf /etc/sfw/smb.conf /etc/samba/smb.conf /etc/sfw/samba/smb.conf
Check smbpasswd ownership. # find / -name smbpasswd # ls -lL <smbpasswd file> If smbpasswd is not group-owned by root, this is a finding.
Use the chgrp command to ensure the group owner of the smbpasswd file is root. # chgrp root /etc/smbpasswd.
Check smbpasswd mode. Procedure: # find / -name smbpasswd # ls -lL <smbpasswd file> 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 smbpasswd
Check the group-owner of audio devices. Procedure: # ls -lL /dev/audio If the group-owner of an audio device is not root, sys, or bin, this is a finding.
Change the group owner of the audio device. Procedure: # chgrp system <audio device>
Perform the following to determine if /usr is partitioned. # grep /usr /etc/vfstab If /usr is partitioned, check the location of root's default shell. # awk -F: '$1 == "root" {print $7}' /etc/passwd If the root shell is found to be on a partitioned /usr filesystem or is in a directory symlinked to a partitioned /usr filesystem, even if the actual root shell is a symlink back to the root filesystem, this is a finding.
Change the root account's shell to one present on the / filesystem. Example: # usermod -s /sbin/sh root
Examine the dtsession timeout variable setting: # cat /etc/dt/config/C/sys.resources | grep -i dtsession | grep -i lockTimeout If the dtsession timeout is greater than 15, commented or does not exist, this is a finding. Examine the Open Windows timeout settings, both global and for every user. # cat /usr/openwin/lib/app-defaults/XScreenSaver | egrep -i '\*(lock|timeout):' If the global Open Windows timeout is greater than 15 minutes, commented or does not exist, this is a finding. If the global lock setting is not true, this is a finding. # cut -d: -f6 /etc/passwd | xargs -iX egrep -i '^(lock|timeout):' X/.xscreensaver If the Open Windows timeout is greater than 15 minutes for any user, this is a finding. If the lock setting is not true for any user, this is a finding.
Configure the CDE lock manager to lock your screen after a certain amount of inactive time. To configure the CDE lock manager to lock the screen after 15 minutes of inactive time, enter the following commands (be sure NOT to overwrite an existing file). # cp /usr/dt/config/C/sys.resources /etc/dt/config/C/sys.resources # vi /etc/dt/config/C/sys.resources Locate and add/uncomment/change the line to N=15. dtsession*lockTimeout: <N> dtsession*lockTimeout: 15 Log out of CDE and log back in to verify that the timeout is in effect. The timeout parameter in /usr/openwin/lib/app-defaults/XScreenSaver and all users' .xscreensaver files should also be confirmed to be uncommented and set to 0:15:00.
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 run control scripts' ownership. # ls -lL /etc/rc* /etc/init.d If any run control script is not owned by root, 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* /etc/init.d If any run control script is not group-owned by root, sys, or bin, this is a finding.
Change the group ownership of the run control script(s) with incorrect group ownership. Procedure: # chgrp root <run control script>
Determine the programs executed by system start-up files. Determine the ownership of the executed programs. # cat /etc/rc* /etc/init.d/* | more Check the ownership of every program executed by the system start-up files. # ls -l <executed program> If any executed program is not owned by root, sys, bin, or in rare cases, an application account, this is a finding.
Change the ownership of the file executed from system startup scripts to root, bin, or sys. # chown root <executed file>
Check /etc/security/audit_user permissions. # ls -lL /etc/security/audit_user If /etc/security/audit_user is more permissive than 0640, this is a finding.
Change the mode of the audit_user file to 0640. # chmod 0640 /etc/security/audit_user
On systems with a BIOS or system controller, verify a supervisor or administrator password is set. If a password is not set, this is a finding. If the BIOS or system controller supports user-level access in addition to supervisor/administrator access, determine if this access is enabled. If so, this is a finding. The exact procedure will be hardware-dependent, and the SA should be consulted to identify the specific configuration. In the event the BIOS or system controller is not accessible without adversely impacting (e.g., restarting) the system, the SA may be interviewed to determine compliance with the requirement.
Access the system's BIOS or system controller. Set a supervisor/administrator password if one has not been set. Disable a user-level password if one has been set.
Ask the SA if the system uses removable media for the boot loader. If it does, this is a finding.
Configure the system to use a bootloader installed on fixed media.
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 include 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, associated with a service not in use should also be removed.
Check /etc/news/hosts.nntp permissions. # ls -lL /etc/news/hosts.nntp If /etc/news/hosts.nntp has a mode more permissive than 0600, this is a finding.
Change the mode of the /etc/news/hosts.nntp file to 0600. # chmod 0600 /etc/news/hosts.nntp
Check /etc/news/hosts.nntp.nolimit permissions. # ls -lL /etc/news/hosts.nntp.nolimit If /etc/news/hosts.nntp.nolimit has a mode more permissive than 0600, this is a finding.
Change the mode of /etc/news/hosts.nntp.nolimit to 0600. # chmod 0600 /etc/news/hosts.nntp.nolimit
Check /etc/news/nnrp.access permissions. # ls -lL /etc/news/nnrp.access If /etc/news/nnrp.access has a mode more permissive than 0600, this is a finding.
Change the mode of the /etc/news/nnrp.access file to 0600. # chmod 0600 /etc/news/nnrp.access
Check /etc/news/passwd.nntp permissions. # ls -lL /etc/news/passwd.nntp If /etc/news/passwd.nntp has a mode more permissive than 0600, this is a finding.
Change the mode of the /etc/news/passwd.nntp file. # chmod 0600 /etc/news/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 root or news, this is a finding.
Change the group owner of the files in /etc/news to root or news. Procedure: # chgrp root /etc/news/*
Check the SSH daemon configuration for allowed protocol versions. # grep -i protocol /etc/ssh/sshd_config | grep -v '^#' If the variables 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 to look like: Protocol 2 Reload sshd: kill -HUP <PID of sshd>
Verify no auxiliary consoles are defined. # consadm -p If any output is generated, this is a finding.
Remove each auxiliary console. # consadm -d <console device>
To enable NFS server logging the log option must be applied to all exported file systems in the /etc/dfs/dfstab. Perform the following to verify NFS is enabled. # share The preceding command will display all exported filesystems. Each line should contain a log entry to indicate logging is enabled. If the log entry is not present, this is a finding. If the share command does not return anything, then this is not an NFS server and this is considered not applicable.
Edit /etc/dfs/dfstab and add the log option to all exported filesystems. Run the shareall command for the changes to take effect.
Check if NTP running. # ps -ef | egrep "xntpd|ntpd" or # ntpq -p Check if xntpd is started at boot time and scheduled to run. #more /etc/init.d/xntpd #more /etc/rc2.d/S74xntpd If NTP is running confirm the servers and peers or multicast client (as applicable) are local or an authoritative U.S. DoD source. # more /etc/inet/ntp.conf If a non-local/non-authoritative (U.S. DoD source) time-server is used, this is a finding.
Use a local authoritative time server synchronizing to an authorized DoD time source. Ensure all systems in the facility feed from one or more local time servers that feed from the authoritative time server.
Logging should be enabled for those types of files systems that do not turn on logging by default. Procedure: # mount JFS, 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 systems types, if the root file system does not have the logging option, this is a finding. If the nolog 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.
Perform the following to determine if ASET is being used. # crontab -l |grep aset A returned entry would indicate ASET is being utilized. Determine if ASET is configured to check firewall settings. # grep TASKS /usr/aset/asetenv | grep firewall If an entry is not returned, this is a finding.
If the system is used as a firewall and ASET is used, ensure the firewall parameter is configured in /usr/aset/asetenv.
# more /usr/aset/masters/uid_aliases If the /usr/aset/masters/uid_aliases file is not empty or all contents are not commented out, this is a finding.
Empty or comment out the entries in the uid_aliases file.
Verify ASET is being used. # crontab -l |grep aset If there is an output, then check to make sure the files in question are in the /usr/aset/masters directory. # ls -l /usr/aset/masters The following files should be in the listing: tune.high, tune.low, tune.med, and uid_aliases. If any of the files are not in the directory listing, this is a finding.
Install the default ASET configuration files.
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 /etc/security/audit_user group ownership. # ls -lL /etc/security/audit_user If /etc/security/audit_user is not group owned by root, sys, or bin, this is a finding.
Change the group owner of the audit_user file to root, bin, or sys. Example: # chgrp root /etc/security/audit_user
Check /etc/security/audit_user ownership. # ls -lL /etc/security/audit_user If /etc/security/audit_user is not owned by root, this is a finding.
Change the owner of the /etc/security/audit_user file to root. # chown root /etc/security/audit_user
Perform: # more /etc/security/audit_user If /etc/security/audit_user has entries other than root, ensure the users defined are audited with the same flags as all users as defined in /etc/security/audit_control file.
Edit the audit_user file and remove specific user configurations differing from the global audit settings.
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 /etc/cron.d/cron.deny If the cron.deny file is more permissive than 0600, this is a finding.
Change the mode of the cron.deny file. # chmod 0600 /etc/cron.d/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 /etc/cron.d/cron.allow If the cron.allow file is not owned by root, sys, or bin, this is a finding.
# chown root /etc/cron.d/cron.allow
Check the mode of the "at" directory. Procedure: # ls -ld /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, sys, or bin, this is a finding.
Change the owner of the "at" directory to root, bin, or sys. Procedure: # chown root /var/spool/cron/atjobs
Determine what "at" jobs exist on the system. Procedure: # ls /var/spool/cron/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 /etc/cron.d/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 /etc/cron.d/at.allow
# ls -lL /etc/cron.d/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 /etc/cron.d/at.deny
# ls -lL /usr/sbin/traceroute If the traceroute command is not owned by root, this is a finding.
Change the owner of the traceroute command to root. Example procedure: # chown root /usr/sbin/traceroute
Check the group ownership of the traceroute file. Procedure: # ls -lL /usr/sbin/traceroute If the traceroute command is not group-owned by root, sys, or bin, this is a finding.
Change the group-owner of the traceroute command to root. Procedure: # chgrp root /usr/sbin/traceroute
# ls -lL /usr/sbin/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/sbin/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. If telnet is unavailable for testing, check the value of the SmtpGreetingMessage parameter in the sendmail.cf file. # grep SmtpGreetingMessage /etc/mail/sendmail.cf If the value of the SmtpGreetingMessage parameter contains the $v or $Z macros, 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/mail/sendmail.cf file as noted below. 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. # rm .forward Update the sendmail.cf file to ignore .forward files by adding ForwardPath="".
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.
The default Solaris FTP daemon, in.ftpd, uses the ftp user's home directory as the chroot base for anonymous FTP. If any files and directories within the ftp user's home directory are owned by any user other than root, or if any subdirectory other than pub has permissions more permissive than 0111, this is a finding.
Run the ftpconfig(1M) command to set up a chroot-ed environment for anonymous FTP with appropriate constraints. # ftpconfig < anonymous FTP home directory>
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 root, sys, or bin, this is a finding.
Change the group owner of the /etc/syslog.conf file to root, bin, or sys. Procedure: # chgrp root /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.
Create or edit /etc/defaultrouter to contain the default gateway address. Procedure (for a default gateway of 192.168.3.1): # echo "192.168.3.1" > /etc/defaultrouter Restart the system for the setting to take effect.
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.
# for i in `cut -d: -f6 /etc/passwd | awk '$1 == "" {$1 = "/"} {print $1}'`; do ls -l $i/.rhosts $i/.shosts $i/.netrc; done # ls -l /etc/hosts.equiv # ls -l /etc/ssh/shosts.equiv If the .netrc, .rhosts, .shosts, hosts.equiv, or shosts.equiv files have permissions greater than 600, then this is a finding. (If a password entry has no home directory assigned, the root directory (/) is used as a default.)
Ensure the permission for these files is set at 600 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 in /etc and shosts.equiv in /etc/ssh; both are owned by root), have no meaning.
Check the ownership of the cron.deny file. # ls -lL /etc/cron.d/cron.deny If the cron.deny file is not owned by root, sys, or bin, this is a finding.
Change the ownership of the cron.deny file to root, sys, or bin. # chown root /etc/cron.d/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.