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
Check if the system requires a password when booted into single user mode. If it does not, this is a finding.
Configure the system to require a password upon booting into single user mode.
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.
Obtain a list of system accounts and check the list for any duplicate user names. If duplicates user names are found, this is a finding.
Change user account names, or delete accounts, so each account has a unique name.
List any duplicate UIDs in /etc/passwd: # cut -d':' -f3 /etc/passwd | uniq -d This will show one copy of each duplicate UID.
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."
Configure the system to display one of the DoD login banners (based on the character limitations imposed by the system) prior to any local login attempt. 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.
Attempt to log on with a valid user id and incorrect password three times. If the system does not lock the account, requiring an SA to unlock it, this is a finding.
Configure the system to lock accounts after three unsuccessful login attempts.
Attempt to log on to the system with an invalid user account name and an incorrect password. If the system does not pause for at least 4 seconds before displaying another logon prompt, this is a finding.
Configure the system to delay at least 4 seconds between login prompts following a failed login attempt.
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.
Check the system's accounts for blank passwords. If any are 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: # 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 /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 begins with a character other than a slash (/) or other than "$PATH", it is a relative path and 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: # 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.
Verify the system only allows root account logins from the system console.
Configure the system to only allow root logins from the system console.
# 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).
List the primary group GIDs for all user accounts on the system. If these GIDs do not correspond to any groups defined on the system, this is a finding.
Add a group to the system for each GID referenced without a corresponding 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.
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.
Check the mode of network services daemon files. If any have modes more permissive than 0755, this is a finding.
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>
Check the ownership of NIS/NIS+/yp files. Consult vendor documentation to determine the location of these files on the system. Procedure (example): # ls -lL /path/to/file If such a file is not owned by root, sys, bin, or system, this is a finding.
Change the ownership of NIS/NIS+/yp files to root, sys, bin, or system. Consult vendor documentation to determine the location of the files. Procedure (example): # chown root <filename>
Check the group ownership of the NIS/NIS+/yp files. Procedure: # ls -lL <NIS file> If any such file is not group-owned by root, sys, bin, other, or system, this is a finding.
Change the group owner of the NIS files to root, sys, bin, other, or system. Procedure: # chgrp root <filename>
Check the mode of the NIS/NIS+/yp files. Consult vendor documentation to determine the location of these files. Procedure (example): # ls -lL /path/to/file If any such file has a mode 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/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 755, 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 755 or less permissive. Procedure: # chmod 755 <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 (or equivalent) file. # chown root <file>
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/fstab and verify the "nosuid" mount option is used on file systems mounted from removable media, network shares, or any other file system that does not contain approved setuid or setgid files.
Edit /etc/fstab and add the "nosuid" mount option to all file systems mounted from removable media or network shares, and any file system that does not contain approved setuid or setgid files.
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 auditing is enabled. If auditing is not enabled, this is a finding.
Configure the system to implement auditing.
Check the ownership of the audit log file(s). # ls -l <audit log file> 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>
Check the mode of the audit log file(s). # ls -l <audit log file> 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 audit configuration to determine if failed attempts to access files and programs are audited. If they are not, this is a finding.
Configure the system to audit failed attempts to access files and programs.
Check the system audit configuration. If the system is not configured to audit file and program deletion, this is a finding.
Configure the system to audit file and program deletion.
Check the system configuration to determine if all administrative, privileged, and security actions are audited. If any of these categories of events is not audited, this is a finding.
Configure the system to audit all administrative, privileged, and security actions.
Verify the system is configured to audit login, logout, and session initiation. If the system does not audit any of these events, this is a finding.
Configure the system to audit login, logout, and session initiation.
Verify the system is configured to audit all discretionary access control permission modifications. If the system does not audit any of these events, this is a finding.
Configure the system to audit all discretionary access control permission modifications.
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 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 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.
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
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 aliases file on the system. Procedure: # find / -name aliases -depth -print Check the mode of the alias file. Procedure: # ls -lL <alias location> If the alias file has a mode more permissive than 0644, this is a finding.
Change the mode of the /etc/mail/aliases file (or equivalent, such as /usr/lib/aliases) to 0644. Procedure: # chmod 0644 /etc/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. 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 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 the system for an ftpusers file. If no ftpusers file appropriate for the system's FTP service exists, this is a finding.
Create an ftpusers file appropriate for the system's FTP service.
Check the contents of the ftpusers file. 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 ftpusers file.
Check the ownership of the ftpusers file. If the ftpusers file is not owned by root, this is a finding.
Change the owner of the ftpusers file to root.
Check the permissions of the ftpusers file. If the ftpusers file has a mode more permissive than 0640, this is a finding.
Change the mode of the ftpusers file to 0640.
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. If tftpd is running and not using secure mode, this is a finding.
Configure tftpd to run in secure mode.
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.
Check all user accounts home directory assignments. If any user account does not have a home directory, this is a finding.
Assign a home directory to any user without one.
Check all user accounts home directory assignments. If any user account does not have a home directory, 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 the mode for all run control scripts. 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 directory 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 755 startupfile
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 (/) or other than "$PATH", it 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. 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.
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. Consult vendor documentation for an appropriate list of system shells. Procedure: # echo "/bin/bash" >> /etc/shells # echo "/bin/csh" >> /etc/shells (Repeat as necessary for other shells.)
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. If an inactive 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 SAM, SMIT, or ADMINTOOL.
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.
Configure the NIS+ server to use security level 2.
Check the ownership of the NFS export configuration file. If the file is not owned by root, this is a finding.
Change the ownership of the NFS export configuration file to root. # chown root <NFS export file>
Check the ownership of the NFS export configuration file. If the file has a mode more permissive than 0644, this is a finding.
Change the mode of the NFS export configuration file to 0644. # chmod 0644 <NFS export file>
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 exports without it. Re-export the file systems.
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: # mount -v | grep " type nfs " | grep -v nosuid If the mounted file systems do not have the nosuid option, this is a finding.
Edit /etc/fstab and add the "nosuid" option for all NFS file systems. Remount the NFS file systems to make the change take effect.
Perform the following to check for a security tool executing monthly: # crontab –l Check for the existence of a vulnerability assessment tool being scheduled and run monthly. If no entries exist in the crontab, ask the SA if a vulnerability tool is run monthly. In addition, if the tool is run monthly, ask to see any reports that may have been generated from the tool. If a tool is not run monthly then this a finding.
Add a monthly cronjob to run the system vulnerability tool.
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.
Check for the existence of the cron.allow and cron.deny files. If neither file exists, this is a finding.
Create a cron.allow and/or cron.deny file(s) with appropriate content in the appropriate directory for the system.
Check the mode of the cron.allow file. If the file has a mode more permissive than 0600, this is a finding.
Change the mode of the cron.allow file to 0600.
List all cron jobs on the system. If any cron job executes a program with group-writable or world-writable permissions, 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 cron jobs on the system. If any cron job executes a program located in a world-writable directory, 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 crontab directories. If any have a mode more permissive than 0755, this is a finding.
Change the mode of crontab directories to 0755.
Check the owner of the cron and crontab directories. If any cron or crontab directory is not owned by root or bin, this is a finding.
Change the owner of the cron and crontab directories to root or bin.
Check the group owner of cron and crontab directories. If a cron or crontab directory is not group-owned by root, sys, bin, or cron, this is a finding.
Change the group owner of the cron and crontab directories to root, sys, bin, or cron.
Check the mode of the system cron log. If the mode is more permissive than 0600, this is a finding.
Change the mode of the system cron log to 0600.
Check for the existence of at.allow and at.deny files. 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.
Check the at.deny file. 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.
Check the contents of the at.allow file. 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. If the at.allow file has a mode more permissive than 0600, this is a finding.
Change the mode of the at.allow file to 0600.
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 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.
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.
Perform the following to check for ext3 filesystems: # more /etc/fstab If a local filesystem on a Linux platform is not using ext3, this is a finding. Note: the CD, floppy drives, proc, and, swap entries do not support ext3.
Use the ext3 filesystem type for Linux partitions.
X servers get started several ways, such as xdm, gdm or xinit. Perform: # ps –ef |grep X Output for example: /usr/X11R6/bin/X –nolisten –ctp –br vt7 –auth /var/lib/xdm/authdir/authfiles/A:0 Check the Xservers file to ensure the following options are enabled: -audit, -auth, and –s 15. Xserver files can found in: /etc/X11/xdm/Xservers /etc/opt/kde3/share/config/kdm/Xservers /etc/X11/gdm/Xservers
Enable the following options: -audit (at level 4), -auth and -s with 15 minutes as the timeout value.
X servers get started several ways, such as xdm, gdm or xinit. Perform: # ps –ef |grep X Output for example: /usr/X11R6/bin/X –nolisten –ctp –br vt7 –auth /var/lib/xdm/authdir/authfiles/A:0 The above example show xdm is controlling the Xserver. Check the Xservers file to ensure the following options are not enabled: -ac, -core, and -nolock . Xserver files can found in: /etc/X11/xdm/Xservers /etc/opt/kde3/share/config/kdm/Xservers /etc/X11/gdm/Xservers
Disable the following options: -ac, -core and -nolock.
# ps -ef | egrep "innd|nntpd" If an INN server is running, this is a finding.
Disable the INN server.
Check access configuration ownership: # ls –lL /etc/login.access /etc/security/access.conf /etc/access.conf If any of these files exist and are not owned by root, this is a finding.
Follow the correct configuration parameters for access configuration file. Use the chown command to configure it properly. For example: # chown root /etc/login.access /etc/security/access.conf /etc/access.conf
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 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.
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: # find / -name sshd_config -print # grep -v "^#" <sshd_config path> | 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. 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. If the owner of an audio device is not root, this is a finding.
Change the owner of the audio device. # chown root <audio device>
Check access configuration group ownership: # ls -lL /etc/login.access /etc/security/access.conf /etc/access.conf If any of these files exist and are have a group-owner that is not a privileged user, this is a finding.
Use the chgrp command to ensure the group owner is root, sys, or bin. For example: # chgrp root /etc/login.access /etc/security/access.conf /etc/access.conf
Check access configuration mode: # ls -lL /etc/login.access /etc/security/access.conf /etc/access.conf If any of these files exist and have a mode more permissive than 0640, this is a finding.
Use the chmod command to set the permissions to 0640. For example: # chmod 0640 /etc/login.access /etc/security/access.conf /etc/access.conf
Check the group ownership of the smb.conf file. Procedure: # find / -name /etc/samba/smb.conf # ls -l <smb.conf file> 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 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 <audio device file> 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>
Determine if /usr has a dedicated file system. Procedure: # grep /usr /etc/fstab If /usr is on a dedicated file system, check the location of root's default shell. Procedure: # grep "^root:" /etc/passwd | grep ":/usr" If the root shell is found to be on a /usr dedicated file system, this is a finding.
Change the root account's shell to one present on the / file system. Procedure: Edit /etc/passwd and change the shell for the root account to one present on the / file system (such as /bin/sh, assuming /bin is not on a separate file system). If the system does not store shell configuration in the /etc/passwd file, consult vendor documentation for the correct procedure for the system.
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.
Verify the system is configured to prohibit the reuse of passwords within five iterations.
Configure the system to prohibit the reuse of passwords within five iterations.
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.
# grep "mesg" /<usershomedirectory>/.* If local initialization files contain the mesg -y or mesg y command, this is a finding.
Edit the local initialization file(s) and remove the mesg -y command.
Check the ownership of system run control scripts. If any are owned by a user other than 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 the group ownership of system run control scripts. If any are group-owned by a user other than root, sys, bin, other, or the system default, this is a finding.
Change the group ownership of the run control script(s) with incorrect group ownership. Procedure: # chgrp root <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>
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.
This check applies to the global zone only. Determine the type of zone that you are currently securing. # zonename If the command output is "global", this check applies. On systems that have a ZFS root, the active menu.lst file is typically located at /pool-name/boot/grub/menu.lst where "pool-name" is the mount point for the top-level dataset. On systems that have a UFS root, the active menu.lst file is typically located at /boot/grub/menu.lst. To locate the active GRUB menu, use the bootadm command with the list-menu option: # bootadm list-menu Determine if the system uses the GRUB boot loader. Procedure: # more /pool-name/boot/grub/menu.lst or # more /boot/grub/menu.lst If menu.lst does not exist, this is a finding.
Configure the system to use the GRUB bootloader.
This check applies to the global zone only. Determine the type of zone that you are currently securing. # zonename If the command output is "global", this check applies. On systems that have a ZFS root, the active menu.lst file is typically located at /pool-name/boot/grub/menu.lst where "pool-name" is the mount point for the top-level dataset. On systems that have a UFS root, the active menu.lst file is typically located at /boot/grub/menu.lst. To locate the active GRUB menu, use the bootadm command with the list-menu option: # bootadm list-menu Check the menu.lst file for the use of passwords. Procedure: # more /pool-name/boot/grub/menu.lst or # more /boot/grub/menu.lst Check for a password configuration line, such as the one below. password --md5 <password-hash> This line should be just below the line beginning with "timeout". Please note <password-hash> will be replaced by the actual MD5 encrypted password. If the password line is not in either of the files, this is a finding.
The GRUB console boot loader can be configured to use an MD5 encrypted password by adding password --md5 password-hash to the /pool-name/boot/grub/menu.lst or /boot/grub/menu.lst file. Use grub-md5-crypt to generate MD5 passwords from the command line.
This check applies to the global zone only. Determine the type of zone that you are currently securing. # zonename If the command output is "global", this check applies. Check the permission of the menu.lst file. On systems that have a ZFS root, the menu.lst file is typically located at /pool-name/boot/grub/menu.lst where "pool-name" is the mount point for the top-level dataset. On systems that have a UFS root, the menu.lst file is typically located at /boot/grub/menu.lst . Procedure: # ls -lL /pool-name/boot/grub/menu.lst or # ls -lL /boot/grub/menu.lst If menu.lst has a mode more permissive than 0600, this is a finding.
Change the mode of the menu.lst file to 0600. # chmod 0600 /pool-name/boot/grub/menu.lst or # chmod 0600 /boot/grub/menu.lst
Check for the password to precede the first image stanza in /etc/lilo.conf: # more /etc/lilo.conf password=”” image=/boot/vmlinuz-2.4.20-6smp If a password is not found, then this is a finding.
Password protect LILO by including the password=password line to the global section of /etc/lilo.conf.
Check /etc/lilo.conf permissions: # ls –lL /etc/lilo.conf If /etc/lilo.conf has a mode more permissive than 0600, then this is a finding.
Change the mode of the lilo.conf file. # chmod 0600 /etc/lilo.conf
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.
To check for the rpc.ugidd daemon perform: # chkconfig –list rpc.ugidd Or # ps –ef | grep –i ugidd If the daemon is running or installed this is a finding.
If the rpc.ugidd daemon is installed, disable it using the chkconfig utility.
Perform the following to check for unnecessary privileged accounts: # more /etc/passwd Some examples of unnecessary privileged accounts include halt, shutdown, reboot and who.
Remove any special privilege accounts, such as shutdown and halt, from the /etc/passwd and /etc/shadow files.
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/*
Examine the sshd configuration file. cat /opt/ssh/etc/sshd_config | tr '\011' ' ' | tr -s ' ' | sed -e 's/^[ \t]*//' | grep -v '^#' | grep -i "Protocol" 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 the system for configured remote consoles. If any console port is connected to a terminal outside of a secured environment or to any aggregation device (KVM, serial concentrator), or virtualization system that does not protect the console at the level of a privileged resource in accordance with the appropriate STIGs for these devices, this is a finding.
Remove the configuration for remote consoles.
Check if NTP running: # ps -ef | egrep "xntpd|ntpd" Check if ntpdate scheduled to run: # grep ntpdate /var/spool/cron/crontabs/* If NTP is running or ntpdate is found: # more /etc/ntp/ntp.conf Confirm the servers and peers or multicast client (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 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.
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/sysctl.conf permissions: # ls -lL /etc/sysctl.conf If /etc/sysctl.conf is not owned by root, this is a finding.
Use the chown command to change the owner of /etc/sysctl.conf to root: # chown root /etc/sysctl.conf
Check /etc/sysctl.conf group ownership: # ls -lL /etc/sysctl.conf If /etc/sysctl.conf is not group-owned by root, this is a finding.
Use the chgrp command to change the group owner of /etc/sysctl.conf to root: # chgrp root /etc/sysctl.conf
Check /etc/sysctl.conf permissions: # ls –lL /etc/sysctl.conf If /etc/sysctl.conf has a mode more permissive than 0600, this is a finding.
Use the chmod command to change the mode of the /etc/sysctl.conf file. # chmod 0600 /etc/sysctl.conf
Determine if an NFS server is running on the system by: # ps –ef |grep nfsd If an NFS server is running, confirm that it is not configured with the insecure_locks option by: # exportfs –v The example below would be a finding: /misc/export speedy.example.com(rw,insecure_locks)
Remove the "insecure_locks" option from all NFS exports on the system. Procedure: Edit /etc/exports and remove all instances of the insecure_locks option. Re-export the file systems to make the setting take effect. # exportfs -a
Verify that Linux systems have disabled the <CTRL><ALT><DELETE> key sequence by performing: # grep ctrlaltdel /etc/inittab If the line returned is not commented out then this is a finding.
Ensure that the CTRL-ALT-DELETE key sequence has been disabled. If necessary, comment out the following line in the /etc/inittab file: #ca::ctrlaltdel:/sbin/shutdown -t3 -r now
Ensure the pam_console.so module is not configured in any files in /etc/pam.d by: # cd /etc/pam.d # grep pam_console.so * Or # ls -la /etc/security/console.perms If either the pam_console.so entry or the file /etc/security/console.perms is found then this is a finding.
Configure PAM to not grant sole access of administrative privileges to the first user logged in at the console. Identify any instances of pam_console. # cd /etc/pam.d # grep pam_console.so * For any files containing an un-commented reference to pam_console.so, edit the file and remove or comment out the reference. Remove the console.perms file if it exists: # rm /etc/security/console.perms
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. If the cron.deny file is more permissive than 0600, this is a finding.
Change the mode of the cron.deny file to 0600.
Check programs run from cron for umask settings. If any specify a umask more permissive than 077, this is a finding.
Edit cron script files and modify the umask to 077.
Check the mode of the "at" directory. Procedure: # ls -ld /var/spool/cron/atjobs /var/spool/atjobs /var/spool/at 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 /var/spool/atjobs /var/spool/at If the directory is not owned by root, sys, bin, daemon, or cron, this is a finding.
Change the owner of the "at" directory to root, bin, sys, or system. Procedure: # chown root /var/spool/at (Replace root with another system group and/or /var/spool/at with a different "at" directory as necessary.)
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.
Check the owner of the at.allow file. If the owner is not root, bin, or sys, this is a finding.
Change the owner of the at.allow file to root, bin, or sys.
Check the ownership of the at.deny file. If the owner is not root, bin, or sys, this is a finding.
Change the owner of the at.deny file to root, bin, or sys.
Determine traceroute command locations and ownership. Procedure: # find / -name traceroute -exec ls -lL {} \; If the traceroute command is not owned by root, this is a finding.
Change the owner of the traceroute command to root, bin, or sys. Example: # chown root <traceroute command>
Determine traceroute command locations and group ownership. Procedure: # find / -name traceroute -exec ls -lL {} \; If the traceroute command is not group-owned by root, sys, bin, or system, this is a finding.
Change the group owner of the traceroute command to root, bin, sys, or system. Procedure: # chgrp root <traceroute command>
Determine traceroute command locations and mode. # find / -name traceroute -exec ls -lL {} \; If the traceroute command has a mode more permissive than 0700, this is a finding.
Change the mode of the traceroute command. # chmod 0700 <traceroute command>
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/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.
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.
Consult vendor documentation for the anonymous FTP service to determine the necessary configuration for operating the service in a chroot environment. If the system is not configured to operate the anonymous FTP service in a chroot environment, this is a finding.
Configure the anonymous FTP service to operate in a chroot environment. Consult vendor documentation for the necessary configuration procedures.
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, bin, or system, this is a finding.
Change the group owner of the /etc/syslog.conf file to root, bin, sys, or system. 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.
Set a default gateway for IPv4.
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.
Verify the rshd service is not running.
Disable the rshd service.
Determine if the rexecd service is running. If the service is running, this is a finding.
Disable the rexecd service.
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 Version 8.14.4 is the latest required version. If the Sendmail version is not at least 8.14.4 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.