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
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.
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.
This can be checked in the /etc/default/sulogin file (on Solaris 5.X systems) to check if the system runs sulogin, or an equivalent, when booting into single-user mode.
Edit /etc/default/sulogin and set PASSREQ=YES or remove /etc/default/sulogin entirely. 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.
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. Verify the account locks after invalid login attempts. # grep LOCK_AFTER_RETRIES /etc/security/policy.conf If LOCK_AFTER_RETRIES is not set to YES, this is a finding.
Set RETRIES to 3 in the /etc/default/login file. #vi /etc/default/login Set LOCK_AFTER_RETRIES to YES in the /etc/security/policy.conf file. #vi /etc/security/policy.conf
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.
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.
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 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.
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 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 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.
Check global initialization files permissions. # ls -l /etc/.login # ls -l /etc/profile # ls -l /etc/bashrc # ls -l /etc/environment # ls -l /etc/security/environ # ls -l /etc/csh.login # ls -l /etc/csh.cshrc If global initialization files exist and are more permissive than 0644, this is a finding.
Change the mode of the global initialization file(s) to 0644. # chmod 0644 <global initialization file>
Check the ownership of global initialization files. Procedure: # ls -lL /etc/.login /etc/profile /etc/bashrc /etc/environment /etc/security/environ /etc/csh.login /etc/csh.cshrc If any global initialization file exists and is not owned by root, this is a finding.
Change the ownership of global initialization files with incorrect ownership. Procedure: # chown bin <global initialization files>
Check the group ownership of global initialization files. Procedure: # ls -lL /etc/.login /etc/profile /etc/bashrc /etc/environment /etc/security/environ /etc/csh.login /etc/csh.cshrc If any global initialization file exists and is not group-owned by root, sys, or bin, this is a finding.
Change the group ownership of the global initialization file(s) with incorrect group ownership. Procedure: # chgrp root <global initialization file>
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.
Check user home directories for local initialization files group-owned by a group other than the user's primary group or root. 1. List user accounts and their primary GID. # cut -d : -f 1,4 /etc/passwd 2. Check local initialization files for each user. # 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 # ls -al /<usershomedirectory>/.dispatch # ls -al /<usershomedirectory>/.emacs # ls -al /<usershomedirectory>/.exrc # find /<usershomedirectory>/.dt ! -fstype nfs ! -group <primary_group> -exec ls -ld {} \; 3. If any file is not group-owned by root or the user's primary GID, this is a finding.
Change the group-owner of the local initialization file to the user's primary group, or root. # chgrp [USER's primary GID] ~USER/[local initialization file]
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. # cat /etc/vfstab Check zfs filesystems for setuid mounts. #zfs get setuid
Use the following procedure for UFS filesystems. 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. Use the following procedure for ZFS filesystems. # zfs setuid = off < file system >
Ask the system administrator if network bridging software is installed on the system or the system is configured for network bridging. If network bridging software is installed or the system is configured for network bridging, this is a finding.
Remove the network bridging software and configuration from the system.
Check the status of the rpcbind service. # svcs network/rpc/bind If the service is online and is not documented as required, this is a finding.
Disable the portmap service. # svcadm disable network/rpc/bind
# svcs network/shell If the service is enabled, this is a finding.
Disable the remote shell service and restart inetd. Procedure: # svcadm disable network/shell # svcadm refresh inetd
Determine if the rlogind service is running. # svcs rlogin If the rlogin service is enabled, this is a finding.
Disable the rlogind service. # svcadm disable rlogin # svcadm refresh inetd
Determine if any network analysis tools are installed. Procedure: # find / -name ethereal # find / -name wireshark # find / -name tshark # find / -name netcat # find / -name tcpdump # find / -name snoop If any network analysis tools are found, this is a finding.
Remove the network analysis tool binary from the system. The snoop binary is part of the SUNWrcmdc package, which may also be removed if none of its components are required. Procedure: # rm <binary> # pkgrm SUNWrcmdc
Check the group ownership of the print service configuration files. Procedure: # ls -lL /etc/printers.conf /etc/apache/httpd-standalone-ipp.conf /etc/smb.conf /etc/sfw/smb.conf /etc/samba/smb.conf /etc/sfw/samba/smb.conf If the files are not group-owned by root, bin, or sys, this is a finding.
Change the group owner of the print service configuration files. Procedure: # chgrp bin /etc/apache/httpd-standalone-ipp.conf # chgrp root /etc/printers.conf /etc/smb.conf /etc/sfw/smb.conf /etc/samba/smb.conf /etc/sfw/samba/smb.conf
Note: If sendmail is not installed, this requirement is not applicable. 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 group ownership 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 files are not group-owned by root, sys, smmsp, or bin, this is a finding.
Change the group owner of the /etc/mail/aliases files. Procedure: # chgrp bin /etc/mail/aliases # chgrp smmsp /etc/mail/aliases.db
Check if Help is disabled in Sendmail. Procedure: # telnet <host> 25 > help If the help command returns any Sendmail version information, this is a finding. If telnet is unavailable for testing, check the value of the HelpFile parameter in the sendmail.cf file. # grep HelpFile /etc/mail/sendmail.cf If the contents of the file indicated by the HelpFile parameter contains any Sendmail version information, this is a finding.
To disable the SMTP HELP command, clear the Sendmail help file. # echo > /etc/mail/helpfile
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="".
Determine the version of the SMTP service software, using a non-privileged account. $ /usr/lib/sendmail -d0 -bt < /dev/null (Note: While this command will report the sendmail version almost immediately, it will take several moments to return to the shell prompt. Press ctrl-C to terminate the sendmail process.) Version 8.14.4 is the latest required version. Version 8.14.4+Sun is available from Oracle for Solaris. If the sendmail version is not at least 8.14.4 or Oracle's latest version, this is a finding.
Obtain and install the latest version of Sendmail from Oracle through normal software update processes, as implemented locally.
Check for an enabled debug command provided by the SMTP service. Procedure: # telnet localhost 25 debug If the command does not return a 500 error code of command unrecognized, this is a finding. If telnet is unavailable for testing, check the version of sendmail. Run the following as a non-privileged user. $ echo \$Z | /usr/sbin/sendmail -bt -d0 If the version reported is less than 8.6, this is a finding.
Obtain and install a more recent version of Sendmail, which does not implement the DEBUG feature.
Check the SMTP service for an active decode command. Procedure: # telnet localhost 25 decode If the command does not return a 500 error code of command unrecognized, this is a finding. If telnet is unavailable for testing, check for the existence of the decode and uudecode aliases in the sendmail aliases file. Find the active sendmail aliases file. # grep AliasFile /etc/mail/sendmail.cf (The aliases file is usually at /etc/mail/aliases) Look for decode aliases in the aliases file. # grep decode /etc/mail/aliases If there is an uncommented decode or uudecode alias in the aliases file, this is a finding.
Comment out active decode and uudecode aliases in the aliases file. # vi /usr/mail/aliases Activate updated aliases file. # newaliases
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.
Ask the SA if the log host server is collecting data for hosts outside the local enclave. If it is, this is a finding.
Configure the hosts outside of the local enclave to not log to this system.
# svcprop system-log | grep log_from_remote If the config/log_from_remote value is not false, this is a finding.
# svccfg -s system-log setprop config/log_from_remote=false # svcadm refresh system-log
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>
Determine if the system is configured for IPv4 forwarding. # svcs | grep svc:/network/ipv4-forwarding If the service is enabled, this is a finding.
Disable IPv4 forwarding on the system. # svcadm disable svc:/network/ipv4-forwarding
Check if the system is configured for IPv6 forwarding. # ndd /dev/ip6 ip6_forwarding If the value is not 0, this is a finding.
Disable IPv6 forwarding. # ndd -set /dev/ip6 ip6_forwarding 0 Edit startup scripts as necessary; add this command or remove commands setting the value to 1.
Check the permissions on exported NFS file systems. Procedure: # exportfs -v OR # more /etc/dfs/sharetab 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.
If an IM client is installed, ask the SA if it has access to any public domain IM servers. If it does have access to public servers, this is a finding.
Uninstall the IM client from the system, or configure the client to only connect to DoD-approved IM services.
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
For each security tool on the system, determine if the tool is configured to notify the IAO and SA of any detected security problem. If such notifications are not configured, this is a finding.
Configure the security tools on the system to notify the IAO and SA when any security issues are detected.
Check the root crontab (crontab -l) for the presence of a package check command, such as, pkgchk -n. If no such cron job is found, this is a finding.
Add a cron job to run a package verification command, such as, pkgchk -n.
# svcprop -p defaults svc:/network/inetd | grep tcp_wrappers This should return a line with the following: defaults/tcp_wrappers boolean true If the above line contains the word false, this is a finding.
Enable tcp_wrappers. # svccfg -s svc:/network/inetd setprop defaults/tcp_wrappers=true # svcadm refresh inetd
Check for the existence of the /etc/hosts.allow and /etc/hosts.deny files. Procedure: # ls -la /etc/hosts.allow # ls -la /etc/hosts.deny If either file does not exist, this is a finding. Check for the presence of a default deny entry. Procedure: # grep "ALL: ALL" /etc/hosts.deny If the "ALL: ALL" entry is not present in the /etc/hosts.deny file, any TCP service from a host or network not matching other rules will be allowed access. If the entry is not in /etc/hosts.deny, this is a finding.
Edit the /etc/hosts.allow and /etc/hosts.deny files to configure access restrictions.
This is N/A for systems that do not have wireless network adapters. Verify that there are no wireless interfaces configured on the system: # ifconfig -a eth0 Link encap:Ethernet HWaddr b8:ac:6f:65:31:e5 inet addr:192.168.2.100 Bcast:192.168.2.255 Mask:255.255.255.0 inet6 addr: fe80::baac:6fff:fe65:31e5/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2697529 errors:0 dropped:0 overruns:0 frame:0 TX packets:2630541 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2159382827 (2.0 GiB) TX bytes:1389552776 (1.2 GiB) Interrupt:17 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:2849 errors:0 dropped:0 overruns:0 frame:0 TX packets:2849 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2778290 (2.6 MiB) TX bytes:2778290 (2.6 MiB) If a wireless interface is configured, it must be documented and approved by the local Authorizing Official. If a wireless interface is configured and has not been documented and approved, this is a finding.
Configure the system to disable all wireless network interfaces.
Check if the system is using NSS LDAP. # grep -v '^#' /etc/nsswitch.conf | grep ldap If no lines are returned, this vulnerability is not applicable. Verify the permissions of the certificate database files. # ls -lL /var/ldap/cert8.db /var/ldap/key3.db /var/ldap/secmod.db If the permissions of any of the files contain a "+", and extended ACL is present, this is a finding.
Remove the extended ACL from the certificate database files. # chmod A- /var/ldap/cert8.db /var/ldap/key3.db /var/ldap/secmod.db
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. 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 boot configuration for password settings. List any password configuration from the active menu file (substitute the file determined above in place of the example file provided below, if necessary). # grep password /pool-name/boot/grub/menu.lst or # grep password /boot/grub/menu.lst Check for a password configuration line, such as: password --md5 <password-hash> If the boot loader passwords are not protected using an MD5 hash or stronger, this is a finding.
Configure the GRUB bootloader to require a password. Procedure: Obtain the location of the active GRUB menu file. # bootadm list-menu Create a password hash using GRUB. The location of the GRUB binary may be different based on the specific system. # /boot/grub/bin/grub grub> md5crypt Password: <password> Encrypted: <password hash> grub> quit The encrypted password hash will be returned. Edit the GRUB menu configuration file, and add a line such as the following, substituting the password hash obtained above: password --md5 <password hash>
This check applies to the global zone only. Determine the type 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 permissions of the menu.lst file. Procedure: # ls -lL /pool-name/boot/grub/menu.lst or # ls -lL /boot/grub/menu.lst If the permissions of the menu.lst file contain "+", an extended ACL is present, and this is a finding.
If the file with the extended ACL resides on a UFS filesystem: # getfacl /boot/grub/menu.lst Remove each ACE from the file. # setfacl -r [ACE] /boot/grub/menu.lst If the file with the extended ACL resides on a ZFS filesystem: # chmod A- /pool-name/boot/grub/menu.lst
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 ownership of the menu.lst file. Procedure: # ls -lL /pool-name/boot/grub/menu.lst or # ls -lL /boot/grub/menu.lst If the owner of the file is not root, this is a finding.
Change the ownership of the file. # chown root /pool-name/boot/grub/menu.lst or # chown root /boot/grub/menu.lst
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 group ownership of the menu.lst file. Procedure: # ls -lL /pool-name/boot/grub/menu.lst or # ls -lL /boot/grub/menu.lst If the group owner of the file is not root, bin, sys, or system this is a finding.
Change the group ownership of the file. # chgrp root /pool-name/boot/grub/menu.lst or # chgrp root /boot/grub/menu.lst
# grep mount /etc/rmmount.conf Confirm the nosuid option is configured. mount * hsfs udfs ufs -o nosuid If the nosuid option is not configured in the /etc/rmmount.conf file, this is a finding.
Edit /etc/rmmount.conf and add the nosuid mount option to the configuration.
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 /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
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 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
Check the permissions of the file. # ls -lL /etc/security/audit_user If the permissions of the file contain a "+", an extended ACL is present, this is a finding.
Remove the extended ACL from the file. # chmod A- /etc/security/audit_user
# 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.
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.
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.
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
Check the group ownership of the file. # ls -lLd /usr/aset/userlist If the group owner of the file is not root, this is a finding.
Change the group ownership of the file. # chgrp 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
Check the permissions of the file. # ls -lLd /usr/aset/userlist If the permissions of the file or directory contains a "+", an extended ACL is present, this is a finding.
Remove the extended ACL from the file. # chmod A- /usr/aset/userlist
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. NFS version 4 does not support server logging. Verify NFS_SERVER_VERSMAX in /etc/default/nfs. # grep NFS_SERVER_VERSMAX /etc/default/nfs If NFS_SERVER_VERSMAX is commented out or set to any value but 2 or 3, this is a finding.
Edit /etc/dfs/dfstab and add the log option to all exported filesystems. Run the shareall command for the changes to take effect. NFS version 2 or 3 must be forced by updating the NFS_SERVER_VERSMAX variable appropriately in /etc/default/nfs and restarting the NFS daemon.
Search for all files with hidden extended attributes. # find / -xattr -print -exec runat {} ls -al \; If hidden extended file attributes exist, this is a finding.
Remove the hidden extended file attributes. # runat <file name> rm <attribute name>
Check passwd and group files for non-root user ids and group ids with a GID of 0. # more /etc/passwd # more /etc/group OR # awk -F: '$4 == 0' /etc/passwd # awk -F: '$3 == 0' /etc/group Confirm the only account with a group id of 0 is root. If the root account is not the only account with GID of 0, this is a finding.
Change the default GID of non-root accounts to a valid GID other than 0.
Check the ownership of the files and directories. # ls -lLdR /etc/zones If the owner of the file is not root, this is a finding. If zones are not installed on the system, this is not a finding.
Change the ownership of the files and directories. # chown -R root /etc/zones
Check the group ownership of the files and directories. # ls -lLRa /etc/zones If the group owner of the directory and all files is not root, sys, or bin, this is a finding. If zones are not installed on the system, this is not a finding.
Change the group ownership of the files and directories. # chgrp -R sys /etc/zones # chgrp root /etc/zones/*.xml # chgrp bin /etc/zones/SUN*.xml
Check the permissions of the files and directories. # ls -lLdR /etc/zones If the mode of a directory is more permissive than 0755, or the mode of a file more permissive than 0644, this is a finding. If zones are not installed on the system, this is not a finding.
Change the mode of the file or directory. # chmod 0644 <file> For directories: # chmod 0755 <directory>
Check the permissions of the file. # ls -lLd /etc/zones # ls -lLR /etc/zones If the permissions of the file or directory contains a "+", an extended ACL is present, this is a finding. If zones are not installed on the system, this is not a finding.
Remove the extended ACL from the file. # chmod A- <file>
If the system is not a global zone, this vulnerability is not applicable. List the non-global zones on the system. # zoneadm list -vi List the configuration for each zone. # zonecfg -z <zone> info Check the inherit-pkg-dir lines. If no such lines exist, this is not a finding. If the lines contain only those defined for sparse root zones (/lib, /platform, /sbin, /usr), this is not a finding. Otherwise, this is a finding.
Remove the inherit-pkg-dir lines or the directories not defined for sparse root zones. # zonecfg -z <zone> remove inherit-pkg-dir=<somedir>
If the system is not a global zone, this vulnerability is not applicable. List the non-global zones on the system. # zoneadm list -vi List the configuration for each zone. # zonecfg -z <zone> info Check the limitpriv lines. If a line set other than default, this is a finding. If limitpriv is not set, this is not a finding.
Change the limitpriv setting to default. # zonecfg -z <zone> set limitpriv=default
If the system is not a global zone, this vulnerability is not applicable. List the non-global zones on the system. # zoneadm list -vi List the configuration for each zone. # zonecfg -z <zone> info Check for device lines. If such a line exists, this is a finding.
Remove all device assignments from the non-global zone. # zonecfg -z <zone> remove device <device>
Note: This STIG has been moved to sunset and will no longer be maintained. # uname -a Oracle has committed to indefinite "sustaining support" for recent Solaris operating system releases. Verify proof of purchase of support from Oracle. If the release is not supported, this is a finding.
Upgrade to a supported version of the operating system.
Use the smpatch(1m) utility to check for available security updates from Oracle. # smpatch analyze If there are security updates available, this is a finding.
Apply available security updates from Oracle. # smpatch update
Determine if a file integrity baseline, which includes cryptographic hashes, has been created and maintained for the system. If no file integrity baseline exists for the system, this is a finding. If the file integrity baseline contains no cryptographic hashes, this is a finding. If the file integrity baseline is not maintained (has not been updated to be consistent with the latest approved system configuration changes), this is a finding.
Create a file integrity baseline, including cryptographic hashes, for the system.
Determine if there is a cron job, scheduled to run weekly or more frequently, to run the file integrity tool to check for unauthorized system libraries or binaries, or unauthorized modification to authorized system libraries or binaries. Procedure: # crontab -l If there is no cron job meeting these requirements, this is a finding. NOTE: The frequency may be increased to daily, if necessary, in accordance with the contingency plan.
Create a cron job, scheduled to run weekly or more frequently, to run the file integrity tool to check for unauthorized system libraries or binaries, or unauthorized modification to authorized system libraries or binaries. NOTE: The frequency may be increased to daily, if necessary, in accordance with the contingency plan.
NTP must be used and used only in the global zone. Determine the zone currently being secured. # zonename If the command output is not "global", NTP must be disabled. Check the system for a running NTP daemon. # svcs \*ntp\* | grep online If NTP or NTP4 is online, this is a finding. If the output from "zonename" is "global", NTP must be enabled. Check the system for a running NTP daemon. # svcs \*ntp\* | grep online If NTP or NTP4 is not online, this is a finding. 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 nonlocal/nonauthoritative (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.
NTP must be used and used only in the global zone. Determine the type of zone currently being secured. # zonename If the command output is not "global", then NTP must be disabled. Check the system for a running NTP daemon. # svcs \*ntp\* | grep online If NTP or NTP4 is online, this is a finding. If the output from "zonename" is "global", then NTP must be enabled. Check the system for a running NTP daemon. # svcs \*ntp\* | grep online If NTP or NTP 4 is not online, this is a finding.
Determine the type of zone currently being secured. # zonename If the command output is not "global", then NTP and NTP4 must be disabled. # svcadm disable ntp # svcadm disable ntp4 If the output from "zonename" is "global", then NTP or NTP4 must be enabled. # svcadm enable ntp or # svcadm enable ntp4
Determine the zone that you are currently securing. # zonename If the command output is not "global", this is not applicable. Check the NTP daemon configuration for at least two external servers. # grep '^server' /etc/inet/ntp.conf | egrep -v '(127.127.1.1|127.127.1.0)' If less than two servers or external reference clocks (127.127.x.x other than 127.127.1.0 or 127.127.1.1) are listed, this is a finding.
Add an additional server line to /etc/inet/ntp.conf for each additional NTP server.
Determine the zone that you are currently securing. # zonename If the command output is not "global", this is not applicable. Check the NTP daemon configuration. # grep '^server' /etc/inet/ntp.conf If an NTP server is listed outside of the enclave, this is a finding.
Remove the server line from /etc/inet/ntp.conf for each NTP server that is external to the enclave.
Run ls -l /etc/inet/ntp.conf to display the owner of the NTP configuration file. If the owner is not root, this is a finding.
Change the owner of the NTP configuration file to root. # chown root /etc/inet/ntp.conf
Check the group ownership of the NTP configuration file. Procedure: # ls -l /etc/inet/ntp.conf If the group owner is not root, bin, or sys, this is a finding.
Change the group owner of the NTP configuration file. Procedure: # chgrp root /etc/inet/ntp.conf
Verify the mode for the NTP configuration file is not more permissive than 0640. # ls -l /etc/inet/ntp.conf If the mode is more permissive than 0640, this is a finding.
Change the mode of the NTP configuration file to 0640 or less permissive. # chmod 0640 /etc/inet/ntp.conf
Check for an extended ACL on the NTP configuration file. # ls -l /etc/inet/ntp.conf If the permissions contain a "+", the file has an extended ACL and this is a finding.
Remove the extended ACL from the file. # chmod A- /etc/inet/ntp.conf
Check the system for unnecessary user accounts. Procedure: # more /etc/passwd Some examples of unnecessary accounts include games, news, gopher, ftp, and lp. If an unnecessary account is found and its use is not justified and documented with the ISSO, 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 the system for duplicate account names. Example: # passwd -sa | 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.
Check the UID assignments of all accounts. # more /etc/passwd Confirm all accounts with a UID of 99 and below are used by a system account. If a UID reserved for system accounts (0 - 99) is used by a non-system account, this is a finding.
Change the UID numbers for non-system accounts with reserved UIDs (those less or equal to 99).
# 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 >
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."
If the system does not use XWindows, this is not applicable. Check the "Dtlogin*greeting.labelString" parameter in /etc/dt/config/C/Xresources 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. If the file does not exist, 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."
Create/update /etc/dt/config/C/Xresources with Dtlogin*greeting.labelString: [DoD login banner text]. 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."
FTP to the system. # ftp localhost 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. If the system does not run the FTP service, this is not applicable. 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."
Edit /etc/ftpd/ftpaccess and add or edit the BANNER parameter ("banner /etc/ftpd/banner.msg"). # vi /etc/ftpd/ftpaccess Add one of the DoD Login Banners (based on the character limitations imposed by the system) to the /etc/ftpd/banner.msg file. # vi /et
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.
Determine if the system displays the date and time of the last successful login upon logging in. This can be accomplished by logging into the system and verifying whether or not the necessary information is displayed. If the system does not provide this information upon login, this is a finding. Last login information is provided automatically by the login(1) program for telnet and console login sessions. Verify the SSH daemon is configured to display last login information. # grep -i PrintLastLog /etc/ssh/sshd_config If PrintLastLog is present in the configuration and not disabled, this is not a finding. Otherwise, this is a finding.
Configure the system to display the date and time of the last successful login upon logging in. Enable PrintLastLog in the SSH daemon. To enable PrintLastLog in the SSH daemon, remove any lines disabling this option from /etc/ssh/sshd_config.
Determine if a publicly-viewable pattern is displayed during a session lock. If the session lock pattern is not publicly-viewable, this is a finding. Acceptable checks for settings. # grep -i dtsession /etc/dt/config/C/sys.resources | egrep -i "saverList|saverTimeout" The saverTimeout value should be 15 (see GEN000500). The saverList value of StartDtscreenBlank is an acceptable screensaver.
Edit the /etc/dt/config/C/sys.resources file and add/edit the following lines, using 15 for the saverTimeout, and using StartDtscreenBlank for the saverList. dtsession*saverTimeout: 15 dtsession*saverList: StartDtscreenBlank
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 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>
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 password length setting. # grep PASSLENGTH /etc/default/passwd If PASSLENGTH is not set to 15 or more, this is a finding.
Edit /etc/default/passwd and set the PASSLENGTH variable to 15 or greater.
Verify no password hash in /etc/passwd or /etc/shadow begins with a character other than an underscore (_) or dollar sign ($). # cut -d ':' -f2 /etc/passwd | egrep -v '^[*!$_]' # cut -d ':' -f2 /etc/shadow | egrep -v '^[*!$_]' If any unlocked password hash is present without an initial underscore (_) or dollar sign ($) character, this is a finding.
Edit /etc/security/policy.conf and add or change the CRYPT_DEFAULT setting to something other than __unix__, such as 6. Allowable values for CRYPT_DEFAULT may be found in the /etc/security/crypt.conf file. Change any passwords using non-compliant hashes.
Verify the traditional UNIX crypt algorithm is deprecated. # egrep CRYPT_ALGORITHMS_ALLOW /etc/security/policy.conf If CRYPT_ALGORITHMS_ALLOW is not set, is not set to "6", or is not set to "5,6", this is a finding. Verify new password hashes are generated using either the SHA-256 or SHA-512 cryptographic hashing algorithm. # egrep CRYPT_DEFAULT /etc/security/policy.conf If CRYPT_DEFAULT is not set or is not equal to 5 or 6, this is a finding.
Edit the /etc/security/policy.conf file. # vi /etc/security/policy.conf Uncomment or add the CRYPT_ALGORITHMS_ALLOW line and set it to "5,6". Update the CRYPT_DEFAULT default line to be equal to 5 or 6. The following lines are acceptable. CRYPT_ALGORITHMS_ALLOW=5,6 CRYPT_DEFAULT=6
Determine if any password hashes stored on the system were not generated using a FIPS 140-2 approved cryptographic hashing algorithm. Procedure: # cut -d ':' -f2 /etc/passwd # cut -d ':' -f2 /etc/shadow If any password hashes are present not beginning with $5$ or $6$, this is a finding. Verify that FIPS 140-2 approved cryptographic hashing algorithms are available. # egrep '^[56]' /etc/security/crypt.conf If no lines are returned, this is a finding.
If the /etc/security/crypt.conf file does not support FIPS 140-2 approved cryptographic hashing algorithms, upgrade to at least the Solaris 10 8/07 release. Edit the /etc/security/policy.conf file. # vi /etc/security/policy.conf Uncomment or add the CRYPT_ALGORITHMS_ALLOW line and set it to "5,6". Update the CRYPT_DEFAULT default line to be equal to 5 or 6. The following lines are acceptable. CRYPT_ALGORITHMS_ALLOW=5,6 CRYPT_DEFAULT=6 Update passwords for all accounts with non-compliant password hashes.
Check the MINUPPER setting. # egrep MINUPPER /etc/default/passwd If MINUPPER is not set to 1 or more, this is a finding.
Edit /etc/default/passwd and set the MINUPPER setting to at least 1.
Check the MINDIGIT setting. # grep MINDIGIT /etc/default/passwd If the MINDIGIT setting is less than 1, this is a finding.
Edit /etc/default/passwd and set the MINDIGIT setting to 1.
Check the MINSPECIAL setting. # grep MINSPECIAL /etc/default/passwd If the MINSPECIAL setting is less than 1, this is a finding.
Edit /etc/default/passwd and set MINSPECIAL to 1.
Check the MAXREPEATS setting. # grep MAXREPEATS /etc/default/passwd If the MAXREPEATS setting is greater than 3, this is a finding.
Edit /etc/default/passwd and set MAXREPEATS to 3.
Check the max days field (the 5th field) of /etc/shadow. # awk -F: '{print $1 ":" $5;}' /etc/shadow If the max days field is equal to 0 or greater than 60 for any account that is not password-locked, this is a finding.
Set the max days field to 60 for all user accounts. # passwd -x 60 <user> Set the MAXWEEKS parameter in /etc/default/passwd to a positive, non-zero value of 8 or less.
Ask the SA if there are any automated processing accounts on the system. If there are automated processing accounts on the system, ask the SA if the passwords for those automated accounts are changed at least once a year. If SA indicates passwords for automated processing accounts are not changed once per year, this is a finding.
Implement or establish procedures to change the passwords of automated processing accounts at least once per year.
Check /etc/default/passwd to verify the MINDIFF setting. # grep MINDIFF /etc/default/passwd If the setting is not present, or is less than 8, this is a finding.
Edit /etc/default/passwd and set or add a MINDIFF setting equal to or greater than 8.
Check /etc/default/passwd for dictionary check configuration. # grep DICTION /etc/default/passwd If the DICTIONLIST or DICTIONDBDIR settings are not present, or are set to non-existent files or directories, this is a finding.
Edit /etc/default/passwd; add or set DICTIONLIST to the dictionary file and DICTIONDBDIR to a database directory such as /var/passwd. Generate the password dictionary by running the mkpwdict command.
Check the HISTORY setting. # grep HISTORY /etc/default/passwd If HISTORY is not set to 5 or more, this is a finding.
Edit /etc/default/passwd and set HISTORY to 5.
Verify the root user is configured as a role, rather than a normal user. # egrep '^root:' /etc/user_attr If the returned line does not include "type=role", this is a finding. Verify at least one local user has been assigned the root role. # egrep '[:;]roles=[^;]*,?root([,;]|$)' /etc/user_attr If no lines are returned, no users are permitted to assume the root role, this is a finding.
Convert the root user into a role. # usermod -K type=role root Add the root role to authorized users' logins. # usermod -R root <userid>
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.
Verify the root account's home directory has no extended ACL. # ls -ld ~root If the permissions include a "+", the directory has an extended ACL and this is a finding.
Remove the extended ACL from the directory. # chmod A- ~root
To view the root user's PATH, log in as the root user, and execute the following. # env | grep PATH This variable is formatted as a colon-separated list of directories. If there is an empty entry, such as a leading or trailing colon or two consecutive colons, this is a finding. If an entry begins with a character other than a slash (/), or has not been documented with the ISSO, this is a finding.
Edit the root user's local initialization files. Remove any empty path entries. Remove any relative path entries that have not been documented with the ISSO. Edit the root user's local initialization files and remove any empty entry that is defined.
Verify the LD_LIBRARY_PATH environment variable is empty or not defined for the root user. # echo $LD_LIBRARY_PATH If a path list is returned, this is a finding.
Edit the root user initialization files and remove any definition of LD_LIBRARY_PATH.
Verify the LD_PRELOAD environment variable is empty or not defined for the root user. # echo $LD_PRELOAD If a path list is returned, this is a finding.
Edit the root user initialization files and remove any definition of LD_PRELOAD.
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.
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>
Check if the root is used for direct logins. Procedure: # last root | grep -v reboot If any direct login records for root exist, this is a finding. Verify the root user is configured as a role, rather than a normal user. Procedure: # egrep '^root:' /etc/user_attr If the returned line does not include "type=role", this is a finding.
Convert the root user into a role. # usermod -K type=role root Add the root role to authorized users' logins. # usermod -R root <userid>
Check the following log files to determine if access to the root account is being logged. Try to su - and enter an incorrect password. # more /var/adm/sulog If root login accounts are not being logged, this is a finding.
Update /etc/default/su and set SYSLOG=YES. Ensure /etc/syslog.conf is configured to log auth.crit messages to capture all failed su attempts.
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
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 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.
Search the system for files without a valid group-owner. # find / -nogroup -print If any files are found, this is a finding.
Change the group owner for each file without a valid group owner. # chgrp <a-valid-group> /tmp/a-file-without-a-valid-group-owner
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>
Verify network services daemon files have no extended ACLs. # ls -la /usr/sbin # ls -la /usr/bin If the permissions include a "+", the file has an extended ACL and 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)'
Remove the extended ACL from the file. # chmod A- [file with extended ACL]
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>
Verify all system command files have no extended ACLs. # ls -lL /etc /bin /usr/bin /usr/lbin /usr/ucb /sbin /usr/sbin If the permissions include a "+", the file has an extended ACL, this is a finding.
Remove the extended ACL from the file. # chmod A- [file with extended ACL]
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 mode of log file hierarchies. Procedure: # ls -lLRa /var/log /var/adm If any of the log files or their directories have modes more permissive than "0640", and these are not documented, 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.
Verify all system log files have no extended ACLs. Procedure: # ls -lL /var/adm If the permissions include a "+", the file has an extended ACL. If an extended ACL exists, verify with the SA if the ACL is required to support authorized software and provides the minimum necessary permissions. If an extended ACL exists that provides access beyond the needs of authorized software, this is a finding.
Remove the extended ACL from the file. # chmod A- [file with extended ACL]
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 0655, this is a finding.
Change the mode of manual page files to 0655 or less permissive. Procedure (example): # chmod 0655 <path>/<manpage>
Verify all manual page files have no extended ACLs. Check environment variable $MANPATH for full list of manpage locations. # echo $MANPATH Check for ACLs, note only a partial list is presented below. # ls -lLR /usr/share/man /usr/sfw/man /usr/sfw/share/man If the permissions include a "+", the file has an extended ACL and this is a finding.
Remove the extended ACL from the file. # chmod A- [file with extended ACL]
Verify system libraries have no extended ACLs. # ls -lL /usr/lib/* /lib/* /usr/sfw/lib If the permissions include a "+", the file has an extended ACL and this is a finding.
Remove the extended ACL from the file. # chmod A- [file with extended ACL]
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
Verify NIS/NIS+/yp files have no extended ACLs. # ls -lLRa /usr/lib/netsvc/yp /var/yp If the permissions include a "+", the file has an extended ACL and this is a finding.
Remove the extended ACL from the directory and files. # chmod -R A- /usr/lib/netsvc/yp /var/yp
Verify the /etc/resolv.conf file is owned by root. Procedure: # ls -l /etc/resolv.conf If the file is not owned by root, this is a finding.
Change the owner of the /etc/resolv.conf file to root. # chown root /etc/resolv.conf
Check the group ownership of the resolv.conf file. Procedure: # ls -lL /etc/resolv.conf If the file is not group owned by root, bin, or sys, this is a finding.
Change the group owner of the /etc/resolv.conf file to root, bin, or sys. Procedure: # chgrp root /etc/resolv.conf
Check the mode of the /etc/resolv.conf file. Procedure: # ls -l /etc/resolv.conf If the file mode is more permissive than 0644, this is a finding.
Change the mode of the /etc/resolv.conf file to 0644 or less permissive. # chmod 0644 /etc/resolv.conf
Verify /etc/resolv.conf has no extended ACL. # ls -l /etc/resolv.conf If the permissions include a "+", the file has an extended ACL, this is a finding.
Remove the extended ACL from the file. # chmod A- /etc/resolv.conf
Verify the /etc/hosts file is owned by root. Procedure: # ls -lL /etc/hosts If the file is not owned by root, this is a finding.
Change the owner of the /etc/hosts file to root. # chown root /etc/hosts
Check the /etc/hosts file's group ownership. Procedure: # ls -lL /etc/hosts If the file is not group-owned by root, bin, or sys, this is a finding.
Change the group owner of the /etc/hosts file to root, sys, or bin. Procedure: # chgrp root /etc/hosts
Check the mode of the /etc/hosts file. Procedure: # ls -l /etc/hosts If the file mode is more permissive than 0644, this is a finding.
Change the mode of the /etc/hosts file to 0644 or less permissive. # chmod 0644 /etc/hosts
Verify /etc/hosts has no extended ACL. # ls -lL /etc/hosts If the permissions include a "+", the file has an extended ACL and this is a finding.
Remove the extended ACL from the file. # chmod A- /etc/hosts
Verify the /etc/nsswitch.conf file is owned by root. Procedure: # ls -l /etc/nsswitch.conf If the file is not owned by root, this is a finding.
Change the owner of the /etc/nsswitch.conf file to root. # chown root /etc/nsswitch.conf
Check the group ownership of the nsswitch.conf file. Procedure: # ls -lL /etc/nsswitch.conf If the file is not group-owned by root, bin, or sys, this is a finding.
Change the group owner of the /etc/nsswitch.conf file to root, bin, or sys. Procedure: # chgrp root /etc/nsswitch.conf
Check the mode of the /etc/nsswitch.conf file. Procedure: # ls -l /etc/nsswitch.conf If the file mode is more permissive than 0644, this is a finding.
Change the mode of the /etc/nsswitch.conf file to 0644 or less permissive. Procedure: # chmod 0644 /etc/nsswitch.conf
Verify /etc/nsswitch.conf has no extended ACL. Procedure: # ls -l /etc/nsswitch.conf If the permissions include a "+", the file has an extended ACL and this is a finding.
Remove the extended ACL from the file. # chmod A- /etc/nsswitch.conf
Verify the /etc/passwd file is owned by root. Procedure: # ls -l /etc/passwd If the file is not owned by root, this is a finding.
Change the owner of the /etc/passwd file to root. # chown root /etc/passwd
Check the group ownership of the passwd file. Procedure: # ls -lL /etc/passwd If the file is not group-owned by root, bin, or sys, this is a finding.
Change the group owner of the /etc/passwd file to root, bin, or sys. Procedure: # chgrp root /etc/passwd
Check the mode of the /etc/passwd file. Procedure: # ls -lL /etc/passwd If /etc/passwd has a mode more permissive than 0644, this is a finding.
Change the mode of the passwd file to 0644. Procedure: # chmod 0644 /etc/passwd Document all changes.
Verify /etc/passwd has no extended ACL. # ls -l /etc/passwd If the permissions include a "+", the file has an extended ACL, this is a finding.
Remove the extended ACL from the file. # chmod A- /etc/passwd
Verify the /etc/group file is owned by root. Procedure: # ls -l /etc/group If the file is not owned by root, this is a finding.
Change the owner of the /etc/group file to root. # chown root /etc/group
Check the group ownership of the /etc/group file. Procedure: # ls -lL /etc/group If the file is not group-owned by root, bin, or sys, this is a finding.
Change the group owner of the /etc/group file. Procedure: # chgrp root /etc/group
Check the mode of the /etc/group file. Procedure: # ls -l /etc/group If the file mode is more permissive than 0644, this is a finding.
Change the mode of the /etc/group file to 0644 or less permissive. # chmod 0644 /etc/group
Verify /etc/group has no extended ACL. # ls -l /etc/group If the permissions include a "+", the file has an extended ACL and this is a finding.
Remove the extended ACL from the file. # chmod A- /etc/group
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 ownership of the /etc/shadow file. Procedure: # ls -lL /etc/shadow If the file is not group-owned by root, bin, or sys, this is a finding.
Change the group owner of the /etc/shadow file. Procedure: # chgrp root /etc/shadow
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>
Verify /etc/shadow has no extended ACL. # ls -lL /etc/shadow If the permissions include a '+', the file has an extended ACL and this is a finding.
Remove the extended ACL from the file. # chmod A- /etc/shadow
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
Verify no password hashes are present in /etc/passwd. # cut -d : -f 2 /etc/passwd | grep -v '^x$' If any password hashes are returned, this is a finding.
Migrate /etc/passwd password hashes to /etc/shadow. # pwconv
Check the /etc/group file for password hashes. Procedure: # cut -d : -f 2 /etc/group | egrep -v '^(x|!)$' If any password hashes are returned, this is a finding. If no password hashes are returned, there is no finding.
Edit /etc/group and change the password field to an exclamation point (!) to lock the group password.
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>
Verify user's home directories have no extended ACLs. # cut -d : -f 6 /etc/passwd | xargs -n1 ls -ld If the permissions include a "+", the file has an extended ACL, this is a finding.
Remove the extended ACL from the file. # chmod A- [user home directory with extended ACL]
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> {} \;
Check the contents of user home directories for files group-owned by a group of which the home directory's owner is not a member. 1. List the user accounts. # cut -d : -f 1/etc/passwd 2. For each user account, get a list of GIDs for files in the user's home directory. # find < users home directory > -exec ls -lLd \; 3. Obtain the list of GIDs associated with the user's account. # id < user name > 4. Check the GID lists. If there are GIDs in the file list not present in the user list, this is a finding.
Change the group of a file not group-owned by a group where the home directory's owner is a member. # chgrp < user's primary group > <file with bad group ownership >
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.
Check the contents of interactive user's home directories (99 < UID < 60000) for files with extended ACLs. # ls -alLR < users home dir > If the permissions include a "+", the file has an extended ACL and this is a finding.
Remove the extended ACL from the file. # chmod A- [user file with extended ACL]
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 have no extended ACLs. # ls -lL /etc/rc* /etc/init.d If the permissions include a "+", the file has an extended ACL and this is a finding.
Remove the extended ACL from the file. # chmod A- [run control script with extended ACL]
Verify run control scripts' executable search paths. Procedure: # find /etc/rc* /etc/init.d /lib/svc/method -type f -print | xargs grep -w PATH This variable is formatted as a colon-separated list of directories. Relative path entries must be document with the ISSO. 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 has not been documented with the ISSO, this is a finding.
Edit the run control script and remove the relative path entries from the executable search path variable that are not documented with the ISSO. Edit the run control script and remove any empty entry that is defined.
Verify run control scripts' library preload list. Procedure: # find /etc/rc* /etc/init.d -type f -print | xargs grep LD_PRELOAD This variable is formatted as a colon-separated list of paths. 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 has not been documented with the ISSO, this is a finding.
Edit the run control script and remove the relative path entry from the library preload variables that are not documented with the ISSO. Edit the run control script and remove any empty entry that is defined.
Verify run control scripts' library preload list. Procedure: # find /etc/rc* /etc/init.d -type f -print | xargs grep LD_PRELOAD This variable is formatted as a colon-separated list of paths. 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 has not been documented with the ISSO, this is a finding.
Edit the run control script and remove the relative path entry from the library preload variables that are not documented with the ISSO. Edit the run control script and remove any empty entry that is defined.
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 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 global initialization files for extended ACLs. # ls -lL /etc/profile /etc/bashrc /etc/csh.login /etc/csh.cshrc /etc/environment /etc/.login /etc/security/environ If the permissions on an existing file include a "+", the file has an extended ACL, this is a finding.
Remove the extended ACL from the file. # chmod A- [global initialization file with extended ACL]
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 skeleton files for extended ACLs. # ls -alL /etc/skel If the permissions include a "+", the file has an extended ACL and this is a finding.
Remove the extended ACL from the file. # chmod A- [skeleton file with extended ACL]
Check skeleton files ownership. # ls -alL /etc/skel If a skeleton file is not owned by root, this is a finding.
Change the ownership of skeleton files with incorrect mode. # chown root <skeleton file>
Verify the skeleton files are group-owned by root, bin, or sys. Procedure: # ls -alL /etc/skel If a skeleton file is not group-owned by root, bin, or sys, this is a finding.
Change the group owner of the skeleton file to root. Procedure: # chgrp <group> /etc/skel/[skeleton file]
Check the global initialization files' executable search paths. Procedure: # grep -i PATH /etc/profile /etc/bashrc /etc/csh.login /etc/csh.cshrc /etc/environment /etc/.login /etc/security/environ 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 has not been documented with the ISSO, this is a finding.
Edit the global initialization file(s) with PATH variables containing relative paths and remove any relative path form the PATH variables that have not been documented with the ISSO. Edit the global initialization file(s) and remove any empty entry that is defined.
Check the global initialization files' library search paths. # grep LD_LIBRARY_PATH /etc/profile /etc/bashrc /etc/csh.login /etc/csh.cshrc /etc/environment /etc/.login /etc/security/environ 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 has not been documented with the ISSO, this is a finding.
Edit the global initialization file and remove the relative path entries from the library search path variables that have not been documented with the ISSO. Edit the global initialization file(s) and remove any empty entry that is defined.
Check the global initialization files' library preload list. Procedure: # grep LD_PRELOAD /etc/profile /etc/bashrc /etc/csh.login /etc/csh.cshrc /etc/environment /etc/.login /etc/security/environ This variable is formatted as a colon-separated list of paths. 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 has not been documented with the ISSO, this is a finding.
Edit the global initialization file(s) and remove the relative path entry from the library preload list variables that have not been documented with the ISSO. Edit the global initialization file(s) and remove any empty entry that is defined.
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 user home directories for local initialization files with extended ACLs. # cut -d : -f 6 /etc/passwd | xargs -n1 -IDIR ls -alL DIR/.login DIR/.cshrc DIR/.logout DIR/.profile DIR/.bash_profile DIR/.bashrc DIR/.bash_logout DIR/.env DIR/.dtprofile DIR/.dispatch DIR/.emacs DIR/.exrc If the permissions include a "+", the file has an extended ACL, this is a finding.
Remove the extended ACL from the file. # chmod A- [local initialization file with extended ACL]
NOTE: The following must be done in the BASH shell. Examine the PATH variable contained in any user's local initialization files using a command shell that supports the use of ~USER as USER's home directory. # cat /etc/passwd | cut -f 1,1 -d ":" | xargs -n1 -IUSER sh -c 'grep -i PATH ~USER/.*' The PATH variable is a colon-delimited directory list. 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 has not been documented with the ISSO, this is a finding.
Edit the local initialization file(s) and remove the relative path entries from the PATH variable that have not been documented with the ISSO. Edit the local initialization file(s) and remove any empty entry that is defined.