IBM DB2 V10.5 LUW Security Technical Implementation Guide

  • Version/Release: V2R1
  • Published: 2023-06-11
  • Released: 2023-07-26
  • Expand All:
  • Severity:
  • Sort:
Compare

Select any two versions of this STIG to compare the individual requirements

View

Select any old version/release of this STIG to view the previous requirements

This Security Technical Implementation Guide is published as a tool to improve the security of Department of Defense (DOD) information systems. The requirements are derived from the National Institute of Standards and Technology (NIST) 800-53 and related documents. Comments or proposed revisions to this document should be sent via email to the following address: disa.stig_spt@mail.mil.
b
DB2 must limit the number of concurrent sessions to an organization-defined number per user for all accounts and/or account types.
AC-10 - Medium - CCI-000054 - V-213670 - SV-213670r879511_rule
RMF Control
AC-10
Severity
Medium
CCI
CCI-000054
Version
DB2X-00-000200
Vuln IDs
  • V-213670
  • V-74429
Rule IDs
  • SV-213670r879511_rule
  • SV-89103
Database management includes the ability to control the number of users and user sessions utilizing a DBMS. Unlimited concurrent connections to the DBMS could allow a successful Denial of Service (DoS) attack by exhausting connection resources; and a system can also fail or be degraded by an overload of legitimate users. Limiting the number of concurrent sessions per user is helpful in reducing these risks. This requirement addresses concurrent session control for a single account. It does not address concurrent sessions by a single user via multiple system accounts; and it does not deal with the total number of sessions across all accounts. The capability to limit the number of concurrent sessions per user must be configured in or added to the DBMS (for example, by use of a logon trigger), when this is technically feasible. Note that it is not sufficient to limit sessions via a web server or application server alone, because legitimate users and adversaries can potentially connect to the DBMS by other means. The organization will need to define the maximum number of concurrent sessions by account type, by account, or a combination thereof. In deciding on the appropriate number, it is important to consider the work requirements of the various types of users. For example, 2 might be an acceptable limit for general users accessing the database via an application; but 10 might be too few for a database administrator using a database management GUI tool, where each query tab and navigation pane may count as a separate session. (Sessions may also be referred to as connections or logons, which for the purposes of this requirement are synonyms.)
Checks: C-14891r295059_chk

Determine whether the system documentation specifies limits on the number of concurrent DBMS sessions per account by type of user. If it does not, assume a limit of 10 for database administrators and 2 for all other users. The DB2 CONNECT_PROC configuration parameter allows the input of a two-part connect procedure name that will implicitly be executed every time an application connects to the database. Find the value of CONNECT_PROC by running the following command: $db2 get db cfg If the value of CONNECT_PROC is null (i.e., not set), this is a finding. If the value of CONNECT_PROC is set, run the following command to review the DDL for the connect procedure: DB2> SELECT text FROM SYSCAT.ROUTINES WHERE ROUTINENAME=<MY_CONNECT> If the connect procedure does not restrict the user sessions as per organization guidelines, this is a finding.

Fix: F-14889r295060_fix

Create the stored procedure per organization guidelines to restrict the number of concurrent sessions using the CREATE or REPLACE procedure: DB2> CREATE or REPLACE PROCEDURE <DBINST1.MY_CONNECT> (Example below.) Update the database CONNECT_PROC parameter to set to the procedure created in previous step: $db2 update db cfg using CONNECT_PROC db2inst1.my_connect Grant execute to the public to connect the procedure. DB2> GRANT EXECUTE ON procedure <schema>.MY_CONNECT_MAIN TO PUBLIC Note: This is an example. Modify and test to comply with organization policy. CREATE OR REPLACE PROCEDURE db2inst1.my_connect_main() BEGIN DECLARE vcount integer; DECLARE vcount_admin integer; SELECT COUNT(*) INTO vcount FROM table(mon_get_connection(NULL, NULL, 0)) WHERE session_auth_id = session_user and application_handle != mon_get_application_handle(); SELECT COUNT(*) INTO vcount_admin FROM table (sysproc.auth_list_authorities_for_authid(session_user,'U')) as t WHERE authority in ('SYSMON','SYSADM','DBADM','SECADM','SYSCTRL','SYSMAINT')and (d_user='Y' OR d_group='Y' OR d_public='Y' OR role_user='Y' or role_group='Y' or role_public='Y' or d_role='Y'); IF (vcount_admin > 0 AND vcount > 5) THEN SIGNAL SQLSTATE '42502' SET MESSAGE_TEXT='Connection refused. More than 5 connections not allowed for admin!'; ELSEIF (vcount > 3 AND vcount_admin = 0) THEN SIGNAL SQLSTATE '42502' SET MESSAGE_TEXT='Connection refused. More than 3 connections not allowed!'; END IF; END @ Note: @ sign in above statement is statement terminator, using db2 –t option, statement terminator can be changed DB2> GRANT EXECUTE ON PROCEDURE db2inst1.my_connect_main TO PUBLIC $db2 UPDATE DB CFG USING CONNECT_PROC db2inst1. my_connect_main

b
DB2 must integrate with an organization-level authentication/access mechanism providing account management and automation for all users, groups, roles, and any other principals.
AC-2 - Medium - CCI-000015 - V-213671 - SV-213671r879522_rule
RMF Control
AC-2
Severity
Medium
CCI
CCI-000015
Version
DB2X-00-000300
Vuln IDs
  • V-213671
  • V-74431
Rule IDs
  • SV-213671r879522_rule
  • SV-89105
Enterprise environments make account management for applications and databases challenging and complex. A manual process for account management functions adds the risk of a potential oversight or other error. Managing accounts for the same person in multiple places is inefficient and prone to problems with consistency and synchronization. A comprehensive application account management process that includes automation helps to ensure that accounts designated as requiring attention are consistently and promptly addressed. Examples include, but are not limited to, using automation to take action on multiple accounts designated as inactive, suspended, or terminated, or by disabling accounts located in non-centralized account stores, such as multiple servers. Account management functions can also include: assignment of group or role membership; identifying account type; specifying user access authorizations (i.e., privileges); account removal, update, or termination; and administrative alerts. The use of automated mechanisms can include, for example: using email or text messaging to notify account managers when users are terminated or transferred; using the information system to monitor account usage; and using automated telephone notification to report atypical system account usage. The DBMS must be configured to automatically utilize organization-level account management functions, and these functions must immediately enforce the organization's current account policy. Automation may be comprised of differing technologies that when placed together contain an overall mechanism supporting an organization's automated account management requirements.
Checks: C-14892r295062_chk

The default name and location for the IBM LDAP security plug-in configuration file is: On UNIX/LINUX: INSTHOME/sqllib/cfg/IBMLDAPSecurity.ini On Windows: %DB2PATH%\cfg\IBMLDAPSecurity.ini If the IBMLDAPSecurity.ini file does not exist in the default location and environment variable DB2LDAPSecurityConfig is not set, this is a finding. If the environment variable DB2LDAPSecurityConfig is set and file does not exist in DB2LDAPSecurityConfig location, this is a finding. Find the value of SRVCON_PW_PLUGIN by running $db2 get dbm cfg If SRVCON_PW_PLUGIN is not set to IBMLDAPauthserver, this is a finding. Note: In Windows, find the location of base installation directory of DB2 using one of following methods 1. Find the value of DB2PATH variable using db2set –all on DB2 CLP 2. Run db2level command 3. Go to Registry Editor in Windows Computer &gt;&gt; HKEY_LOCAL_MACHINE &gt;&gt; SOFTWARE &gt;&gt; IBM &gt;&gt; DB2 &gt;&gt; installedCopies &gt;&gt; DB2COPY1 Then find the value of the DB2 Path Name

Fix: F-14890r295063_fix

Create an IBMLDAPSecurity.ini file at the default name and location for the IBM LDAP security plug-in configuration file: On UNIX/LINUX: $INSTHOME/sqllib/cfg/IBMLDAPSecurity.ini On Windows: %DB2PATH%\cfg\IBMLDAPSecurity.ini To create the file in a non-default location, set the environment variable DB2LDAPSecurityConfig to the directory name where configuration file IBMLDAPSecurity.ini is located. Set the value of SRVCON_PW_PLUGIN to IBMLDAPauthserver for instance by running the following command: $db2 update dbm cfg using SRVCON_PW_PLUGIN IBMLDAPauthserver immediate Refer to details below to determine appropriate values in LDAP configuration file. -- SERVER-RELATED values: 1) LDAP_HOST - The name of the LDAP server(s) - This is a space separated list of LDAP server host names or IP addresses, with an optional port number for each one. For example: host1[:port1] [host2:[port2] ... The default port number is 389, or 636 if SSL is enabled. 2) ENABLE_SSL - To enable SSL support, set ENABLE_SSL to TRUE (you must have the GSKit installed). This is an optional parameter; it defaults to FALSE (no SSL support). 3) SSL_KEYFILE - The path for the SSL keyring. A keyfile is only required if your LDAP server is using a certificate that is not automatically trusted by your GSKit installation. For example: SSL_KEYFILE = /home/db2inst1/IBMLDAPSecurity.kdb 4) SSL_PW - The SSL keyring password. For example: SSL_PW = keyfile-password 5) SECURITY_PROTOCOL - To enable TLS 1.2 support, set SECURITY_PROTOCOL to TLSV12. To enable TLS 1.0, 1.1, and 1.2 support, set SECURITY_PROTOCOL to ALL. By default, SECURITY_PROTOCOL is not set. This setting means TLS 1.2 is not supported. -- USER_RELATED values: 1) USER_OBJECTCLASS - The LDAP object class used for users. Generally, set USER_OBJECTCLASS to inetOrgPerson (the user for Microsoft Active Directory) For example: USER_OBJECTCLASS = inetOrgPerson 2) USER_BASEDN - The LDAP base DN to use when searching for users. If not specified, user searches start at the root of the LDAP directory. Some LDAP servers require that you specify a value for this parameter. For example: USER_BASEDN = o=ibm 3) USERID_ATTRIBUTE - The LDAP user attribute that represents the user ID. The USERID_ATTRIBUTE attribute is combined with the USER_OBJECTCLASS and USER_BASEDN (if specified) to construct an LDAP search filter when a user issues a DB2 CONNECT statement with an unqualified user ID. For example, if USERID_ATTRIBUTE = uid, then issuing this statement: db2 connect to MYDB user bob using bobpass results in the following search filter: &(objectClass=inetOrgPerson)(uid=bob) 4) AUTHID_ATTRIBUTE - The LDAP user attribute that represents the DB2 authorization ID. Usually this is the same as the USERID_ATTRIBUTE. For example: AUTHID_ATTRIBUTE = uid -- GROUP-RELATED values: 1) GROUP_OBJECTCLASS - The LDAP object class used for groups. Generally this is groupOfNames or groupOfUniqueNames (for Microsoft Active Directory, it is group) For example: GROUP_OBJECTCLASS = groupOfNames 2) GROUP_BASEDN - The LDAP base DN to use when searching for groups If not specified, group searches start at the root of the LDAP directory. Some LDAP servers require that you specify a value for this parameter. For example: GROUP_BASEDN = o=ibm 3) GROUPNAME_ATTRIBUTE - The LDAP group attribute that represents the name of the group. For example: GROUPNAME_ATTRIBUTE = cn 4) GROUP_LOOKUP_ METHOD - Determines the method used to find the group memberships for a user. Possible values are: SEARCH_BY_DN Indicates to search for groups that list the user as a member. Membership is indicated by the group attribute defined as GROUP_LOOKUP_ATTRIBUTE (typically, member or uniqueMember). USER_ATTRIBUTE In this case, a user's groups are listed as attributes of the user object itself. This setting indicates to search for the user attribute defined as GROUP_LOOKUP_ATTRIBUTE to get the user's groups (typically memberOf for Microsoft Active Directory or ibm-allGroups for IBM Tivoli Directory Server). For example: GROUP_LOOKUP_METHOD = SEARCH_BY_DN GROUP_LOOKUP_METHOD = USER_ATTRIBUTE 5) GROUP_LOOKUP_ATTRIBUTE - Name of the attribute used to determine group membership, as described for GROUP_LOOKUP_METHOD. For example: GROUP_LOOKUP_ATTRIBUTE = member GROUP_LOOKUP_ATTRIBUTE = ibm-allGroups NESTED_GROUPS If NESTED_GROUPS is TRUE, the DB2 database manager recursively searches for group membership by attempting to look up the group memberships for every group that is found. Cycles (such as A belongs to B, and B belongs to A) are handled correctly. This parameter is optional, and defaults to FALSE. -- MISCELLANEOUS values: 1) SEARCH_DN, SEARCH_PW If your LDAP server does not support anonymous access, or if anonymous access is not sufficient when searching for users or groups, then you can optionally define a DN and password that will be used to perform searches. For example: SEARCH_DN = cn=root SEARCH_PW = rootpassword 2) DEBUG Set DEBUG to TRUE to write extra information to the db2diag log files to aid in debugging LDAP related issues. Most of the additional information is logged at DIAGLEVEL 4 (INFO). DEBUG defaults to false.

b
DB2 must enforce approved authorizations for logical access to information and system resources in accordance with applicable access control policies.
AC-3 - Medium - CCI-000213 - V-213672 - SV-213672r879530_rule
RMF Control
AC-3
Severity
Medium
CCI
CCI-000213
Version
DB2X-00-000400
Vuln IDs
  • V-213672
  • V-74433
Rule IDs
  • SV-213672r879530_rule
  • SV-89107
Authentication with a DoD-approved PKI certificate does not necessarily imply authorization to access the DBMS. To mitigate the risk of unauthorized access to sensitive information by entities that have been issued certificates by DoD-approved PKIs, all DoD systems, including databases, must be properly configured to implement access control policies. Successful authentication must not automatically give an entity access to an asset or security boundary. Authorization procedures and controls must be implemented to ensure each authenticated entity also has a validated and current authorization. Authorization is the process of determining whether an entity, once authenticated, is permitted to access a specific asset. Information systems use access control policies and enforcement mechanisms to implement this requirement. Access control policies include identity-based policies, role-based policies, and attribute-based policies. Access enforcement mechanisms include access control lists, access control matrices, and cryptography. These policies and mechanisms must be employed by the application to control access between users (or processes acting on behalf of users) and objects (e.g., devices, files, records, processes, programs, and domains) in the information system. This requirement is applicable to access control enforcement applications, a category that includes database management systems. If the DBMS does not follow applicable policy when approving access, it may be in conflict with networks or other applications in the information system. This may result in users either gaining or being denied access inappropriately and in conflict with applicable policy.
Checks: C-14893r295065_chk

Use the following query to determine if PUBLIC has been directly granted any privileges on objects in the database: DB2&gt; SELECT PRIVILEGE, OBJECTNAME, OBJECTSCHEMA, OBJECTTYPE FROM SYSIBMADM.PRIVILEGES WHERE AUTHID = 'PUBLIC' If any rows are returned, this is a finding. Use the following query to determine if PUBLIC has been granted membership in any database roles: DB2&gt; SELECT ROLENAME FROM TABLE (SYSPROC.AUTH_LIST_ROLES_FOR_AUTHID ('PUBLIC', 'G') ) For each role returned by this query, determine if any privileges have been granted to it with the following query: DB2&gt; SELECT PRIVILEGE, OBJECTNAME, OBJECTSCHEMA, OBJECTTYPE FROM SYSIBMADM.PRIVILEGES WHERE AUTHID = '&lt;rolename&gt;' AND AUTHIDTYPE = 'R' If any rows are returned, this is a finding. Use the following query to determine if PUBLIC has been granted any database authorities directly or indirectly through a database role: DB2&gt; SELECT AUTHORITY, D_PUBLIC, ROLE_PUBLIC FROM TABLE(SYSPROC.AUTH_LIST_AUTHORITIES_FOR_AUTHID ('PUBLIC', 'G') ) If any of the rows have a ‘Y’ value in the D_PUBLIC column, this is a finding. If any of the rows have a ‘Y’ value in the ROLE_PUBLIC column, this is a finding.

Fix: F-14891r295066_fix

If a privilege is granted directly to PUBLIC, revoke it using the appropriate variation of the REVOKE statement specific to the object on which the privilege is granted. For example, if PUBLIC has EXECUTE privileges are on a package X.Y, revoke them using the REVOKE (package privileges). DB2> REVOKE EXECUTE ON PACKAGE X.Y FROM PUBLIC If a privilege has been granted indirectly to PUBLIC through membership in a database role, revoke membership in that database role from PUBLIC using the REVOKE (role) statement. DB2> REVOKE ROLE <role name> FROM PUBLIC If an authority is granted directly to PUBLIC, revoke it using the appropriate variation of the REVOKE (database authorities) statement. For example, if the CONNECT row shows a ‘Y’ value in the D_PUBLIC column, revoke CONNECT authority using this statement: DB2> REVOKE CONNECT ON DATABASE FROM PUBLIC If an authority is granted indirectly to PUBLIC through a database role, revoke membership in that database role from PUBLIC using the REVOKE (role) statement. DB2> REVOKE ROLE <role name> FROM PUBLIC To determine what database roles PUBLIC belongs, issue this query: DB2> SELECT ROLENAME FROM TABLE (SYSPROC.AUTH_LIST_ROLES_FOR_AUTHID ('PUBLIC', 'G') ) Notes: To prevent the default assignment of authorities and privileges to PUBLIC when a database is created, one should use the restrictive option on the create database statement as demonstrated below: DB2> CREATE DATABASE <dbname> RESTRICTIVE One can determine if a database was created with restrictive by looking at the value of restrict_access database configuration parameter using the following command at the command prompt: $db2 get db cfg http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.doc/doc/r0000981.html?cp=SSEPGG_10.5.0%2F2-12-7-181&lang=en As authorities and privileges can be granted to PUBLIC after the database is created, it is recommended to run the above checks on a regular basis.

b
DB2 must protect against a user falsely repudiating having performed organization-defined actions.
AU-10 - Medium - CCI-000166 - V-213673 - SV-213673r879554_rule
RMF Control
AU-10
Severity
Medium
CCI
CCI-000166
Version
DB2X-00-000500
Vuln IDs
  • V-213673
  • V-74435
Rule IDs
  • SV-213673r879554_rule
  • SV-89109
Non-repudiation of actions taken is required in order to maintain data integrity. Examples of particular actions taken by individuals include creating information, sending a message, approving information (e.g., indicating concurrence or signing a contract), and receiving a message. Non-repudiation protects against later claims by a user of not having created, modified, or deleted a particular data item or collection of data in the database. In designing a database, the organization must define the types of data and the user actions that must be protected from repudiation. The implementation must then include building audit features into the application data tables, and configuring the DBMS' audit tools to capture the necessary audit trail. Design and implementation also must ensure that applications pass individual user identification to the DBMS, even where the application connects to the DBMS with a standard, group account.
Checks: C-14894r295068_chk

Run the following SQL statement to ensure that an audit policy is defined upon all the required application tables and/or the database: DB2&gt; SELECT AUDITPOLICYNAME, OBJECTSCHEMA, OBJECTNAME, OBJECTTYPE FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN ('T',' ') If no rows are returned, this is a finding. If a row with OBJECTTYPE of ' ' (Database; value is a blank) exists in the output, it is a database level policy. If a row with OBJECTTYPE of 'T' exists in the output, it is a table level policy. For each audit policy returned in the statement above, run the following SQL statement to confirm that the CONTEXT and EXECUTE categories are part of that policy: DB2&gt; SELECT AUDITPOLICYNAME, CONTEXTSTATUS, EXECUTESTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES If the database audit policy has the values for the CONTEXTSTATUS and EXECUTESTATUS columns set to 'S' (Success) or 'B' (Both) as well as the value in the ERRORTYPE column set to 'A' (Audit), this is not a finding. If the database policy does not exist or does not cover CONTEXTSTATUS or EXECUTESTATUS then check if the appropriate policies are defined for all the required application tables. If all the required application table audit policies do not have the values for the CONTEXTSTATUS and EXECUTESTATUS columns set to 'S' (Success) or 'B' (Both) as well as the value in the ERRORTYPE column set to 'A' (Audit), this is a finding.

Fix: F-14892r295069_fix

Define the audit policy using the following Create Audit Policy SQL statement: DB2> CREATE AUDIT POLICY <audit policy name> CATEGORIES CONTEXT STATUS BOTH, EXECUTE STATUS BOTH ERROR TYPE AUDIT Apply such a policy to either the database as a whole or to the specific application tables using one of these two statements: DB2> AUDIT DATABASE USING POLICY <audit policy name> Or DB2> AUDIT TABLE <table name> USING POLICY <audit policy name> Note : While DB2 does provide basic audit capabilities, IBM highly recommends investing in and using a dedicated enterprise audit tool such as the IBM Security Guardium Data Activity Monitor in order to provide a comprehensive audit solution.

b
DB2 must provide audit record generation capability for DoD-defined auditable events within all DBMS/database components.
AU-12 - Medium - CCI-000169 - V-213674 - SV-213674r879559_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000169
Version
DB2X-00-000600
Vuln IDs
  • V-213674
  • V-74437
Rule IDs
  • SV-213674r879559_rule
  • SV-89111
Without the capability to generate audit records, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. Audit records can be generated from various components within the DBMS (e.g., process, module). Certain specific application functionalities may be audited as well. The list of audited events is the set of events for which audits are to be generated. This set of events is typically a subset of the list of all events for which the system is capable of generating audit records. DoD has defined the list of events for which the DBMS will provide an audit record generation capability as the following: (i) Successful and unsuccessful attempts to access, modify, or delete privileges, security objects, security levels, or categories of information (e.g., classification levels); (ii) Access actions, such as successful and unsuccessful logon attempts, privileged activities, or other system-level access, starting and ending time for user access to the system, concurrent logons from different workstations, successful and unsuccessful accesses to objects, all program initiations, and all direct access to the information system; and (iii) All account creation, modification, disabling, and termination actions. Organizations may define additional events requiring continuous or ad hoc auditing.
Checks: C-14895r295071_chk

To meet these requirements, at the minimum AUDIT, CHECKING, CONTEXT, SECMAINT, SYSADMIN, and VALIDATE category auditing need to be implemented at the database level. Run the following SQL statement to ensure that an audit policy is defined upon the database: DB2&gt; SELECT AUDITPOLICYNAME, AUDITPOLICYID FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN (' ') If no rows are returned, this is a finding. Using the AUDITPOLICYID from the query above find the details of the audit policy. DB2&gt; SELECT AUDITPOLICYNAME, AUDITSTATUS, CHECKINGSTATUS, CONTEXTSTATUS, SECMAINTSTATUS, SYSADMINSTATUS, VALIDATESTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES WHERE AUDITPOLICYID = &lt;audit policy ID&gt; If the values for AUDITSTATUS, CHECKINGSTATUS, CONTEXTSTATUS, SECMAINTSTATUS, SYSMADMINSTATUS and VALIDATESTATUS are not 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding.

Fix: F-14893r295072_fix

Define an audit policy using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <DB audit policy name> CATEGORIES AUDIT STATUS BOTH, SYSADMIN STATUS BOTH, SECMAINT STATUS BOTH, VALIDATE STATUS BOTH, CHECKING STATUS BOTH, CONTEXT STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, apply the policy created above to the database: DB2> AUDIT DATABASE USING POLICY <DB audit policy name>

b
DB2 must allow only the ISSM (or individuals or roles appointed by the ISSM) to select which auditable events are to be audited.
AU-12 - Medium - CCI-000171 - V-213675 - SV-213675r879560_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000171
Version
DB2X-00-000700
Vuln IDs
  • V-213675
  • V-74439
Rule IDs
  • SV-213675r879560_rule
  • SV-89113
Without the capability to restrict which roles and individuals can select which events are audited, unauthorized personnel may be able to prevent or interfere with the auditing of critical events. Suppression of auditing could permit an adversary to evade detection. Misconfigured audits can degrade the system's performance by overwhelming the audit log. Misconfigured audits may also make it more difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.
Checks: C-14896r295074_chk

Run the following command to find the value of the SYSADM_GROUP parameter: $db2 get dbm cfg Only users approved by the ISSM should be part of the SYSADM_GROUP. If non-ISSM authorized users are part of SYSADM_GROUP group, this is a finding. On Windows systems, if the SYSADM_GROUP database manager configuration parameter is not specified, this is a finding. Database level audit The security administrator (who holds SECADM authority within a database) can define audit policies and control the audit requirements for an individual database. The security administrator can use the following audit routines to operate upon the database audit logs: - The SYSPROC.AUDIT_ARCHIVE stored procedure archives audit logs. - The SYSPROC.AUDIT_LIST_LOGS table function allows you to locate logs of interest. - The SYSPROC.AUDIT_DELIM_EXTRACT stored procedure extracts data into delimited files for analysis. The security administrator can also grant EXECUTE privilege on these routines to another user. Run the following query to find out which users have SECADM authority in database: DB2&gt; SELECT CHAR(GRANTOR,35) AS GRANTOR, CHAR(GRANTEE,35) AS GRANTEE, GRANTEETYPE FROM SYSCAT.DBAUTH WHERE SECURITYADMAUTH='Y' If GRANTEETYPE is 'U' and the authorization ID is not an ISSM authorized user, this is a finding. If the GRANTEETYPE is 'G', then all members of the external group identified by GRANTEE must be ISSM authorized users, otherwise this is a finding. If the GRANTEETYPE is 'R', then all members of the database role identified by GRANTEE must be ISSM authorized users, otherwise this is a finding. The members of a role can be found using this statement: DB2&gt; SELECT CHAR(GRANTOR,35) AS GRANTOR, CHAR(GRANTEE,35) AS GRANTEE, GRANTEETYPE FROM SYSCAT.ROLEAUTH WHERE ROLENAME= &lt;search role name&gt; Run the following query to find out which users have execute privilege on SYSPROC.AUDIT_ARCHIVE, SYSPROC.AUDIT_LIST_LOGS, SYSPROC.AUDIT_DELIM_EXTRACT: DB2&gt; SELECT * FROM SYSCAT.ROUTINEAUTH WHERE SPECIFICNAME LIKE 'AUDIT%' AND SCHEMA='SYSPROC' If non-ISSM authorized users have execute privilege on any of above three routines, this is a finding.

Fix: F-14894r295075_fix

Update the value SYSADM_GROUP to a group which has only members approved by the ISSM using the following command: $db2 update dbm cfg using SYSADM_GROUP <SYSADMIN GROUP> Remove users not approved by ISSM from SYSADM_GROUP group using operating system tools/commands. Revoke SECADM authority from non-ISSM users using the SQL statement: DB2> REVOKE SECADM ON DATABASE FROM USER <user name> Remove non-ISSM members using the following the following SQL statement: DB2> REVOKE SECADM ON DATABASE FROM GROUP <group name> Revoke SECADM from the group or role using the following SQL statement: DB2> REVOKE SECADM ON DATABASE FROM ROLE <role name> Revoke execute from unapproved users if they have execute on SYSPROC.AUDIT_ARCHIVE, SYSPROC.AUDIT_LIST_LOGS, SYSPROC.AUDIT_DELIM_EXTRACT using appropriate variation of Revoke (routine privileges) statement. Note: The audit facility provides the ability to audit at both the instance and the individual database level, independently recording all instance and database level activities with separate logs for each instance level audit. The system administrator (who holds SYSADM authority) can use the db2audit tool to configure audit at the instance level as well as to control when such audit information is collected. The system administrator can use the db2audit tool to archive both instance and database audit logs as well as to extract audit data from archived logs of either type. SYSADM authority is assigned to the group specified by the SYSADM_GROUP configuration parameter. Membership in that group is controlled outside the database manager through the security facility used on your platform.

b
DB2 must generate audit records when privileges/permissions are retrieved.
AU-12 - Medium - CCI-000172 - V-213676 - SV-213676r879561_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-000800
Vuln IDs
  • V-213676
  • V-74441
Rule IDs
  • SV-213676r879561_rule
  • SV-89115
Under some circumstances, it may be useful to monitor who/what is reading privilege/permission/role information. Therefore, it must be possible to configure auditing to do this. DBMSs typically make such information available through views or functions. This requirement addresses explicit requests for privilege/permission/role membership information. It does not refer to the implicit retrieval of privileges/permissions/role memberships that the DBMS continually performs to determine if any and every action on the database is permitted.
Checks: C-14897r295077_chk

To monitor who/what is reading the privilege/permission/role information from catalog tables a minimum audit set of CONTEXT and EXECUTE (with data) categories on the following catalog tables are required: SYSIBM.SYSINDEXAUTH SYSIBM.SYSPLANAUTH SYSIBM.SYSPASSTHRUAUTH SYSIBM.SYSROUTINEAUTH SYSIBM.SYSSCHEMAAUTH SYSIBM.SYSSECURITYLABELACCESS SYSIBM.SYSSECURITYPOLICYEXEMPTIONS SYSIBM.SYSSEQUENCEAUTH SYSIBM.SYSSURROGATEAUTHIDS SYSIBM.SYSTABAUTH SYSIBM.SYSTBSPACEAUTH SYSIBM.SYSXSROBJECTAUTH SYSIBM.SYSCOLAUTH SYSIBM.SYSLIBRARYAUTH SYSIBM.SYSMODULEAUTH SYSIBM.SYSROLEAUTH SYSIBM.SYSVARIABLEAUTH SYSIBM.SYSWORKLOADAUTH SYSIBM.SYSDBAUTH SYSIBM.SYSUSERAUTH Run the following SQL statement to ensure that an audit policy is defined upon the above catalog tables and/or the database: DB2&gt; SELECT AUDITPOLICYNAME, OBJECTSCHEMA, OBJECTNAME, OBJECTTYPE FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN ('T',' ') If no rows are returned, this is a finding. If a row with the OBJECTTYPE of ' ' (Database; value is a blank) exists in the output, it is a database level policy. If a row with OBJECTTYPE of 'T' exists in the output, it is a table level policy. For each audit policy returned in the statement above, run the following SQL statement to confirm that the CONTEXT and EXECUTE categories are part of that policy: DB2&gt; SELECT AUDITPOLICYNAME, CONTEXTSTATUS, EXECUTESTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES If the values for CONTEXTSTATUS and EXECUTESTATUS are not 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding. If a database policy does not exist or does not cover CONTEXTSTATUS or EXECUTESTATUS then check if the appropriate policies are defined for all the required tables listed above. If audit policies for the required tables do not have the values for the CONTEXTSTATUS and EXECUTESTATUS columns set to 'S' (Success) or 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding.

Fix: F-14895r295078_fix

Define the audit policy using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY CATALOGAUDIT CATEGORIES CONTEXT STATUS BOTH, EXECUTE STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, apply the correct audit policy to either the database as a whole or to the specific catalog tables using one of these two statements: DB2> AUDIT DATABASE USING POLICY CATALOGAUDIT Or DB2> AUDIT TABLE <table name> USING POLICY CATALOGAUDIT Note: The Database level policy in the Check category, covered in SRG-DB2X-00-000600, generates audit events of successful/unsuccessful read attempts on views based on these catalog tables.

b
DB2 must generate audit records when unsuccessful attempts to retrieve privileges/permissions occur.
AU-12 - Medium - CCI-000172 - V-213677 - SV-213677r879561_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-000900
Vuln IDs
  • V-213677
  • V-74443
Rule IDs
  • SV-213677r879561_rule
  • SV-89117
Under some circumstances, it may be useful to monitor who/what is reading privilege/permission/role information. Therefore, it must be possible to configure auditing to do this. DBMSs typically make such information available through views or functions. This requirement addresses explicit requests for privilege/permission/role membership information. It does not refer to the implicit retrieval of privileges/permissions/role memberships that the DBMS continually performs to determine if any and every action on the database is permitted. To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.
Checks: C-14898r295080_chk

To monitor who/what is reading the privilege/permission/role information from catalog tables a minimum audit set of CONTEXT and EXECUTE (with data) categories on the following catalog tables are required: SYSIBM.SYSINDEXAUTH SYSIBM.SYSPLANAUTH SYSIBM.SYSPASSTHRUAUTH SYSIBM.SYSROUTINEAUTH SYSIBM.SYSSCHEMAAUTH SYSIBM.SYSSECURITYLABELACCESS SYSIBM.SYSSECURITYPOLICYEXEMPTIONS SYSIBM.SYSSEQUENCEAUTH SYSIBM.SYSSURROGATEAUTHIDS SYSIBM.SYSTABAUTH SYSIBM.SYSTBSPACEAUTH SYSIBM.SYSXSROBJECTAUTH SYSIBM.SYSCOLAUTH SYSIBM.SYSLIBRARYAUTH SYSIBM.SYSMODULEAUTH SYSIBM.SYSROLEAUTH SYSIBM.SYSVARIABLEAUTH SYSIBM.SYSWORKLOADAUTH SYSIBM.SYSDBAUTH SYSIBM.SYSUSERAUTH Run the following SQL statement to ensure that an audit policy is defined upon the above catalog tables and/or the database: DB2&gt; SELECT AUDITPOLICYNAME, OBJECTSCHEMA, OBJECTNAME, OBJECTTYPE FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN ('T',' ') If no rows are returned, this is a finding. If a row with the OBJECTTYPE of ' ' (Database; value is a blank) exists in the output, it is a database level policy. If a row with OBJECTTYPE of 'T' exists in the output, it is a table level policy. For each audit policy returned in the statement above, run the following SQL statement to confirm that the CONTEXT and EXECUTE categories are part of that policy: DB2&gt; SELECT AUDITPOLICYNAME, CONTEXTSTATUS, EXECUTESTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES If the values for CONTEXTSTATUS and EXECUTESTATUS in the database audit policy are not 'F' (Failure) or 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding. If a database policy does not exist or does not cover CONTEXTSTATUS or EXECUTESTATUS then check if the appropriate policies are defined for all the required tables listed above. If audit policies for the required tables do not have the values for the CONTEXTSTATUS and EXECUTESTATUS columns set to 'F' (Failure) or 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding.

Fix: F-14896r295081_fix

Define an audit policy using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <audit policy name> CATEGORIES CONTEXT STATUS BOTH, EXECUTE STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, apply the correct audit policy to either the database as a whole or to the specific catalog tables using one of these two statements: DB2> AUDIT DATABASE USING POLICY <audit policy name> Or DB2> AUDIT TABLE <table name> USING POLICY <audit policy name> Note: the Database level policy in the Check covered in SRG-APP-DB2X-00-000600, generates audit events of successful/unsuccessful read attempts on views based on these catalog tables.

b
DB2 must initiate session auditing upon startup.
AU-14 - Medium - CCI-001464 - V-213678 - SV-213678r879562_rule
RMF Control
AU-14
Severity
Medium
CCI
CCI-001464
Version
DB2X-00-001000
Vuln IDs
  • V-213678
  • V-74445
Rule IDs
  • SV-213678r879562_rule
  • SV-89119
Session auditing is for use when a user's activities are under investigation. To be sure of capturing all activity during those periods when session auditing is in use, it needs to be in operation for the whole time the DBMS is running.
Checks: C-14899r295083_chk

Determine whether there are any individuals for whom the organization requires session auditing. If there are none, this is not a finding. Type in the following command to check whether or not the user under investigation is being audited: DB2&gt; SELECT AUDITPOLICYNAME, OBJECTNAME, OBJECTTYPE FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN ('i',' ') If no rows are returned, this is a finding. If a row with the OBJECTTYPE of ' ' (Database; value is a blank) exists in the output, it is a database level policy. If a row with the OBJECTTYPE of 'i' exists in the output, it is a user level policy. For each audit policy returned in the statement above, run the following SQL statement to confirm that all categories are part of that policy: DB2&gt; SELECT * FROM SYSCAT.AUDITPOLICIES If there is an audit policy defined at the database level with the values for the all the audit category columns set to 'B' (Both) and the value in the ERRORTYPE column set to 'A' (Audit), EXECUTEWITHDATA to 'Y' this is not a finding. If the database policy does not exist or does not cover all the categories with ERRORTYPE column set to 'A' (Audit), EXECUTEWITHDATA to 'Y' then check if the appropriate policies are defined for all the required users. If the audit policy is defined on the users under investigation and does not have the values for all the audit category columns set to 'B' (Both) and the value in the ERRORTYPE column set to 'A' (Audit), EXECUTEWITHDATA to 'Y', this is a finding.

Fix: F-14897r295084_fix

Define an audit policy using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <user audit policy name> CATEGORIES AUDIT STATUS BOTH, CHECKING STATUS BOTH, CONTEXT STATUS BOTH, EXECUTE WITH DATA STATUS BOTH, OBJMAINT STATUS BOTH, SECMAINT STATUS BOTH, SYSADMIN STATUS BOTH, VALIDATE STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, apply the correct audit policy to either the database as a whole or to the specific user using one of these two statements: DB2> AUDIT DATABASE USING POLICY <user audit policy name> Or DB2> AUDIT USER <user name> USING POLICY <user audit policy name> Note: This requirement is to audit suspicious user activity. For a targeted session activity use the AUDIT USER command after the policy has been created. For a general database level use the AUDIT DATABASE command.

b
DB2 must produce audit records containing sufficient information to establish the outcome (success or failure) of the events.
AU-3 - Medium - CCI-000134 - V-213679 - SV-213679r879567_rule
RMF Control
AU-3
Severity
Medium
CCI
CCI-000134
Version
DB2X-00-001600
Vuln IDs
  • V-213679
  • V-74447
Rule IDs
  • SV-213679r879567_rule
  • SV-89121
Information system auditing capability is critical for accurate forensic analysis. Without information about the outcome of events, security personnel cannot make an accurate assessment as to whether an attack was successful or if changes were made to the security state of the system. Event outcomes can include indicators of event success or failure and event-specific results (e.g., the security state of the information system after the event occurred). As such, they also provide a means to measure the impact of an event and help authorized personnel to determine the appropriate response.
Checks: C-14900r295086_chk

Run the following SQL statement to confirm that all audit policies are created with STATUS='B': DB2&gt; SELECT * FROM SYSCAT.AUDITPOLICIES If any audit policy does not have the values for all the audit category columns set to 'B' (Both) and the value in the ERRORTYPE column set to 'A' (Audit), EXECUTEWITHDATA to 'Y' for Execute category audit policies, this is a finding.

Fix: F-14898r295087_fix

Drop and recreate the policy with STATUS set to ""Both"" or use ALTER POLICY to set the STATUS='B'. To drop and recreate a policy use following statements: DB2> DROP AUDIT POLICY <audit1> DB2> CREATE AUDIT POLICY <audit1> CATEGORIES < audit categories > STATUS BOTH ERROR TYPE AUDIT To alter the audit policy: DB2> ALTER AUDIT POLICY <audit1> CATEGORIES < audit categories > STATUS BOTH ERROR TYPE AUDIT Notes: Each audit record has an Event Status represented by a SQLCODE where Successful event > = 0 Failed event < 0. To generate a record for both success and failed events, all the audit policies should be created with STATUS 'BOTH'. CREATE AUDIT POLICY information: http://www-01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.doc/doc/r0050607.html?lang=en ALTER AUDIT POLICY information: http://www-01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.doc/doc/r0050608.html?cp=SSEPGG_10.5.0%2F2-12-7-7&lang=en"

b
DB2 must include additional, more detailed, organization-defined information in the audit records for audit events identified by type, location, or subject.
AU-3 - Medium - CCI-000135 - V-213680 - SV-213680r879569_rule
RMF Control
AU-3
Severity
Medium
CCI
CCI-000135
Version
DB2X-00-001800
Vuln IDs
  • V-213680
  • V-74449
Rule IDs
  • SV-213680r879569_rule
  • SV-89123
Information system auditing capability is critical for accurate forensic analysis. Reconstruction of harmful events or forensic analysis is not possible if audit records do not contain enough information. To support analysis, some types of events will need information to be logged that exceeds the basic requirements of event type, time stamps, location, source, outcome, and user identity. If additional information is not available, it could negatively impact forensic investigations into user actions or other malicious events. The organization must determine what additional information is required for complete analysis of the audited events. The additional information required is dependent on the type of information (e.g., sensitivity of the data and the environment within which it resides). At a minimum, the organization must employ either full-text recording of privileged commands or the individual identities of group users, or both. The organization must maintain audit trails in sufficient detail to reconstruct events to determine the cause and impact of compromise. Examples of detailed information the organization may require in audit records are full-text recording of privileged commands or the individual identities of group account users.
Checks: C-14901r295089_chk

Check with the ISSO if any more of the organization-defined information needs to be captured as part of DBMS auditing. If there is additional information that needs to be captured and is currently not being written to audit logs, this is a finding.

Fix: F-14899r295090_fix

Configure the application to write the organization-defined information to a database table. Set the auditing for the database table capturing the organization-defined information so that it is written to the database audit. Define an audit policy with the needed subset using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <table audit policy name> CATEGORIES CONTEXT STATUS BOTH, EXECUTE STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, apply the policy created to the database: DB2> AUDIT TABLE <org info table> using <audit policy name>

b
Unless it has been determined that availability is paramount, DB2 must, upon audit failure, cease all auditable activity.
AU-5 - Medium - CCI-000140 - V-213681 - SV-213681r879571_rule
RMF Control
AU-5
Severity
Medium
CCI
CCI-000140
Version
DB2X-00-001900
Vuln IDs
  • V-213681
  • V-74451
Rule IDs
  • SV-213681r879571_rule
  • SV-89125
It is critical that when the DBMS is at risk of failing to process audit logs as required, it take action to mitigate the failure. Audit processing failures include: software/hardware errors; failures in the audit capturing mechanisms; and audit storage capacity being reached or exceeded. Responses to audit failure depend upon the nature of the failure mode. When the need for system availability does not outweigh the need for a complete audit trail, the DBMS should cease production of audit records immediately, rolling back all in-flight transactions. DB2 does this when configured to track audit errors. Systems where audit trail completeness is paramount will most likely be at a lower MAC level than MAC I; the final determination is the prerogative of the application owner, subject to Authorizing Official concurrence. In any case, sufficient auditing resources must be allocated to avoid a shutdown in all but the most extreme situations.
Checks: C-14902r295092_chk

Ask the ISSO whether the system should stay available or stop processing the auditable events. If the system needs to stay available and the Error Type is set to 'A' for the policies then this is not applicable (NA). Run the following SQL statement to find the Error type value for all audit policies: DB2&gt; SELECT * FROM SYSCAT.AUDITPOLICIES If the system needs to stop processing the auditable events and Error Type is not set to 'A' then this is a finding.

Fix: F-14900r295093_fix

Drop and recreate the policy with ERROR TYPE as required by the ISSO or run the ALTER AUDIT POLICY command to set the ERROR TYPE as per ISSO requirement. Run the following command to drop and recreate the policy: DB2> DROP AUDIT POLICY <audit2> DB2> CREATE AUDIT POLICY <audit2> CATEGORIES EXECUTE WITH DATA STATUS BOTH ERROR TYPE AUDIT To alter the audit policy: DB2> ALTER AUDIT POLICY <audit2> CATEGORIES EXECUTE WITH DATA STATUS BOTH ERROR TYPE AUDIT

b
The audit information produced by DB2 must be protected from unauthorized read access.
AU-9 - Medium - CCI-000162 - V-213682 - SV-213682r879576_rule
RMF Control
AU-9
Severity
Medium
CCI
CCI-000162
Version
DB2X-00-002200
Vuln IDs
  • V-213682
  • V-74453
Rule IDs
  • SV-213682r879576_rule
  • SV-89127
If audit data were to become compromised, then competent forensic analysis and discovery of the true source of potentially malicious system activity is difficult, if not impossible, to achieve. In addition, access to audit records provides information an attacker could potentially use to his or her advantage. To ensure the veracity of audit data, the information system and/or the application must protect audit information from any and all unauthorized access. This includes read, write, copy, etc. This requirement can be achieved through multiple methods which will depend upon system architecture and design. Some commonly employed methods include ensuring log files enjoy the proper file system permissions utilizing file system protections and limiting log data location. Additionally, applications with user interfaces to audit records should not allow for the unfettered manipulation of or access to those records via the application. If the application provides access to the audit data, the application becomes accountable for ensuring that audit information is protected from unauthorized access. Audit information includes all information (e.g., audit records, audit settings, and audit reports) needed to successfully audit information system activity.
Checks: C-14903r295095_chk

Run db2audit command to find the value of datapath where the audit logs are stored. $db2audit describe Only the instance owner needs write access to directory and users authorized to archive the audit logs need to have read access to audit directory. If any user other than the instance owner has write access to audit directory, this is a finding. If any user other than the users authorized to read audit log files have read access to audit directory, this is a finding.

Fix: F-14901r295096_fix

Remove the write permission from non-instance owner users on the audit directory. Remove the read permission from non-authorized users from audit directory. Only the instance owner needs write access to directory and users authorized to archive the audit logs need to have read access to audit directory. Change the permissions on audit datapath and archivepath directories so that only the instance owner has write access on datapath and users with audit archive privileges have read access on datapath. Only users with SYSADM and SECADM privileges and can extract and archive the audit logs.

b
The audit information produced by DB2 must be protected from unauthorized modification.
AU-9 - Medium - CCI-000163 - V-213683 - SV-213683r879577_rule
RMF Control
AU-9
Severity
Medium
CCI
CCI-000163
Version
DB2X-00-002300
Vuln IDs
  • V-213683
  • V-74455
Rule IDs
  • SV-213683r879577_rule
  • SV-89129
If audit data were to become compromised, then competent forensic analysis and discovery of the true source of potentially malicious system activity is impossible to achieve. To ensure the veracity of audit data the information system and/or the application must protect audit information from unauthorized modification. This requirement can be achieved through multiple methods that will depend upon system architecture and design. Some commonly employed methods include ensuring log files enjoy the proper file system permissions and limiting log data locations. Applications providing a user interface to audit data will leverage user permissions and roles identifying the user accessing the data and the corresponding rights that the user enjoys in order to make access decisions regarding the modification of audit data. Audit information includes all information (e.g., audit records, audit settings, and audit reports) needed to successfully audit information system activity. Modification of database audit data could mask the theft of, or the unauthorized modification of, sensitive data stored in the database.
Checks: C-14904r295098_chk

Run the db2audit command to find the value of the datapath where the audit logs are stored. $db2audit describe Only the instance owner needs write access to directory and users authorized to archive the audit logs need to have read access to the audit directory. If any user other than the instance owner has write access to the audit directory, this is a finding. If any user other than the users authorized to read audit log files have read access to audit directory, this is a finding.

Fix: F-14902r295099_fix

At the operating system level, remove the write permission from non-instance owner users on the audit directory. At the operating system level, remove the read permission from non-authorized users on the audit directory.

b
The audit information produced by DB2 must be protected from unauthorized deletion.
AU-9 - Medium - CCI-000164 - V-213684 - SV-213684r879578_rule
RMF Control
AU-9
Severity
Medium
CCI
CCI-000164
Version
DB2X-00-002400
Vuln IDs
  • V-213684
  • V-74457
Rule IDs
  • SV-213684r879578_rule
  • SV-89131
If audit data were to become compromised, then competent forensic analysis and discovery of the true source of potentially malicious system activity is impossible to achieve. To ensure the veracity of audit data, the information system and/or the application must protect audit information from unauthorized deletion. This requirement can be achieved through multiple methods which will depend upon system architecture and design. Some commonly employed methods include: ensuring log files enjoy the proper file system permissions utilizing file system protections; restricting access; and backing up log data to ensure log data is retained. Applications providing a user interface to audit data will leverage user permissions and roles identifying the user accessing the data and the corresponding rights the user enjoys in order make access decisions regarding the deletion of audit data. Audit information includes all information (e.g., audit records, audit settings, and audit reports) needed to successfully audit information system activity. Deletion of database audit data could mask the theft of, or the unauthorized modification of, sensitive data stored in the database.
Checks: C-14905r295101_chk

Run the db2audit command to find the value of the datapath where the audit logs are stored. $db2audit describe Only the instance owner needs write access to directory and users authorized to archive the audit logs need to have read access to the audit directory. If any user other than the instance owner has write access to audit directory, this is a finding. If any user other than the users authorized to read audit log files have read access to the audit directory, this is a finding.

Fix: F-14903r295102_fix

At the operating system level, remove the write permission from non-instance owner users on the audit directory. At the operating system level, remove the read permission from non-authorized users on the audit directory.

b
DB2 must protect its audit features from unauthorized access.
AU-9 - Medium - CCI-001493 - V-213685 - SV-213685r879579_rule
RMF Control
AU-9
Severity
Medium
CCI
CCI-001493
Version
DB2X-00-002500
Vuln IDs
  • V-213685
  • V-74459
Rule IDs
  • SV-213685r879579_rule
  • SV-89133
Protecting audit data also includes identifying and protecting the tools used to view and manipulate log data. Depending upon the log format and application, system and application log tools may provide the only means to manipulate and manage application and system log data. It is, therefore, imperative that access to audit tools be controlled and protected from unauthorized access. Applications providing tools to interface with audit data will leverage user permissions and roles identifying the user accessing the tools and the corresponding rights the user enjoys in order make access decisions regarding the access to audit tools. Audit tools include, but are not limited to, OS-provided audit tools, vendor-provided audit tools, and open source audit tools needed to successfully view and manipulate audit information system activity and records. If an attacker were to gain access to audit tools, he could analyze audit logs for system weaknesses or weaknesses in the auditing itself. An attacker could also manipulate logs to hide evidence of malicious activity.
Checks: C-14906r295104_chk

Run the following command to find the value of the SYSADM_GROUP parameter: $db2 get dbm cfg Only authorized OS users should be part of this group. If non-authorized users are part of SYSADM_GROUP group, this is a finding. On Windows systems, if the SYSADM_GROUP database manager configuration parameter is not specified, this is a finding. Security administrator (who holds SECADM authority within a database) can define audit policies and control the audit requirements for an individual database. The security administrator can use the following audit routines to operate upon the database audit logs: - The SYSPROC.AUDIT_ARCHIVE stored procedure archives audit logs. - The SYSPROC.AUDIT_LIST_LOGS table function allows you to locate logs of interest. - The SYSPROC.AUDIT_DELIM_EXTRACT stored procedure extracts data into delimited files for analysis. The security administrator can also grant EXECUTE privilege on these routines to another user. Run the following query to find out which users have SECADM authority in database: DB2&gt; SELECT CHAR(GRANTOR,35) AS GRANTOR, CHAR(GRANTEE,35) AS GRANTEE, GRANTEETYPE FROM SYSCAT.DBAUTH WHERE SECURITYADMAUTH='Y' If GRANTEETYPE is 'U' and the authorization ID is not an authorized user, this is a finding. If the GRANTEETYPE is 'G', then all members of the external group identified by GRANTEE must be authorized users. Otherwise, this is a finding. If the GRANTEETYPE is 'R', then all members of the database role identified by GRANTEE must be authorized users. Otherwise, this is a finding. The members of a role can be found using this statement: DB2&gt; SELECT CHAR(GRANTOR,35) AS GRANTOR, CHAR(GRANTEE,35) AS GRANTEE, GRANTEETYPE FROM SYSCAT.ROLEAUTH WHERE ROLENAME= &lt;search role name&gt; Run the following query to find out which users have execute privilege on SYSPROC.AUDIT_ARCHIVE, SYSPROC.AUDIT_LIST_LOGS, SYSPROC.AUDIT_DELIM_EXTRACT: DB2&gt; SELECT * FROM SYSCAT.ROUTINEAUTH WHERE SPECIFICNAME LIKE 'AUDIT%' AND SCHEMA='SYSPROC' If non-authorized users have EXECUTE privilege on any of the above three routines, this is a finding.

Fix: F-14904r295105_fix

Update the value SYSADM_GROUP to a group which has only members approved by ISSM using following command: $db2 update dbm cfg using SYSADM_GROUP <SYSADMIN GROUP> Remove unauthorized users from the SYSADM_GROUP using the operating system tools/commands. Revoke SECADM authority from non-authorized users using the SQL statement below: DB2> REVOKE SECADM ON DATABASE FROM USER <user name> Remove non-authorized members or revoke SECADM from the group or role using this SQL statement: DB2> REVOKE SECADM ON DATABASE FROM GROUP <group name> DB2> REVOKE SECADM ON DATABASE FROM ROLE <role name> Revoke execute from non-authorized users if they have execute on SYSPROC.AUDIT_ARCHIVE, SYSPROC.AUDIT_LIST_LOGS, SYSPROC.AUDIT_DELIM_EXTRACT using the appropriate variation of the Revoke (routine privileges) statement.

b
DB2 must protect its audit configuration from unauthorized modification.
AU-9 - Medium - CCI-001494 - V-213686 - SV-213686r879580_rule
RMF Control
AU-9
Severity
Medium
CCI
CCI-001494
Version
DB2X-00-002600
Vuln IDs
  • V-213686
  • V-74461
Rule IDs
  • SV-213686r879580_rule
  • SV-89135
Protecting audit data also includes identifying and protecting the tools used to view and manipulate log data. Therefore, protecting audit tools is necessary to prevent unauthorized operation on audit data. Applications providing tools to interface with audit data will leverage user permissions and roles identifying the user accessing the tools and the corresponding rights the user enjoys in order make access decisions regarding the modification of audit tools. Audit tools include, but are not limited to, vendor-provided and open source audit tools needed to successfully view and manipulate audit information system activity and records. Audit tools include custom queries and report generators.
Checks: C-14907r295107_chk

Run the following command to find the value of the SYSADM_GROUP parameter: $db2 get dbm cfg Only authorized OS users should be part of this group. If non-authorized users are part of SYSADM_GROUP group, this is a finding. On Windows systems, if the SYSADM_GROUP database manager configuration parameter is not specified, this is a finding. The security administrator (who holds SECADM authority within a database) can define audit policies and control the audit requirements for an individual database. The security administrator can use the following audit routines to operate upon the database audit logs: - The SYSPROC.AUDIT_ARCHIVE stored procedure archives audit logs. - The SYSPROC.AUDIT_LIST_LOGS table function allows you to locate logs of interest. - The SYSPROC.AUDIT_DELIM_EXTRACT stored procedure extracts data into delimited files for analysis. The security administrator can also grant EXECUTE privilege on these routines to another user. Run the following query to find out which users have SECADM authority in the database: DB2&gt; SELECT CHAR(GRANTOR,35) AS GRANTOR, CHAR(GRANTEE,35) AS GRANTEE, GRANTEETYPE FROM SYSCAT.DBAUTH WHERE SECURITYADMAUTH='Y' If GRANTEETYPE is 'U' and the authorization ID is not an authorized user, this is a finding. If the GRANTEETYPE is 'G', then all members of the external group identified by GRANTEE must be authorized users; otherwise, this is a finding. If the GRANTEETYPE is 'R', then all members of the database role identified by GRANTEE must be authorized users; otherwise, this is a finding. The members of a role can be found using this statement: DB2&gt; SELECT CHAR(GRANTOR,35) AS GRANTOR, CHAR(GRANTEE,35) AS GRANTEE, GRANTEETYPE FROM SYSCAT.ROLEAUTH WHERE ROLENAME= &lt;search role name&gt; Run the following query to find out which users have execute privilege on SYSPROC.AUDIT_ARCHIVE, SYSPROC.AUDIT_LIST_LOGS, SYSPROC.AUDIT_DELIM_EXTRACT: DB2&gt; SELECT * FROM SYSCAT.ROUTINEAUTH WHERE SPECIFICNAME LIKE 'AUDIT%' AND SCHEMA='SYSPROC' If non-authorized users have EXECUTE privilege on any of the above three routines, this is a finding.

Fix: F-14905r295108_fix

Update the value of SYSADM_GROUP to a group which has only authorized members. $db2 update dbm cfg using SYSADM_GROUP <SYSADMIN GROUP> Remove unauthorized users from the SYSADM_GROUP using the operating system tools/commands. Revoke SECADM authority from non-authorized users using the SQL statement below: DB2> REVOKE SECADM ON DATABASE FROM USER <user name> Remove non-authorized members or revokes SECADM from the group or role using this SQL statement: DB2> REVOKE SECADM ON DATABASE FROM GROUP <group name> DB2> REVOKE SECADM ON DATABASE FROM ROLE <role name> Revoke execute from non-authorized users if they have execute on SYSPROC.AUDIT_ARCHIVE, SYSPROC.AUDIT_LIST_LOGS, SYSPROC.AUDIT_DELIM_EXTRACT using the appropriate variation of the Revoke (routine privileges) statement.

b
DB2 must protect its audit features from unauthorized removal.
AU-9 - Medium - CCI-001495 - V-213687 - SV-213687r879581_rule
RMF Control
AU-9
Severity
Medium
CCI
CCI-001495
Version
DB2X-00-002700
Vuln IDs
  • V-213687
  • V-74463
Rule IDs
  • SV-213687r879581_rule
  • SV-89137
Protecting audit data also includes identifying and protecting the tools used to view and manipulate log data. Therefore, protecting audit tools is necessary to prevent unauthorized operation on audit data. Applications providing tools to interface with audit data will leverage user permissions and roles identifying the user accessing the tools and the corresponding rights the user enjoys in order make access decisions regarding the deletion of audit tools. Audit tools include, but are not limited to, vendor-provided and open source audit tools needed to successfully view and manipulate audit information system activity and records. Audit tools include custom queries and report generators.
Checks: C-14908r295110_chk

Run the following command to find the value of the SYSADM_GROUP parameter: $db2 get dbm cfg Only authorized OS users should be part of this group. If non-authorized users are part of the SYSADM_GROUP group, this is a finding. On Windows systems, if the SYSADM_GROUP database manager configuration parameter is not specified, this is a finding. The security administrator (who holds SECADM authority within a database) can define audit policies and control the audit requirements for an individual database. The security administrator can use the following audit routines to operate upon the database audit logs: - The SYSPROC.AUDIT_ARCHIVE stored procedure archives audit logs. - The SYSPROC.AUDIT_LIST_LOGS table function allows you to locate logs of interest. - The SYSPROC.AUDIT_DELIM_EXTRACT stored procedure extracts data into delimited files for analysis. The security administrator can also grant EXECUTE privilege on these routines to another user. Run the following query to find out which users have SECADM authority in database: DB2&gt; SELECT CHAR(GRANTOR,35) AS GRANTOR, CHAR(GRANTEE,35) AS GRANTEE, GRANTEETYPE FROM SYSCAT.DBAUTH WHERE SECURITYADMAUTH='Y' If GRANTEETYPE is 'U' and the authorization ID is not an authorized user, this is a finding. If the GRANTEETYPE is 'G', then all members of the external group identified by GRANTEE must be authorized users, otherwise, this is a finding. If the GRANTEETYPE is 'R', then all members of the database role identified by GRANTEE must be authorized users, otherwise, this is a finding. The members of a role can be found using this statement: DB2&gt; SELECT CHAR(GRANTOR,35) AS GRANTOR, CHAR(GRANTEE,35) AS GRANTEE, GRANTEETYPE FROM SYSCAT.ROLEAUTH WHERE ROLENAME= &lt;search role name&gt; Run the following query to find out which users have execute privilege on SYSPROC.AUDIT_ARCHIVE, SYSPROC.AUDIT_LIST_LOGS, SYSPROC.AUDIT_DELIM_EXTRACT: DB2&gt; SELECT * FROM SYSCAT.ROUTINEAUTH WHERE SPECIFICNAME LIKE 'AUDIT%' AND SCHEMA='SYSPROC' If non-authorized users have EXECUTE privilege on any of above three routines, this is a finding.

Fix: F-14906r295111_fix

Update the value of SYSADM_GROUP to a group which has only authorized members. $db2 update dbm cfg using SYSADM_GROUP <SYSADMIN GROUP> Remove unauthorized users from the SYSADM_GROUP using the operating system tools/commands. Revoke SECADM authority from non-authorized users using the SQL statement below: DB2> REVOKE SECADM ON DATABASE FROM USER <user name> Remove non-authorized members or revokes SECADM from the group or role using this SQL statement: DB2> REVOKE SECADM ON DATABASE FROM GROUP <group name> DB2> REVOKE SECADM ON DATABASE FROM ROLE <role name> Revoke execute from non-authorized users if they have execute on SYSPROC.AUDIT_ARCHIVE, SYSPROC.AUDIT_LIST_LOGS, SYSPROC.AUDIT_DELIM_EXTRACT using the appropriate variation of Revoke (routine privileges) statement.

b
DB2 must limit privileges to change software modules, to include stored procedures, functions and triggers, and links to software external to DB2.
CM-5 - Medium - CCI-001499 - V-213688 - SV-213688r879586_rule
RMF Control
CM-5
Severity
Medium
CCI
CCI-001499
Version
DB2X-00-002800
Vuln IDs
  • V-213688
  • V-74465
Rule IDs
  • SV-213688r879586_rule
  • SV-89139
If the system were to allow any user to make changes to software libraries, then those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process. Accordingly, only qualified and authorized individuals shall be allowed to obtain access to information system components for purposes of initiating changes, including upgrades and modifications. Unmanaged changes that occur to the database software libraries or configuration can lead to unauthorized or compromised installations.
Checks: C-14909r295113_chk

Use the following query to find who has privileges to alter, drop, and create objects in the schemas: DB2&gt; SELECT * FROM SYSCAT.SCHEMAAUTH If non-authorized users have privileges to create, alter, or drop objects, this is a finding.

Fix: F-14907r295114_fix

Use the appropriate variation of REVOKE (schema privileges) statement to remove the privileges from unauthorized users/roles/groups: DB2> REVOKE <ALTERIN/CREATEIN/DROPIN> ON SCHEMA <schema-name> FROM <USER/GROUP/PUBLIC/ROLE> For more on this topic, see the Help page on "REVOKE (schema privileges) statement": http://www.ibm.com/support/knowledgecenter/en/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.doc/doc/r0000988.html

b
The OS must limit privileges to change the DB2 software resident within software libraries (including privileged programs).
CM-5 - Medium - CCI-001499 - V-213689 - SV-213689r879586_rule
RMF Control
CM-5
Severity
Medium
CCI
CCI-001499
Version
DB2X-00-002900
Vuln IDs
  • V-213689
  • V-74467
Rule IDs
  • SV-213689r879586_rule
  • SV-89141
If the system were to allow any user to make changes to software libraries, then those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process. Accordingly, only qualified and authorized individuals shall be allowed to obtain access to information system components for purposes of initiating changes, including upgrades and modifications. Unmanaged changes that occur to the database software libraries or configuration can lead to unauthorized or compromised installations.
Checks: C-14910r295116_chk

Run the db2level command to find the installation directory of DB2 server software: $db2level If any user other than the sysadmin and root users has write permission on these directories and subsequent subdirectories under this directory, this is a finding. On Linux and UNIX operating systems, the instance directory is located in the $INSTHOME/sqllib directory, where $INSTHOME is the home directory of the instance owner. On Windows operating systems, the instance directory is located under the /sqllib directory where the DB2 database product was installed. If any user other than the instance owner and the root user has write permission to instance home directory and subsequent subdirectories under it, this is a finding.

Fix: F-14908r295117_fix

Remove the write permission from non-root, non-sysadmin users on the DB2 installation base directory and instance home directory.

b
The DB2 software installation account must be restricted to authorized users.
CM-5 - Medium - CCI-001499 - V-213690 - SV-213690r879586_rule
RMF Control
CM-5
Severity
Medium
CCI
CCI-001499
Version
DB2X-00-003000
Vuln IDs
  • V-213690
  • V-74469
Rule IDs
  • SV-213690r879586_rule
  • SV-89143
When dealing with change control issues, it should be noted any changes to the hardware, software, and/or firmware components of the information system and/or application can have significant effects on the overall security of the system. If the system were to allow any user to make changes to software libraries, then those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process. Accordingly, only qualified and authorized individuals shall be allowed access to information system components for purposes of initiating changes, including upgrades and modifications. DBA and other privileged administrative or application owner accounts are granted privileges that allow actions that can have a great impact on database security and operation. It is especially important to grant privileged access to only those persons who are qualified and authorized to use them.
Checks: C-14911r295119_chk

Review procedures for controlling, granting access to, and tracking use of the DBMS software installation account. If access or use of this account is not restricted to the minimum number of personnel required or if unauthorized access to the account has been granted, this is a finding.

Fix: F-14909r295120_fix

Develop, document, and implement procedures to restrict and track use of the DBMS software installation account.

b
Database software, including DBMS configuration files, must be stored in dedicated directories, separate from the host OS and other applications.
CM-5 - Medium - CCI-001499 - V-213691 - SV-213691r879586_rule
RMF Control
CM-5
Severity
Medium
CCI
CCI-001499
Version
DB2X-00-003100
Vuln IDs
  • V-213691
  • V-74471
Rule IDs
  • SV-213691r879586_rule
  • SV-89145
When dealing with change control issues, it should be noted any changes to the hardware, software, and/or firmware components of the information system and/or application can potentially have significant effects on the overall security of the system. Multiple applications can provide a cumulative negative effect. A vulnerability and subsequent exploit to one application can lead to an exploit of other applications sharing the same security context. For example, an exploit to a web server process that leads to unauthorized administrative access to host system directories can most likely lead to a compromise of all applications hosted by the same system. Database software not installed using dedicated directories both threatens and is threatened by other hosted applications. Access controls defined for one application may by default provide access to the other application's database objects or directories. Any method that provides any level of separation of security context assists in the protection between applications.
Checks: C-14912r295122_chk

The base installation directory of the database server software and the instance home directory location is configurable at the time of installation. Run the db2ls command to find the installation directory of DB2 server software. The environment variable INSTHOME points to instance home directory. If there are non-DB2-related files in the instance home directory and the subsequent subdirectories under it, this is a finding. If there are non-DB2-related files in the DB2 install directory and the subsequent subdirectories under it, this is a finding.

Fix: F-14910r295123_fix

Remove the non-DB2 software from instance home directory and subdirectories. Remove the non-DB2 software from DB2 installation directories and subdirectories.

b
Database objects (including but not limited to tables, indexes, storage, stored procedures, functions, triggers, links to software external to DB2, etc.) must be owned by database/DBMS principals authorized for ownership.
CM-5 - Medium - CCI-001499 - V-213692 - SV-213692r879586_rule
RMF Control
CM-5
Severity
Medium
CCI
CCI-001499
Version
DB2X-00-003200
Vuln IDs
  • V-213692
  • V-74473
Rule IDs
  • SV-213692r879586_rule
  • SV-89147
Within the database, object ownership implies full privileges to the owned object, including the privilege to assign access to the owned objects to other subjects. Database functions and procedures can be coded using definer's rights. This allows anyone who utilizes the object to perform the actions if they were the owner. If not properly managed, this can lead to privileged actions being taken by unauthorized individuals. Conversely, if critical tables or other objects rely on unauthorized owner accounts, these objects may be lost when an account is removed.
Checks: C-14913r295125_chk

Get the list of authorized owners from ISSO or DBA. Use the following catalog views/queries to find the ownership of the various database objects: Select libname,owner from syscat.libraries Select modulename,owner from syscat.modules Select tabname,owner from syscat.nicknames Select pkgname,owner from syscat.packages Select routinename,owner from syscat.routines Select seqname,owner from syscat.sequences Select constname,owner from syscat.tabconst Select tabname,owner from syscat.tables Select tbspace,owner from syscat.tablespaces Select trigname,owner from syscat.triggers If any owner is not in the ISSO/DBA provided list, this is a finding.

Fix: F-14911r295126_fix

Use the list identified in check. Drop and create the objects as necessary with the correct ownership. DB2> DROP DB2> CREATE Note: For additional information regarding the DROP statement, select the following link: http://www-01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.doc/doc/r0000945.html?lang=en

b
The role(s)/group(s) used to modify database structure (including but not necessarily limited to tables, indexes, storage, etc.) and logic modules (stored procedures, functions, triggers, links to software external to DB2, etc.) must be restricted to authorized users.
CM-5 - Medium - CCI-001499 - V-213693 - SV-213693r879586_rule
RMF Control
CM-5
Severity
Medium
CCI
CCI-001499
Version
DB2X-00-003300
Vuln IDs
  • V-213693
  • V-74475
Rule IDs
  • SV-213693r879586_rule
  • SV-89149
If the DBMS were to allow any user to make changes to database structure or logic, then those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process. Accordingly, only qualified and authorized individuals shall be allowed to obtain access to information system components for purposes of initiating changes, including upgrades and modifications. Unmanaged changes that occur to the database software libraries or configuration can lead to unauthorized or compromised installations.
Checks: C-14914r295128_chk

Get the list of qualified and authorized owners from ISSO or DBA. The following view list information about privileges held by the users, the identities of users granting privileges, and the object ownership: DB2&gt; SELECT * FROM SYSIBMADM.PRIVILEGES If any of the privileges is held by non-qualified and non-authorized individuals, this is a finding.

Fix: F-14912r295129_fix

Use the appropriate variation of the REVOKE command to revoke the privileges from non-qualified and non-authorized individuals: DB2> REVOKE Notes: Information about each database is automatically maintained in a set of views called the system catalog which is created when the database is created. This system catalog describes tables, columns, indexes, programs, privileges, and other objects. information on the system catalog is available in the IBM knowledge base: http://www-01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec.doc/doc/c0005478.html?lang=en http://www-01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec.doc/doc/c0005817.html

b
Default demonstration and sample databases, database objects, and applications must be removed.
CM-7 - Medium - CCI-000381 - V-213694 - SV-213694r879587_rule
RMF Control
CM-7
Severity
Medium
CCI
CCI-000381
Version
DB2X-00-003400
Vuln IDs
  • V-213694
  • V-74477
Rule IDs
  • SV-213694r879587_rule
  • SV-89151
Information systems are capable of providing a wide variety of functions and services. Some of the functions and services, provided by default, may not be necessary to support essential organizational operations (e.g., key missions, functions). It is detrimental for software products to provide, or install by default, functionality exceeding requirements or mission objectives. Examples include, but are not limited to, installing advertising software, demonstrations, or browser plugins not related to requirements or providing a wide array of functionality, not required for every mission, that cannot be disabled. DBMSs must adhere to the principles of least functionality by providing only essential capabilities. Demonstration and sample database objects and applications present publicly known attack points for malicious users. These demonstration and sample objects are meant to provide simple examples of coding specific functions and are not developed to prevent vulnerabilities from being introduced to the DBMS and host system.
Checks: C-14915r295131_chk

Use the list db directory to see if the SAMPLE database exists. $db2 list db directory If the SAMPLE database exists, this is a finding.

Fix: F-14913r295132_fix

Run the following command to DROP the SAMPLE database: $db2 drop database sample

b
Unused database components, DBMS software, and database objects must be removed.
CM-7 - Medium - CCI-000381 - V-213695 - SV-213695r879587_rule
RMF Control
CM-7
Severity
Medium
CCI
CCI-000381
Version
DB2X-00-003500
Vuln IDs
  • V-213695
  • V-74479
Rule IDs
  • SV-213695r879587_rule
  • SV-89153
Information systems are capable of providing a wide variety of functions and services. Some of the functions and services, provided by default, may not be necessary to support essential organizational operations (e.g., key missions, functions). It is detrimental for software products to provide, or install by default, functionality exceeding requirements or mission objectives. DBMSs must adhere to the principles of least functionality by providing only essential capabilities.
Checks: C-14916r295134_chk

On UNIX/LINUX, run the db2ls command to find all install paths of DB2 on the system: $db2ls Run the db2ls command to find installed features of database on install paths: $db2ls -q -b &lt;db2 install path&gt; If there are installed features which are not required by the mission objectives and are non-essential, this is a finding. On Windows, go to Registry Editor in Windows. Then select Computer &gt;&gt; HKEY_LOCAL_MACHINE &gt;&gt; SOFTWARE &gt;&gt; IBM &gt;&gt; DB2 &gt;&gt; COMPONENTS If there are installed features which are not required by the mission objectives and are non-essential, this is a finding. Example: db2ls -q -b /opt/ibm/db2/V10.5 Install Path : /opt/ibm/db2/V10.5 Feature Response File ID Level Fix Pack Feature Description ---------------------------------------------------------------------------------------------------- BASE_CLIENT 10.5.0.7 7 Base client support JAVA_SUPPORT 10.5.0.7 7 Java support SQL_PROCEDURES 10.5.0.7 7 SQL procedures BASE_DB2_ENGINE 10.5.0.7 7 Base server support CONNECT_SUPPORT 10.5.0.7 7 Connect support DB2_DATA_SOURCE_SUPPORT 10.5.0.7 7 DB2 data source support SPATIAL_EXTENDER_SERVER_SUPPORT 10.5.0.7 7 Spatial Extender server support JDK 10.5.0.7 7 IBM Software Development Kit (SDK) for Java(TM) LDAP_EXPLOITATION 10.5.0.7 7 DB2 LDAP support INSTANCE_SETUP_SUPPORT 10.5.0.7 7 DB2 Instance Setup wizard ACS 10.5.0.7 7 Integrated Flash Copy Support SPATIAL_EXTENDER_CLIENT_SUPPORT 10.5.0.7 7 Spatial Extender client COMMUNICATION_SUPPORT_TCPIP 10.5.0.7 7 Communication support - TCP/IP APPLICATION_DEVELOPMENT_TOOLS 10.5.0.7 7 Base application development tools DB2_UPDATE_SERVICE 10.5.0.7 7 DB2 Update Service REPL_CLIENT 10.5.0.7 7 Replication tools TEXT_SEARCH 10.5.0.7 7 DB2 Text Search INFORMIX_DATA_SOURCE_SUPPORT 10.5.0.7 7 Informix data source support ORACLE_DATA_SOURCE_SUPPORT 10.5.0.7 7 Oracle data source support FIRST_STEPS 10.5.0.7 7 First Steps GUARDIUM_INST_MNGR_CLIENT 10.5.0.7 7 Guardium Installation Manager Client

Fix: F-14914r295135_fix

On UNIX/Linux, run the following db2_deinstall command to remove the non-essential features: $db2_deinstall –F <feature> Note: The db2_deinstall command is located at DB2DIR/install, where DB2DIR is the location where the current version of the DB2 database product is installed. (If uncertain of the value to provide for DB2DIR, find it using the db2level command. On Windows, run the db2unins command to remove one or more db2 product, feature or languages. >>-db2unins –p product (to remove db2 product) or >>-db2unins –u response-file (to remove db2 product, feature or languages.) Note: Use the following URL to access the knowledgebase documentation on the db2_deinstall command: http://www.ibm.com/support/knowledgecenter/en/SSEPGG_10.5.0/com.ibm.db2.luw.admin.cmd.doc/doc/r0023670.html Use the following URL to access the knowledgebase documentation on the db2unins command: http://www-01.ibm.com/support/knowledgecenter/SSEPGGman db2__10.5.0/com.ibm.db2.luw.admin.cmd.doc/doc/r0023371.html?lang=en

b
Unused database components which are integrated in DB2 and cannot be uninstalled must be disabled.
CM-7 - Medium - CCI-000381 - V-213696 - SV-213696r879587_rule
RMF Control
CM-7
Severity
Medium
CCI
CCI-000381
Version
DB2X-00-003600
Vuln IDs
  • V-213696
  • V-74481
Rule IDs
  • SV-213696r879587_rule
  • SV-89155
Information systems are capable of providing a wide variety of functions and services. Some of the functions and services, provided by default, may not be necessary to support essential organizational operations (e.g., key missions, functions). It is detrimental for software products to provide, or install by default, functionality exceeding requirements or mission objectives. DBMSs must adhere to the principles of least functionality by providing only essential capabilities. Unused, unnecessary DBMS components increase the attack vector for the DBMS by introducing additional targets for attack. By minimizing the services and applications installed on the system, the number of potential vulnerabilities is reduced. Components of the system that are unused and cannot be uninstalled must be disabled. The techniques available for disabling components will vary by DBMS product, OS and the nature of the component and may include DBMS configuration settings, OS service settings, OS file access security, and DBMS user/group permissions.
Checks: C-14917r295137_chk

Review the system security plan. Determine what DB2 features are recognized as requiring specific access controls. Determine which roles are authorized to use and which may not use the designated features. Review the permissions granted in the database. If any role is permitted to use any feature not designated as authorized, this is a finding.

Fix: F-14915r295138_fix

Use the appropriate version of the REVOKE command to remove unauthorized access to the designated features.

b
Access to external executables must be disabled or restricted.
CM-7 - Medium - CCI-000381 - V-213697 - SV-213697r879587_rule
RMF Control
CM-7
Severity
Medium
CCI
CCI-000381
Version
DB2X-00-003700
Vuln IDs
  • V-213697
  • V-74483
Rule IDs
  • SV-213697r879587_rule
  • SV-89157
Information systems are capable of providing a wide variety of functions and services. Some of the functions and services, provided by default, may not be necessary to support essential organizational operations (e.g., key missions, functions). It is detrimental for applications to provide, or install by default, functionality exceeding requirements or mission objectives. Applications must adhere to the principles of least functionality by providing only essential capabilities. DBMSs may spawn additional external processes to execute procedures that are defined in the DBMS but stored in external host files (external procedures). The spawned process used to execute the external procedure may operate within a different OS security context than the DBMS and provide unauthorized access to the host system.
Checks: C-14918r295140_chk

Use the following SQL Query to find external routines: DB2&gt; SELECT ROUTINENAME FROM SYSCAT.ROUTINES WHERE ORIGIN='E' Use the following command to find out which user has privileges to run the external routines found with last query. DB2&gt; SELECT GRANTEE FROM SYSCAT.ROUTINEAUTH If non-essential routines exist outside the database, this is a finding. If non-authorized users have privileges on external routines, this is a finding.

Fix: F-14916r295141_fix

Drop the external routines if these are non-essential for mission objective. DB2> DROP FUNCTION <name> Revoke execute privileges from non-authorized users on external routines. DB2> REVOKE EXECUTE ON FUNCTION <FUNCTION1> FROM <USER1> Note: Select the following link for the knowledgebase information on the DROP statement: http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.doc/doc/r0000945.html?cp=SSEPGG_10.5.0%2F2-12-7-129&lang=en

b
DB2 must be configured to prohibit or restrict the use of organization-defined functions, ports, protocols, and/or services, as defined in the PPSM CAL and vulnerability assessments.
CM-7 - Medium - CCI-000382 - V-213698 - SV-213698r917662_rule
RMF Control
CM-7
Severity
Medium
CCI
CCI-000382
Version
DB2X-00-003800
Vuln IDs
  • V-213698
  • V-74485
Rule IDs
  • SV-213698r917662_rule
  • SV-89159
In order to prevent unauthorized connection of devices, unauthorized transfer of information, or unauthorized tunneling (i.e., embedding of data types within data types), organizations must disable or restrict unused or unnecessary physical and logical ports/protocols/services on information systems. Applications are capable of providing a wide variety of functions and services. Some of the functions and services provided by default may not be necessary to support essential organizational operations. Additionally, it is sometimes convenient to provide multiple services from a single component (e.g., email and web services); however, doing so increases risk over limiting the services provided by any one component. To support the requirements and principles of least functionality, the application must support the organizational requirements providing only essential capabilities and limiting the use of ports, protocols, and/or services to only those required, authorized, and approved to conduct official business or to address authorized quality of life issues. Database Management Systems using ports, protocols, and services deemed unsafe are open to attack through those ports, protocols, and services. This can allow unauthorized access to the database and through the database to other components of the information system.
Checks: C-14919r917660_chk

Find out the communication protocol used by running the following command: $db2set DB2COMM If DB2 is not set to SSL, this is a finding. Run the following command to find the service names/port numbers used by the database manager: $db2 get dbm cfg Find the port numbers used by the TCP/IP and SSL services used by database manager (SVCNAME, SSL_SVCENAME) or match the service name in services file to find port numbers. Default Location for services file Windows Service File: %SystemRoot%\system32\drivers\etc\services UNIX Services File: /etc/services If ports used by the database manager are nonapproved or deemed unsafe, this is a finding.

Fix: F-14917r917661_fix

Run the following command to set the value of the DB2COMM parameter to the organization-approved communication protocol: $db2set DB2COMM=TCPIP,SSL Set the SSL version: $db2 update DBM CFG using SSL_VERSIONS TLSV12 The database manager can be set to a service name or an organization-approved port number directly for the SVCENAME parameter. Use the following command to change the database manager configuration: $db2 update dbm cfg using svcename <svcename> Or $db2 update dbm cfg using svcename <port number> Note: Configuring Secure Sockets Layer (SSL) support in a DB2 instance: https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec.doc/doc/t0025241.html

b
If passwords are used for authentication, DB2 must transmit only encrypted representations of passwords.
IA-5 - Medium - CCI-000197 - V-213699 - SV-213699r917664_rule
RMF Control
IA-5
Severity
Medium
CCI
CCI-000197
Version
DB2X-00-004100
Vuln IDs
  • V-213699
  • V-74487
Rule IDs
  • SV-213699r917664_rule
  • SV-89161
The DoD standard for authentication is DoD-approved PKI certificates. Authentication based on User ID and Password may be used only when it is not possible to employ a PKI certificate, and requires AO approval. In such cases, passwords need to be protected at all times, and encryption is the standard method for protecting passwords during transmission. DBMS passwords sent in clear text format across the network are vulnerable to discovery by unauthorized users. Disclosure of passwords may easily lead to unauthorized access to the database.
Checks: C-14920r295146_chk

Run the following command to find the value of the authentication parameter: $db2 get dbm cfg If the AUTHENTICATION parameter is not set to SERVER_ENCRYPT, this is a finding. Run the following command to find the value of the registry variable DB2AUTH: $db2set -all If the value of DB2AUTH is not set to JCC_ENFORCE_SECMEC, or DB2AUTH is not set (i.e. a row is not returned for DB2AUTH from the above command), this is a finding.

Fix: F-14918r917663_fix

Run the following command to set the value of the authentication encryption to SERVER_ENCRYPT: $db2 update dbm cfg using authentication server_encrypt Run the following db2set command to set the value of DB2AUTH to JCC_ENFORCE_SECMEC: $db2set DB2AUTH=JCC_ENFORCE_SECMEC Note: It is recommended to set the ALTERNATE_AUTH_ENC database manager configuration parameter to AES_ONLY to require that AES encryption be used.

c
Applications using the database must obscure feedback of authentication information during the authentication process to protect the information from possible exploitation/use by unauthorized individuals.
IA-6 - High - CCI-000206 - V-213700 - SV-213700r879615_rule
RMF Control
IA-6
Severity
High
CCI
CCI-000206
Version
DB2X-00-004510
Vuln IDs
  • V-213700
  • V-74489
Rule IDs
  • SV-213700r879615_rule
  • SV-89163
To prevent the compromise of authentication information, such as passwords and PINs, during the authentication process, the feedback from the information system must not provide any information that would allow an unauthorized user to compromise the authentication mechanism. Obfuscation of user-provided information when typed into the system is a method used in addressing this risk. For example, displaying asterisks when a user types in a password or PIN, is an example of obscuring feedback of authentication information. Database applications may allow for entry of the account name and password as a visible parameter of the application execution command. This practice must be prohibited and disabled to prevent shoulder surfing. This calls for the review of applications, which will require collaboration with the application developers. It is recognized that in many cases the database administrator (DBA) is organizationally separate from the application developers, and may have limited, if any, access to source code. Nevertheless, protections of this type are so important to the secure operation of databases that they must not be ignored. At a minimum, the DBA must attempt to obtain assurances from the development organization that this issue is addressed, and must document what has been discovered.
Checks: C-14921r295149_chk

Determine whether any applications that access the database allow for entry of the account name and password, or PIN. If any do, determine whether these applications obfuscate authentication data; if they do not, this is a finding.

Fix: F-14919r295150_fix

Configure or modify applications to prohibit display of passwords in clear text.

c
When using command-line tools such as db2, users must use a Connect method that does not expose the password.
IA-6 - High - CCI-000206 - V-213701 - SV-213701r879615_rule
RMF Control
IA-6
Severity
High
CCI
CCI-000206
Version
DB2X-00-004520
Vuln IDs
  • V-213701
  • V-74491
Rule IDs
  • SV-213701r879615_rule
  • SV-89165
To prevent the compromise of authentication information, such as passwords and PINs, during the authentication process, the feedback from the information system must not provide any information that would allow an unauthorized user to compromise the authentication mechanism. Obfuscation of user-provided information when typed into the system is a method used in addressing this risk. For example, displaying asterisks when a user types in a password or PIN, is an example of obscuring feedback of authentication information. "db2" and other command-line tools are part of any DB2 for LUW installation. These tools can accept a plain-text password, but do offer alternative techniques. Since the typical user of these tools is a database administrator, the consequences of password compromise are particularly serious. Therefore, the use of plain-text passwords must be prohibited, as a matter of practice and procedure.
Checks: C-14922r295152_chk

For the "db2" command, which cannot be configured not to accept a plain-text password, and any other essential tool with the same limitation, verify that the system documentation explains the need for the tool, who uses it, and any relevant mitigations; and that AO approval has been obtained; if not, this is a finding. Request evidence that all users of the tool are trained in the importance of not using the plain-text password option and in how to keep the password hidden; and that they adhere to this practice. If not, this is a finding.

Fix: F-14920r295153_fix

For the "db2" command, which cannot be configured not to accept a plain-text password, and any other essential tool with the same limitation: 1) Document the need for it, who uses it, and any relevant mitigations, and obtain AO approval. 2) Train all users of the tool in the importance of not using the plain-text password option and in how to keep the password hidden.

c
DB2 must use NIST FIPS 140-2 validated cryptographic modules for cryptographic operations.
IA-7 - High - CCI-000803 - V-213702 - SV-213702r917666_rule
RMF Control
IA-7
Severity
High
CCI
CCI-000803
Version
DB2X-00-004600
Vuln IDs
  • V-213702
  • V-74493
Rule IDs
  • SV-213702r917666_rule
  • SV-89167
Use of weak or not validated cryptographic algorithms undermines the purposes of utilizing encryption and digital signatures to protect data. Weak algorithms can be easily broken and not validated cryptographic modules may not implement algorithms correctly. Unapproved cryptographic modules or algorithms should not be relied on for authentication, confidentiality or integrity. Weak cryptography could allow an attacker to gain access to and modify data stored in the database as well as the administration settings of the DBMS. Applications, including DBMSs, utilizing cryptography are required to use approved NIST FIPS 140-2 validated cryptographic modules that meet the requirements of applicable federal laws, Executive Orders, directives, policies, regulations, standards, and guidance. The security functions validated as part of FIPS 140-2 for cryptographic modules are described in FIPS 140-2 Annex A. The cryptographic functionality in IBM DB2 for LUW includes features that are fully FIPS 140-2 validated, and others that are not. To be sure of using only FIPS 140-2 validated modules, specify SSL (TLS) for communication and IBM Database Native Encryption for data at rest. The decision whether to employ cryptography is the responsibility of the information owner/steward, who exercises discretion within the framework of applicable rules, policies, and law.
Checks: C-14923r917665_chk

If it has been determined that encryption is not required, this is not a finding. Review the cryptographic configuration. If SSL/TLS is not specified for encryption of communications, this is a finding. See below for more detailed instructions. If IBM Database Native Encryption is not specified for encryption of data at rest, this is a finding. See below for more detailed instructions. To Verify SSL is in use: Check the DB2 registry variable DB2COMM to include SSL. $db2set -all If DB2COMM does not include SSL, this is a finding. Find the value of SSL_VERSIONS by running: $db2 get dbm cfg If SSL_VERSIONS is not set to TLSV12, this is a finding. Find the value of SSL_CIPHERSPECS by running: $db2 get dbm cfg If SSL_CIPHERSPECS is not set to a symmetric algorithm key length that is greater than or equal to 112, this is a finding. Find the value of SSL_SVC_LABEL by running: $db2 get dbm cfg If the parameter SSL_SVC_LABEL is not set to a certificate with RSA key length that is greater than or equal to 2048, this is a finding. If the certificate does not have a digital signature with minimum SHA2, this is a finding. The above settings ensure that all connections over SSL in any CLP or Java application strictly adhere to NIST SP 800-131A. To Verify DB2 native encryption is being used, run the following SQL Query: DB2&gt; SELECT SUBSTR(object_name,1,8) AS NAME, SUBSTR(object_type,1,8) TYPE, SUBSTR(algorithm,1,8) ALGORITHM FROM TABLE(sysproc.admin_get_encryption_info()) If value of Algorithm is NULL for the database, this is a finding. If the database is not encrypted with native encryption or any third-party tool, this is a finding.

Fix: F-14921r295156_fix

Modify the cryptographic configuration to employ SSL/TLS for encryption of communications. Modify the cryptographic configuration to employ IBM Database Native Encryption for encryption of data at rest.

b
DB2 must separate user functionality (including user interface services) from database management functionality.
SC-2 - Medium - CCI-001082 - V-213703 - SV-213703r879631_rule
RMF Control
SC-2
Severity
Medium
CCI
CCI-001082
Version
DB2X-00-004800
Vuln IDs
  • V-213703
  • V-74495
Rule IDs
  • SV-213703r879631_rule
  • SV-89169
Information system management functionality includes functions necessary to administer databases, network components, workstations, or servers and typically requires privileged user access. The separation of user functionality from information system management functionality is either physical or logical and is accomplished by using different computers, different central processing units, different instances of the operating system, different network addresses, combinations of these methods, or other methods, as appropriate. An example of this type of separation is observed in web administrative interfaces that use separate authentication methods for users of any other information system resources. This may include isolating the administrative interface on a different domain and with additional access controls. If administrative functionality or information regarding DBMS management is presented on an interface available for users, information on DBMS settings may be inadvertently made available to the user.
Checks: C-14924r295158_chk

Run the following command to find the privileged groups and get the value of SYSADM_GROUP, SYSCTRL_GROUP, SYSMAINT_GROUP, SYSMON_GROUP: $db2 get dbm cfg If general users are part of any of above groups, this is a finding. On Windows systems, if the SYSADM_GROUP database manager configuration parameter is not specified, this is a finding. Note: On UNIX to find the members of a group from the following two files or system admin utilities provided by LINUX/UNIX vendors. /etc/passwd /etc/group e.g. if value of SYSADM_GROUP is DB2IADM1 From operating system files find out who is member of DB2IADM1 ON WINDOWS You can use lusrmgr.msc or any other OS utility to manage user group memberships.

Fix: F-14922r295159_fix

Remove general users from the privileged groups, SYSADM_GROUP, SYSCTRL_GROUP, SYSMAINT_GROUP, SYSMON_GROUP using OS utilities/interface. On Windows systems, set the SYSADM_GROUP database manager configuration parameter to the appropriate value.

b
DB2 must maintain the authenticity of communications sessions by guarding against man-in-the-middle attacks that guess at Session ID values.
SC-23 - Medium - CCI-001188 - V-213704 - SV-213704r879639_rule
RMF Control
SC-23
Severity
Medium
CCI
CCI-001188
Version
DB2X-00-005100
Vuln IDs
  • V-213704
  • V-74497
Rule IDs
  • SV-213704r879639_rule
  • SV-89171
One class of man-in-the-middle, or session hijacking, attack involves the adversary guessing at valid session identifiers based on patterns in identifiers already known. The preferred technique for thwarting guesses at Session IDs is the generation of unique session identifiers using a FIPS 140-2 approved random number generator. However, it is recognized that available DBMS products do not all implement the preferred technique yet may have other protections against session hijacking. Therefore, other techniques are acceptable, provided they are demonstrated to be effective.
Checks: C-14925r295161_chk

Ensure DB2 is using the SSL communication protocol: Run the following command to find the value of the network service: $db2 get dbm cfg TCP/IP Service name (SVCENAME) SSL service name (SSL_SVCENAME) If the port numbers are not specified, look for the port numbers in services file and find the port numbers defined for the TCP/IP service name and SSL service name (SVCENAME, SSL_SVCENAME) above. Default Location for services file: Windows Service File: %SystemRoot%\system32\drivers\etc\services UNIX Services File: /etc/services If the network protocols and ports found in previous step are not in as per PPSM guidance, this is a finding.

Fix: F-14923r295162_fix

Use the following commands to set the protocol and ports as per PPSM guidance: $db2 update dbm cfg using svcename [service_name | port_number] $db2 update dbm cfg using ssl_svcename [ssl_service_name | port_number] Note: http://www.ibm.com/support/knowledgecenter/en/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec.doc/doc/t0025241.html

b
In the event of a system failure, DB2 must preserve any information necessary to determine cause of failure and any information necessary to return to operations with least disruption to mission processes.
SC-24 - Medium - CCI-001665 - V-213705 - SV-213705r879641_rule
RMF Control
SC-24
Severity
Medium
CCI
CCI-001665
Version
DB2X-00-005300
Vuln IDs
  • V-213705
  • V-74499
Rule IDs
  • SV-213705r879641_rule
  • SV-89173
Failure to a known state can address safety or security in accordance with the mission/business needs of the organization. Failure to a known secure state helps prevent a loss of confidentiality, integrity, or availability in the event of a failure of the information system or a component of the system. Preserving information system state information helps to facilitate system restart and return to the operational mode of the organization with less disruption of mission/business processes. Since it is usually not possible to test this capability in a production environment, systems should either be validated in a testing environment or prior to installation. This requirement is normally a function of the design of the IDPS component. Compliance can be verified by acceptance/validation processes or vendor attestation.
Checks: C-14926r295164_chk

Review the system backup and recovery plan for db2 database to determine whether the database is in archive logging or circular logging, the recovery methods to be used, the backup schedule, backup media integration and the plan for testing database restoration. If any information is absent, this is a finding. Run the following command to get the details on the logging method: $db2 get db cfg If roll forward recovery is required and both logarchmeth1 and logarchmeth2 are set to value OFF then DB2 is not in archive logging, this is a finding. Run the following command to verify backup history: $db2 list history backup all for &lt;dbname&gt; Review the output of the above to see frequency and mode of backups, If the database is not being backed up per the organization’s system backup plan, this is a finding. Review evidence that database recovery is tested annually or more often per the backup and recovery document, and that the most recent test was successful. If not, this is a finding.

Fix: F-14924r295165_fix

Modify the database backup plan to include whether the database needs to be in archive logging, the correct recovery model to be used, the backup schedule, and the plan for testing the database restoration. Update db2 logging to archive logging for the database which requires roll forward recovery using the following db2 command: $db2 update db2 cfg for <database name> using LOGARCHMETH1 <value> Note: Set the value as per your online file system or backup vendor like TSM Verify and correct the scheduled backup jobs. Correct any issues that have been causing backups to fail. Test the restoration of the database at least once a year; correct any issues that cause it to fail. Maintain a record of these tests. Note: http://www.ibm.com/support/knowledgecenter/SSEPGG_10.1.0/com.ibm.db2.luw.admin.config.doc/doc/r0011448.html http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.cmd.doc/doc/r0001991.html

b
DB2 must protect the confidentiality and integrity of all information at rest.
SC-28 - Medium - CCI-001199 - V-213706 - SV-213706r879642_rule
RMF Control
SC-28
Severity
Medium
CCI
CCI-001199
Version
DB2X-00-005400
Vuln IDs
  • V-213706
  • V-74501
Rule IDs
  • SV-213706r879642_rule
  • SV-89175
This control is intended to address the confidentiality and integrity of information at rest in non-mobile devices and covers user information and system information. Information at rest refers to the state of information when it is located on a secondary storage device (e.g., disk drive, tape drive) within an organizational information system. Applications and application users generate information throughout the course of their application use. User data generated, as well as application-specific configuration data, needs to be protected. Organizations may choose to employ different mechanisms to achieve confidentiality and integrity protections, as appropriate. If the confidentiality and integrity of application data is not protected, the data will be open to compromise and unauthorized modification.
Checks: C-14927r295167_chk

If the application owner and Authorizing Official have determined that encryption of data at rest is NOT required, this is not a finding. To protect the confidentiality and integrity of information at rest, the database must be encrypted. DB2 native encryption can encrypt the data at rest; or third-party tools, like IBM Guardium, can provide encryption for data at rest. To find if a database is encrypted with DB2 native encryption, run the following SQL Query: DB2&gt; SELECT SUBSTR(OBJECT_NAME,1,8) AS NAME, SUBSTR(ALGORITHM,1,8) ALGORITHM FROM TABLE(SYSPROC.ADMIN_GET_ENCRYPTION_INFO()) WHERE OBJECT_TYPE='DATABASE' If the value of Algorithm is NULL for the database, this is a finding. If the database is not encrypted with native encryption or any third-party tool, this is a finding.

Fix: F-14925r295168_fix

To create the database using DB2 native encryption run the following command: $db2 create db <database name> encrypt Note: Select the following link for details on how to set up DB2 native encryption: http://www-01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec.doc/doc/t0061766.html?lang=en If a third-party tool is used for database encryption (IBM highly recommends using IBM Guardium) use the third-party tool's specific check and fix.

b
DB2 must isolate security functions from non-security functions.
SC-3 - Medium - CCI-001084 - V-213707 - SV-213707r879643_rule
RMF Control
SC-3
Severity
Medium
CCI
CCI-001084
Version
DB2X-00-005500
Vuln IDs
  • V-213707
  • V-74503
Rule IDs
  • SV-213707r879643_rule
  • SV-89177
An isolation boundary provides access control and protects the integrity of the hardware, software, and firmware that perform security functions. Security functions are the hardware, software, and/or firmware of the information system responsible for enforcing the system security policy and supporting the isolation of code and data on which the protection is based. Developers and implementers can increase the assurance in security functions by employing well-defined security policy models; structured, disciplined, and rigorous hardware and software development techniques; and sound system/security engineering principles. Database Management Systems typically separate security functionality from non-security functionality via separate databases or schemas. Database objects or code implementing security functionality should not be commingled with objects or code implementing application logic. When security and non-security functionality are commingled, users who have access to non-security functionality may be able to access security functionality.
Checks: C-14928r295170_chk

Determine application-specific security objects (lists of permissions, additional authentication information, stored procedures, application specific auditing, etc.) which are being housed inside DB2 database in addition to the built-in security objects. Review permissions, both direct and indirect, on the security objects, both built-in and application-specific. The following functions and views provided can help with this: DB2&gt; SELECT LIBNAME, OWNER, LIBSCHEMA FROM SYSCAT.LIBRARIES DB2&gt; SELECT MODULENAME, OWNER, MODULESCHEMA FROM SYSCAT.MODULES DB2&gt; SELECT PKGNAME, OWNER, PKGSCHEMA FROM SYSCAT.PACKAGES DB2&gt; SELECT ROUTINENAME, OWNER, ROUTINESCHEMA FROM SYSCAT.ROUTINES DB2&gt; SELECT TRIGNAME, OWNER, TRIGSCHEMA FROM SYSCAT.TRIGGERS DB2&gt; SELECT * FROM SYSIBMADM.PRIVILEGES If the database(s), schema(s) and permissions on security objects are not organized to provide effective isolation of security functions from nonsecurity functions, this is a finding.

Fix: F-14926r295171_fix

Where possible, locate security-related database objects and code in a separate database, schema, or other separate security domain from database objects and code implementing application logic. In all cases, use GRANT, REVOKE, ALTER ROLE, DROP ROLE, statements to add and remove permissions on security-related objects to provide effective isolation.

b
Database contents must be protected from unauthorized and unintended information transfer by enforcement of a data-transfer policy.
SC-4 - Medium - CCI-001090 - V-213708 - SV-213708r879649_rule
RMF Control
SC-4
Severity
Medium
CCI
CCI-001090
Version
DB2X-00-005600
Vuln IDs
  • V-213708
  • V-74505
Rule IDs
  • SV-213708r879649_rule
  • SV-89179
Applications, including DBMSs, must prevent unauthorized and unintended information transfer via shared system resources. Data used for the development and testing of applications often involves copying data from production. It is important that specific procedures exist for this process, to include the conditions under which such transfer may take place, where the copies may reside, and the rules for ensuring sensitive data are not exposed. Copies of sensitive data must not be misplaced or left in a temporary location without the proper controls.
Checks: C-14929r295173_chk

Verify there are proper procedures in place for the transfer of development/test data from production. Review any scripts or code that exists for the movement of production data to development/test and verify copies of production data are not left in unprotected locations. If there is no documented procedure for data movement from production to development/test, this is a finding. If data movement code that copies from production to development/test does exist and leaves any copies of production data in unprotected locations, this is a finding.

Fix: F-14927r295174_fix

Create and document a process for moving data from production to development/test systems and follow the process. Modify any code used for moving data from production to development/test systems to ensure copies of production data are not left in unsecured locations.

b
Access to database files must be limited to relevant processes and to authorized, administrative users.
SC-4 - Medium - CCI-001090 - V-213709 - SV-213709r879649_rule
RMF Control
SC-4
Severity
Medium
CCI
CCI-001090
Version
DB2X-00-005800
Vuln IDs
  • V-213709
  • V-74507
Rule IDs
  • SV-213709r879649_rule
  • SV-89181
Applications, including DBMSs, must prevent unauthorized and unintended information transfer via shared system resources. Permitting only DBMS processes and authorized, administrative users to have access to the files where the database resides helps ensure that those files are not shared inappropriately and are not open to backdoor access and manipulation.
Checks: C-14930r295176_chk

Review the permissions granted to users by the operating system/file system on the instance files, database files, database transaction log files, database audit log files, and database backup files. If any user/role who is not an authorized system administrator with a need to know or database administrator with a need to know, or a system account for running DBMS processes, is permitted to read/view any of these files, this is a finding. Note: When the instance and database directories are created by the DB2 database manager, the permissions are accurate and should not be changed. Use the Following queries/commands to find the locations of instance directory, database directory, transaction logs directory, archive logs directory, audit logs directory and backup files location. 1. Instance Directory On Linux and UNIX operating systems, the instance directory is located in the $INSTHOME/sqllib directory, where $INSTHOME is the home directory of the instance owner. For Windows run following command to show the parent directory of the instance directory: $db2set db2instprof e.g., for db2 instance "DB2" C:\&gt;db2set db2instprof C:\ProgramData\IBM\DB2\DB2COPY1\DB2 The instance path in this case will be C:\ProgramData\IBM\DB2\DB2COPY1\DB2 2. Database Directory For LINUX/UNIX Run Command: $db2 list db directory Go to instance home directory then under this path, there is one or more db2 node directories. The naming convention is NODExxxx, where xxxx is numeric Identifying the DB2 node number. Under the node directory, there are 3 types of subdirectories a) Same as database name. b) Database directories. The naming convention is SQLxxxxx, where xxxxx is numeric. c) SQLDBDIR, the system database directory. For Windows: Under this local database directory, the next level is based on the instance name. For example db2 instance "DB2", the path will be C:\DB2 Under this path, there is one or more db2 node directories. The naming convention is NODExxxx, where xxxx is numeric Identifying the DB2 node number. Under the node directory, there are 3 types of subdirectories a) Same as database name. b) Database directories. The naming convention is SQLxxxxx, where xxxxx is numeric. c) SQLDBDIR, the system database directory. 3. Audit Log Directory Run following command: $db2audit describe Find value of Audit Data Path and Audit Archive Path 4. Transaction Log Directory and Archive Logs Directory Run the command: $db2 get db cfg Find value of following parameters and determine the directory locations. Changed path to log files (NEWLOGPATH) Path to log files Overflow log path (OVERFLOWLOGPATH) Mirror log path (MIRRORLOGPATH) Failover log archive path (FAILARCHPATH) First log archive method (LOGARCHMETH1) Second log archive method (LOGARCHMETH2) 5. Storage Files Run following SQL queries to find the value of tablespace containers and storage paths: DB2&gt; SELECT varchar(container_name,70) as container_name, varchar(tbsp_name,20) as tbsp_name FROM TABLE(MON_GET_CONTAINER('',-2)) SELECT VARCHAR(STORAGE_GROUP_NAME, 30) AS STOGROUP, VARCHAR(DB_STORAGE_PATH, 40) AS STORAGE_PATH FROM TABLE(ADMIN_GET_STORAGE_PATHS('',-1)) 6. Backup File Location Run the following command and review the result for Location of Backups $db2 list history backup all for &lt;database name&gt;

Fix: F-14928r295177_fix

Configure the permissions granted by the operating system/file system on the database files, database transaction log files, database audit log files, and database backup files so that only relevant system accounts and authorized system administrators and database administrators with a need to know are permitted to read/view these files.

b
DB2 must check the validity of all data inputs except those specifically identified by the organization.
SI-10 - Medium - CCI-001310 - V-213710 - SV-213710r879652_rule
RMF Control
SI-10
Severity
Medium
CCI
CCI-001310
Version
DB2X-00-005900
Vuln IDs
  • V-213710
  • V-74509
Rule IDs
  • SV-213710r879652_rule
  • SV-89183
Invalid user input occurs when a user inserts data or characters into an application's data entry fields and the application is unprepared to process that data. This results in unanticipated application behavior, potentially leading to an application or information system compromise. Invalid user input is one of the primary methods employed when attempting to compromise an application. With respect to database management systems, one class of threat is known as SQL Injection, or more generally, code injection. It takes advantage of the dynamic execution capabilities of various programming languages, including dialects of SQL. Potentially, the attacker can gain unauthorized access to data, including security settings, and severely corrupt or destroy the database. Even when no such hijacking takes place, invalid input that gets recorded in the database, whether accidental or malicious, reduces the reliability and usability of the system. Available protections include data types, referential constraints, uniqueness constraints, range checking, and application-specific logic. Application-specific logic can be implemented within the database in stored procedures and triggers, where appropriate. This calls for the review of applications, which will require collaboration with the application developers. It is recognized that in many cases the database administrator (DBA) is organizationally separate from the application developers, and may have limited, if any, access to source code. Nevertheless, protections of this type are so important to the secure operation of databases that they must not be ignored. At a minimum, the DBA must attempt to obtain assurances from the development organization that this issue is addressed, and must document what has been discovered.
Checks: C-14931r295179_chk

Review DBMS code (stored procedures, functions, and triggers), application code, settings, column and field definitions, and constraints to determine whether the database is protected against invalid input. If code exists that allows invalid data to be acted upon or input into the database, this is a finding. If column/field definitions do not exist in the database, this is a finding. If columns/fields do not contain constraints and validity checking where required, this is a finding. Where a column/field is noted in the system documentation as necessarily free-form, even though its name and context suggest that it should be strongly typed and constrained, the absence of these protections is not a finding. Where a column/field is clearly identified by name, caption or context as Notes, Comments, Description, Text, etc., the absence of these protections is not a finding.

Fix: F-14929r295180_fix

Modify database code to properly validate data before it is put into the database or acted upon by the database. Modify the database to contain column/field definitions for each column/field in the database. Modify the database to contain constraints and validity checking on database columns and tables that require them for data integrity.

b
DB2 and associated applications must reserve the use of dynamic code execution for situations that require it.
SI-10 - Medium - CCI-001310 - V-213711 - SV-213711r879652_rule
RMF Control
SI-10
Severity
Medium
CCI
CCI-001310
Version
DB2X-00-006000
Vuln IDs
  • V-213711
  • V-74511
Rule IDs
  • SV-213711r879652_rule
  • SV-89185
With respect to database management systems, one class of threat is known as SQL Injection, or more generally, code injection. It takes advantage of the dynamic execution capabilities of various programming languages, including dialects of SQL. In such cases, the attacker deduces the manner in which SQL statements are being processed, either from inside knowledge or by observing system behavior in response to invalid inputs. When the attacker identifies scenarios where SQL queries are being assembled by application code (which may be within the database or separate from it) and executed dynamically, the attacker is then able to craft input strings that subvert the intent of the query. Potentially, the attacker can gain unauthorized access to data, including security settings, and severely corrupt or destroy the database. The principal protection against code injection is not to use dynamic execution except where it provides necessary functionality that cannot be utilized otherwise. Use strongly typed data items rather than general-purpose strings as input parameters to task-specific, pre-compiled stored procedures and functions (and triggers). This calls for the review of applications, which will require collaboration with the application developers. It is recognized that in many cases the database administrator (DBA) is organizationally separate from the application developers, and may have limited, if any, access to source code. Nevertheless, protections of this type are so important to the secure operation of databases that they must not be ignored. At a minimum, the DBA must attempt to obtain assurances from the development organization that this issue is addressed, and must document what has been discovered.
Checks: C-14932r295182_chk

Review DBMS source code (stored procedures, functions, triggers) and application source code, to identify cases of dynamic code execution. If dynamic code execution is employed in circumstances where the objective could practically be satisfied by static execution with strongly typed parameters, this is a finding.

Fix: F-14930r295183_fix

Where dynamic code execution is employed in circumstances where the objective could practically be satisfied by static execution with strongly typed parameters, modify the code to do so.

b
DB2 and associated applications, when making use of dynamic code execution, must scan input data for invalid values that may indicate a code injection attack.
SI-10 - Medium - CCI-001310 - V-213712 - SV-213712r879652_rule
RMF Control
SI-10
Severity
Medium
CCI
CCI-001310
Version
DB2X-00-006100
Vuln IDs
  • V-213712
  • V-74513
Rule IDs
  • SV-213712r879652_rule
  • SV-89187
With respect to database management systems, one class of threat is known as SQL Injection, or more generally, code injection. It takes advantage of the dynamic execution capabilities of various programming languages, including dialects of SQL. In such cases, the attacker deduces the manner in which SQL statements are being processed, either from inside knowledge or by observing system behavior in response to invalid inputs. When the attacker identifies scenarios where SQL queries are being assembled by application code (which may be within the database or separate from it) and executed dynamically, the attacker is then able to craft input strings that subvert the intent of the query. Potentially, the attacker can gain unauthorized access to data, including security settings, and severely corrupt or destroy the database. The principal protection against code injection is not to use dynamic execution except where it provides necessary functionality that cannot be utilized otherwise. Use strongly typed data items rather than general-purpose strings as input parameters to task-specific, pre-compiled stored procedures and functions (and triggers). When dynamic execution is necessary, ways to mitigate the risk include the following, which should be implemented both in the on-screen application and at the database level, in the stored procedures: -- Allow strings as input only when necessary. -- Rely on data typing to validate numbers, dates, etc. Do not accept invalid values. If substituting other values for them, think carefully about whether this could be subverted. -- Limit the size of input strings to what is truly necessary. -- If single quotes/apostrophes, double quotes, semicolons, equals signs, angle brackets, or square brackets will never be valid as input, reject them. -- If comment markers will never be valid as input, reject them. In SQL, these are -- or /* */ -- If HTML and XML tags, entities, comments, etc., will never be valid, reject them. -- If wildcards are present, reject them unless truly necessary. In SQL these are the underscore and the percentage sign, and the word ESCAPE is also a clue that wildcards are in use. -- If SQL key words, such as SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, ESCAPE, UNION, GRANT, REVOKE, DENY, MODIFY will never be valid, reject them. Use case-insensitive comparisons when searching for these. Bear in mind that some of these words, particularly Grant (as a person's name), could also be valid input. -- If there are range limits on the values that may be entered, enforce those limits. -- Institute procedures for inspection of programs for correct use of dynamic coding, by a party other than the developer. -- Conduct rigorous testing of program modules that use dynamic coding, searching for ways to subvert the intended use. -- Record the inspection and testing in the system documentation. -- Bear in mind that all this applies not only to screen input, but also to the values in an incoming message to a web service or to a stored procedure called by a software component that has not itself been hardened in these ways. Not only can the caller be subject to such vulnerabilities; it may itself be the attacker. This calls for the review of applications, which will require collaboration with the application developers. It is recognized that in many cases the database administrator (DBA) is organizationally separate from the application developers, and may have limited, if any, access to source code. Nevertheless, protections of this type are so important to the secure operation of databases that they must not be ignored. At a minimum, the DBA must attempt to obtain assurances from the development organization that this issue is addressed, and must document what has been discovered.
Checks: C-14933r295185_chk

Review DBMS source code (stored procedures, functions, triggers) and application source code, to identify cases of dynamic code execution. If dynamic code execution is employed in circumstances where the objective could practically be satisfied by static execution with strongly typed parameters, this is a finding.

Fix: F-14931r295186_fix

Where dynamic code execution is employed in circumstances where the objective could practically be satisfied by static execution with strongly typed parameters, modify the code to do so.

b
DB2 must provide non-privileged users with error messages that provide information necessary for corrective actions without revealing information that could be exploited by adversaries.
SI-11 - Medium - CCI-001312 - V-213713 - SV-213713r879655_rule
RMF Control
SI-11
Severity
Medium
CCI
CCI-001312
Version
DB2X-00-006200
Vuln IDs
  • V-213713
  • V-74515
Rule IDs
  • SV-213713r879655_rule
  • SV-89189
Any DBMS or associated application providing too much information in error messages on the screen or printout risks compromising the data and security of the system. The structure and content of error messages need to be carefully considered by the organization and development team. Databases can inadvertently provide a wealth of information to an attacker through improperly handled error messages. In addition to sensitive business or personal information, database errors can provide host names, IP addresses, user names, and other system information not required for troubleshooting but very useful to someone targeting the system. Carefully consider the structure/content of error messages. The extent to which information systems are able to identify and handle error conditions is guided by organizational policy and operational requirements. Information that could be exploited by adversaries includes, for example, logon attempts with passwords entered by mistake as the username, mission/business information that can be derived from (if not stated explicitly by) information recorded, and personal information, such as account numbers, social security numbers, and credit card numbers. This calls for the review of applications, which will require collaboration with the application developers. It is recognized that in many cases the database administrator (DBA) is organizationally separate from the application developers, and may have limited, if any, access to source code. Nevertheless, protections of this type are so important to the secure operation of databases that they must not be ignored. At a minimum, the DBA must attempt to obtain assurances from the development organization that this issue is addressed, and must document what has been discovered.
Checks: C-14934r295188_chk

Check DB2 settings and custom database code to verify that error messages do not contain information beyond what is needed for troubleshooting the issue. If database errors contain PII data, sensitive business data, or information useful for identifying the host system or database structure, this is a finding.

Fix: F-14932r295189_fix

Configure DB2 settings, custom database code, and associated application code not to divulge sensitive information or information useful for system identification in error messages.

b
DB2 must reveal detailed error messages only to the ISSO, ISSM, SA and DBA.
SI-11 - Medium - CCI-001314 - V-213714 - SV-213714r879656_rule
RMF Control
SI-11
Severity
Medium
CCI
CCI-001314
Version
DB2X-00-006300
Vuln IDs
  • V-213714
  • V-74517
Rule IDs
  • SV-213714r879656_rule
  • SV-89191
If the DBMS provides too much information in error logs and administrative messages to the screen, this could lead to compromise. The structure and content of error messages need to be carefully considered by the organization and development team. The extent to which the information system is able to identify and handle error conditions is guided by organizational policy and operational requirements. Some default DBMS error messages can contain information that could aid an attacker in, among others things, identifying the database type, host address, or state of the database. Custom errors may contain sensitive customer information. It is important that detailed error messages be visible only to those who are authorized to view them; that general users receive only generalized acknowledgment that errors have occurred; and that these generalized messages appear only when relevant to the user's task. For example, a message along the lines of, "An error has occurred. Unable to save your changes. If this problem persists, contact your help desk" would be relevant. A message such as "Warning: your transaction generated a large number of page splits" would likely not be relevant. Administrative users authorized to review detailed error messages typically are the ISSO, ISSM, SA and DBA. Other individuals or roles may be specified according to organization-specific needs, with DBA approval. This calls for the review of applications, which will require collaboration with the application developers. It is recognized that in many cases the database administrator (DBA) is organizationally separate from the application developers, and may have limited, if any, access to source code. Nevertheless, protections of this type are so important to the secure operation of databases that they must not be ignored. At a minimum, the DBA must attempt to obtain assurances from the development organization that this issue is addressed, and must document what has been discovered.
Checks: C-14935r295191_chk

Check DB2 settings and custom database code to determine if detailed error messages are ever displayed to unauthorized individuals. If detailed error messages are displayed to individuals not authorized to view them, this is a finding.

Fix: F-14933r295192_fix

Configure DB2 settings, custom database code, and associated application code not to display detailed error messages to those not authorized to view them.

b
DB2 must automatically terminate a user session after organization-defined conditions or trigger events requiring session disconnect.
AC-12 - Medium - CCI-002361 - V-213715 - SV-213715r879673_rule
RMF Control
AC-12
Severity
Medium
CCI
CCI-002361
Version
DB2X-00-006400
Vuln IDs
  • V-213715
  • V-74519
Rule IDs
  • SV-213715r879673_rule
  • SV-89193
This addresses the termination of user-initiated logical sessions in contrast to the termination of network connections that are associated with communications sessions (i.e., network disconnect). A logical session (for local, network, and remote access) is initiated whenever a user (or process acting on behalf of a user) accesses an organizational information system. Such user sessions can be terminated (and thus terminate user access) without terminating network sessions. Session termination ends all processes associated with a user's logical session except those batch processes/jobs that are specifically created by the user (i.e., session owner) to continue after the session is terminated. Conditions or trigger events requiring automatic session termination can include, for example, organization-defined periods of user inactivity, targeted responses to certain types of incidents, and time-of-day restrictions on information system use. This capability is typically reserved for specific cases where the system owner, data owner, or organization requires additional assurance.
Checks: C-14936r295194_chk

Run the following query to check the existing thresholds defined in database: DB2&gt; SELECT thresholdname, thresholdpredicate, maxvalue, execution FROM syscat.thresholds If there are no thresholds defined in the required categories this is a finding. Review the defined thresholds, if the thresholds are not defined per the organization policies, this is a finding. Note: Select the following link for the knowledgebase on syscat.thresholds: http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.doc/doc/r0050565.html?cp=SSEPGG_10.5.0%2F2-12-8-111

Fix: F-14934r295195_fix

Run the CREATE THRESHOLD statement to create the thresholds per organization policies. The following command is an example for creating a threshold to terminate any sessions which have been inactive for more than 5 hours: DB2> CREATE THRESHOLD MONIDLETIME FOR DATABASE ACTIVITIES ENFORCEMENT DATABASE WHEN CONNECTIONIDLETIME > 300 MINUTE STOP EXECUTION Note: Select the following link for the knowledgebase information on create threshold: http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.doc/doc/r0050563.html?lang=en

b
When supporting applications that require security labeling of data, DB2 must associate organization-defined types of security labels having organization-defined security label values with information in storage.
AC-16 - Medium - CCI-002262 - V-213716 - SV-213716r879689_rule
RMF Control
AC-16
Severity
Medium
CCI
CCI-002262
Version
DB2X-00-006600
Vuln IDs
  • V-213716
  • V-74561
Rule IDs
  • SV-213716r879689_rule
  • SV-89235
Without the association of security labels to information, there is no basis for the DBMS to make security-related access-control decisions. Security labels are abstractions representing the basic properties or characteristics of an entity (e.g., subjects and objects) with respect to safeguarding information. These labels are typically associated with internal data structures (e.g., tables, rows) within the database and are used to enable the implementation of access control and flow control policies, reflect special dissemination, handling or distribution instructions, or support other aspects of the information security policy. One example includes marking data as classified or FOUO. These security labels may be assigned manually or during data processing, but, either way, it is imperative these assignments are maintained while the data is in storage. If the security labels are lost when the data is stored, there is the risk of a data compromise. The mechanism used to support security labeling may be a feature of the DBMS product, a third-party product, or custom application code.
Checks: C-14937r295197_chk

If security labeling is not required, this is not a finding. Query the system catalog to find out the existing security labels: DB2&gt; SELECT * FROM SYSCAT.SECURITYLABELS If the required labels are not created in database this is a finding. Query the following catalog views find details of existing security labels: DB2&gt; SELECT * FROM SYSCAT.SECURITYLABELACCESS DB2&gt; SELECT * FROM SYSCAT.SECURITYLABELCOMPONENTELEMENTS DB2&gt; SELECT * FROM SYSCAT.SECURITYLABELCOMPONENTS If the security labels are not defined as per organization security policies, this is a finding.

Fix: F-14935r295198_fix

Use Create security Label statement to create the security labels: See the following example to create the components, policy and then security labels: Create the components for Security labels: DB2> CREATE SECURITY LABEL COMPONENT LEVEL ARRAY ['Top Secret', 'Secret', 'Confidential', 'Unclassified']; DB2> CREATE SECURITY LABEL COMPONENT COMPARTMENTS SET {'Collection', 'Research', 'Analysis'}; Create the Policy: DB2> CREATE SECURITY POLICY DATA_ACCESS COMPONENTS LEVEL, COMPARTMENTS WITH DB2LBACRULES; Create Security Label: DB2> CREATE SECURITY LABEL DATA_ACCESS.EMPLOYEESECLABEL COMPONENT LEVEL 'Top Secret', COMPONENT COMPARTMENTS 'Research', 'Analysis' After creating the security labels, use one of the following statements to attach the labels to the table: DB2> CREATE TABLE Or DB2> ALTER TABLE For advice and examples, see the tutorial at: https://www.ibm.com/developerworks/data/tutorials/dm0605wong/ https://www.ibm.com/developerworks/data/tutorials/dm0605wong/section2.html Note: Select the following knowledgebase link for information regarding LBAC Details: http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec.doc/doc/c0021114.html Select the following knowledgebase link for information regarding Create Security Label: http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.doc/doc/r0020026.html?cp=SSEPGG_10.5.0%2F2-12-7-94

b
When supporting applications that require security labeling of data, DB2 must associate organization-defined types of security labels having organization-defined security label values with information in process.
AC-16 - Medium - CCI-002263 - V-213717 - SV-213717r879690_rule
RMF Control
AC-16
Severity
Medium
CCI
CCI-002263
Version
DB2X-00-006700
Vuln IDs
  • V-213717
  • V-74563
Rule IDs
  • SV-213717r879690_rule
  • SV-89237
Without the association of security labels to information, there is no basis for the DBMS to make security-related access-control decisions. Security labels are abstractions representing the basic properties or characteristics of an entity (e.g., subjects and objects) with respect to safeguarding information. These labels are typically associated with internal data structures (e.g., tables, rows) within the database and are used to enable the implementation of access control and flow control policies, reflect special dissemination, handling or distribution instructions, or support other aspects of the information security policy. One example includes marking data as classified or FOUO. These security labels may be assigned manually or during data processing, but, either way, it is imperative these assignments are maintained while the data is in storage. If the security labels are lost when the data is stored, there is the risk of a data compromise. The mechanism used to support security labeling may be a feature of the DBMS product, a third-party product, or custom application code.
Checks: C-14938r295200_chk

If security labeling is not required, this is not a finding. Query the system catalog to find out the existing security labels: DB2&gt; SELECT * FROM SYSCAT.SECURITYLABELS If the required labels are not created in database this is a finding. Query the following catalog views find details of existing security labels: DB2&gt; SELECT * FROM SYSCAT.SECURITYLABELACCESS DB2&gt; SELECT * FROM SYSCAT.SECURITYLABELCOMPONENTELEMENTS DB2&gt; SELECT * FROM SYSCAT.SECURITYLABELCOMPONENTS If the security labels are not defined as per organization security policies, this is a finding.

Fix: F-14936r295201_fix

Use Create security Label statement to create the security labels: See the following example to create the components, policy and then security labels: Create the components for Security labels: DB2> CREATE SECURITY LABEL COMPONENT LEVEL ARRAY ['Top Secret', 'Secret', 'Classified', 'Unclassified']; DB2> CREATE SECURITY LABEL COMPONENT COMPARTMENTS SET {'Collection', 'Research', 'Analysis'}; Create the Policy: DB2> CREATE SECURITY POLICY DATA_ACCESS COMPONENTS LEVEL, COMPARTMENTS WITH DB2LBACRULES; Create Security Label: DB2> CREATE SECURITY LABEL DATA_ACCESS.EMPLOYEESECLABEL COMPONENT LEVEL 'Top Secret', COMPONENT COMPARTMENTS 'Research', 'Analysis' After creating the security labels, use one of the following statements to attach the labels to the table: DB2> CREATE TABLE Or DB2> ALTER TABLE For advice and examples, see the tutorial at: https://www.ibm.com/developerworks/data/tutorials/dm0605wong/ https://www.ibm.com/developerworks/data/tutorials/dm0605wong/section2.html Note: Select the following knowledgebase link for information regarding LBAC Details: http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec.doc/doc/c0021114.html Select the following knowledgebase link for information regarding Create Security Label: http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.doc/doc/r0020026.html?cp=SSEPGG_10.5.0%2F2-12-7-94

c
DB2 must prevent non-privileged users from executing privileged functions, to include disabling, circumventing, or altering implemented security safeguards/countermeasures.
AC-6 - High - CCI-002235 - V-213718 - SV-213718r879717_rule
RMF Control
AC-6
Severity
High
CCI
CCI-002235
Version
DB2X-00-007000
Vuln IDs
  • V-213718
  • V-74565
Rule IDs
  • SV-213718r879717_rule
  • SV-89239
Preventing non-privileged users from executing privileged functions mitigates the risk that unauthorized individuals or processes may gain unnecessary access to information or privileges. System documentation should include a definition of the functionality considered privileged. Depending on circumstances, privileged functions can include, for example, establishing accounts, performing system integrity checks, or administering cryptographic key management activities. Non-privileged users are individuals that do not possess appropriate authorizations. Circumventing intrusion detection and prevention mechanisms or malicious code protection mechanisms are examples of privileged functions that require protection from non-privileged users. A privileged function in the DBMS/database context is any operation that modifies the structure of the database, its built-in logic, or its security settings. This would include all Data Definition Language (DDL) statements and all security-related statements. In an SQL environment, it encompasses, but is not necessarily limited to: CREATE ALTER DROP GRANT REVOKE DENY There may also be Data Manipulation Language (DML) statements that, subject to context, should be regarded as privileged. Possible examples include: TRUNCATE TABLE; DELETE, or DELETE affecting more than n rows, for some n, or DELETE without a WHERE clause; UPDATE or UPDATE affecting more than n rows, for some n, or UPDATE without a WHERE clause; any SELECT, INSERT, UPDATE, or DELETE to an application-defined security table executed by other than a security principal. Depending on the capabilities of the DBMS and the design of the database and associated applications, the prevention of unauthorized use of privileged functions may be achieved by means of DBMS security features, database triggers, other mechanisms, or a combination of these.
Checks: C-14939r295203_chk

Review the system documentation to obtain the definition of the DB2 functionality considered privileged in the context of the system in question. Run the following command to find the privileged groups to get the value of SYSADM_GROUP, SYSCTRL_GROUP, SYSMAINT_GROUP, SYSMON_GROUP: $db2 get dbm cfg If non-privileged users are members of any of these groups, this is a finding. Run the following SQL command to find the database authorities: DB2&gt; SELECT * FROM SYSCAT.DBAUTH If non-privileged users have any database authority, this is a finding. Query the following system catalog views to find out the authorities on all database objects: SYSCAT.COLAUTH: Lists the column privileges SYSCAT.DBAUTH: Lists the database privileges SYSCAT.INDEXAUTH: Lists the index privileges SYSCAT.MODULEAUTH: Lists the module privileges SYSCAT.PACKAGEAUTH: Lists the package privileges SYSCAT.PASSTHRUAUTH: Lists the server privilege SYSCAT.ROLEAUTH: Lists the role privileges SYSCAT.ROUTINEAUTH: Lists the routine (functions, methods, and stored procedures) privileges SYSCAT.SCHEMAAUTH: Lists the schema privileges SYSCAT.SEQUENCEAUTH: Lists the sequence privileges SYSCAT.SURROGATEAUTHIDS: Lists the authorization IDs for which another authorization ID can act as a surrogate. SYSCAT.TABAUTH: Lists the table and view privileges SYSCAT.TBSPACEAUTH: Lists the table space privileges SYSCAT.VARIABLEAUTH: Lists the variable privileges SYSCAT.WORKLOADAUTH: Lists the workload privileges SYSCAT.XSROBJECTAUTH: Lists the XSR object privileges If non-privileged users have any authority, this is a finding.

Fix: F-14937r295204_fix

Use appropriate OS utility to remove the non-authorized users form privileged groups. Use REVOKE command to revoke database level or object privileges from non-authorized users. Note: The following views and table functions list information about privileges held by users, identities of users granting privileges, and object ownership: SYSCAT.COLAUTH: Lists the column privileges SYSCAT.DBAUTH: Lists the database privileges SYSCAT.INDEXAUTH: Lists the index privileges SYSCAT.MODULEAUTH: Lists the module privileges SYSCAT.PACKAGEAUTH: Lists the package privileges SYSCAT.PASSTHRUAUTH: Lists the server privilege SYSCAT.ROLEAUTH: Lists the role privileges SYSCAT.ROUTINEAUTH: Lists the routine (functions, methods, and stored procedures) privileges SYSCAT.SCHEMAAUTH: Lists the schema privileges SYSCAT.SEQUENCEAUTH: Lists the sequence privileges SYSCAT.SURROGATEAUTHIDS: Lists the authorization IDs for which another authorization ID can act as a surrogate. SYSCAT.TABAUTH: Lists the table and view privileges SYSCAT.TBSPACEAUTH: Lists the table space privileges SYSCAT.VARIABLEAUTH: Lists the variable privileges SYSCAT.WORKLOADAUTH: Lists the workload privileges SYSCAT.XSROBJECTAUTH: Lists the XSR object privileges

b
DB2 must utilize centralized management of the content captured in audit records generated by all components of DB2.
AU-3 - Medium - CCI-001844 - V-213719 - SV-213719r879729_rule
RMF Control
AU-3
Severity
Medium
CCI
CCI-001844
Version
DB2X-00-007300
Vuln IDs
  • V-213719
  • V-74567
Rule IDs
  • SV-213719r879729_rule
  • SV-89241
Without the ability to centrally manage the content captured in the audit records, identification, troubleshooting, and correlation of suspicious behavior would be difficult and could lead to a delayed or incomplete analysis of an ongoing attack. The content captured in audit records must be managed from a central location (necessitating automation). Centralized management of audit records and logs provides for efficiency in maintenance and management of records, as well as the backup and archiving of those records. The DBMS may write audit records to database tables, to files in the file system, to other kinds of local repository, or directly to a centralized log management system. Whatever the method used, it must be compatible with off-loading the records to the centralized system.
Checks: C-14940r295206_chk

Run the following command to find the location of the audit data and archive data directories: $db2audit describe If this filesystem location is not compatible with the centralized audit management system, this is a finding. If DB2 is not used in conjunction with a centralized audit management system, this is a finding.

Fix: F-14938r295207_fix

Run the following command to set the audit data directory and archive data directory to the location which is compatible with the organization's centralized system: $db2audit configure datapath <AUDIT DATA DIRECTORY > archivepath <AUDIT ARCHIVE DIRECTORY> Note: See the following knowledgebase page for information regarding extracting Audit logs to syslog for any file system other than Windows: http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.cmd.doc/doc/r0002072.html DB2 does not directly support syslog on windows. Devise an alternate method of log capture.

b
DB2 must allocate audit record storage capacity in accordance with organization-defined audit record storage requirements.
AU-4 - Medium - CCI-001849 - V-213720 - SV-213720r879730_rule
RMF Control
AU-4
Severity
Medium
CCI
CCI-001849
Version
DB2X-00-007500
Vuln IDs
  • V-213720
  • V-74569
Rule IDs
  • SV-213720r879730_rule
  • SV-89243
In order to ensure sufficient storage capacity for the audit logs, the DBMS must be able to allocate audit record storage capacity. Although another requirement (SRG-APP-000515-DB-000318) mandates that audit data be off-loaded to a centralized log management system, it remains necessary to provide space on the database server to serve as a buffer against outages and capacity limits of the off-loading mechanism. The task of allocating audit record storage capacity is usually performed during initial installation of the DBMS and is closely associated with the DBA and system administrator roles. The DBA or system administrator will usually coordinate the allocation of physical drive space with the application owner/installer and the application will prompt the installer to provide the capacity information, the physical location of the disk, or both. In determining the capacity requirements, consider such factors as: total number of users; expected number of concurrent users during busy periods; number and type of events being monitored; types and amounts of data being captured; the frequency/speed with which audit records are off-loaded to the central log management system; and any limitations that exist on the DBMS's ability to reuse the space formerly occupied by off-loaded records.
Checks: C-14941r295209_chk

Run the following command to find the location of the audit data directory: $db2audit describe Note the location of audit data directory. Check the operating system log records find out if there has been any out of space event for that location. If there has been any out of space event for audit data directory, this is a finding. Take samples of peak database activity and measure the space utilized in the audit data directory location during that time. If the audit data directory is not sized to handle the workload between audit archiving intervals this is a finding.

Fix: F-14939r295210_fix

Allocate space to the file system where the audit data directory resides.

b
DB2 must provide a warning to appropriate support staff when allocated audit record storage volume reaches 75% of maximum audit record storage capacity.
AU-5 - Medium - CCI-001855 - V-213721 - SV-213721r879732_rule
RMF Control
AU-5
Severity
Medium
CCI
CCI-001855
Version
DB2X-00-007600
Vuln IDs
  • V-213721
  • V-74571
Rule IDs
  • SV-213721r879732_rule
  • SV-89245
Organizations are required to use a central log management system, so, under normal conditions, the audit space allocated to the DBMS on its own server will not be an issue. However, space will still be required on the DBMS server for audit records in transit, and, under abnormal conditions, this could fill up. Since a requirement exists to halt processing upon audit failure, a service outage would result. If support personnel are not notified immediately upon storage volume utilization reaching 75%, they are unable to plan for storage capacity expansion. The appropriate support staff include, at a minimum, the ISSO and the DBA/SA.
Checks: C-14942r295212_chk

Use the following command to find the directory for the Audit Data Path: $db2audit describe If there is no monitoring of the Audit Data Path location at the Operating System level using OS utilities or system management utilities to send an alert at 75% space utilization, this is a finding.

Fix: F-14940r295213_fix

Use the Operating system tools or external utilities to monitor the Audit Data Path and set alerts for 75% space utilization.

b
DB2 must provide an immediate real-time alert to appropriate support staff of all audit failure events requiring real-time alerts.
AU-5 - Medium - CCI-001858 - V-213722 - SV-213722r879733_rule
RMF Control
AU-5
Severity
Medium
CCI
CCI-001858
Version
DB2X-00-007700
Vuln IDs
  • V-213722
  • V-74573
Rule IDs
  • SV-213722r879733_rule
  • SV-89247
It is critical for the appropriate personnel to be aware if a system is at risk of failing to process audit logs as required. Without a real-time alert, security personnel may be unaware of an impending failure of the audit capability, and system operation may be adversely affected. The appropriate support staff include, at a minimum, the ISSO and the DBA/SA. Alerts provide organizations with urgent messages. Real-time alerts provide these messages immediately (i.e., the time from event detection to alert occurs in seconds or less).
Checks: C-14943r295215_chk

If the audit policies are created with ERRORTYPE=Audit and if there is a failure in writing the audit event log for the policy, audit failure is logged in the diagnostic.log file and user action is not completed. Run the following statement to find the error type for each policy: DB2&gt; SELECT AUDITPOLICYNAME, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES If ERRORTYPE value is not set to 'A', this is a finding. Run the following command to monitor the database diagnostic log file for audit failure errors: $db2diag -g msg:="Write to audit log failed" If the diagnostic log file is not being monitored for audit failure errors, this is a finding.

Fix: F-14941r295216_fix

Run the following command to alter the audit policies and to set the ERRORTYPE to audit: DB2>ALTER AUDIT POLICY <DB audit policy name> CATEGORIES AUDIT STATUS BOTH ERROR TYPE AUDIT Monitor the diagnostic log file for audit failure error using the following command: $db2diag -g msg:="Write to audit log failed"

b
DB2 must prohibit user installation of logic modules (stored procedures, functions, triggers, views, etc.) without explicit privileged status.
CM-11 - Medium - CCI-001812 - V-213723 - SV-213723r879751_rule
RMF Control
CM-11
Severity
Medium
CCI
CCI-001812
Version
DB2X-00-008000
Vuln IDs
  • V-213723
  • V-74589
Rule IDs
  • SV-213723r879751_rule
  • SV-89263
Allowing regular users to install software, without explicit privileges, creates the risk that untested or potentially malicious software will be installed on the system. Explicit privileges (escalated or administrative privileges) provide the regular user with explicit capabilities and control that exceed the rights of a regular user. DBMS functionality and the nature and requirements of databases will vary; so while users are not permitted to install unapproved software, there may be instances where the organization allows the user to install approved software packages such as from an approved software repository. The requirements for production servers will be more restrictive than those used for development and research. The DBMS must enforce software installation by users based upon what types of software installations are permitted (e.g., updates and security patches to existing software) and what types of installations are prohibited (e.g., software whose pedigree with regard to being potentially malicious is unknown or suspect) by the organization). In the case of a database management system, this requirement covers stored procedures, functions, triggers, views, etc.
Checks: C-14944r295218_chk

The user needs CREATEINAUTH privileges for the schema to create objects in an existing schema. Run the following Query to find which user has privilege to create objects in schemas: DB2&gt; SELECT GRANTEE, SCHEMANAME, CREATEINAUTH, ALTERINAUTH FROM SYSCAT.SCHEMAAUTH If a non-authorized user has privilege, this is a finding. Run the following query to which user has privilege to create new schema and other objects: DB2&gt; SELECT GRANTEE, CREATETABAUTH, EXTERNALROUTINEAUTH, DBADMAUTH, IMPLSCHEMAAUTH FROM SYSCAT.DBAUTH If a non-authorized user has privilege, this is a finding.

Fix: F-14942r295219_fix

Run the REVOKE command to revoke database authorities and schema privileges from user: DB2> REVOKE CREATEIN ON SCHEMA<schema_name> FROM <user> DB2> REVOKE <db authority> ON DATABASE FROM <USER> Note: Select the following knowledgebase link for information regarding revoking database authorities: http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.doc/doc/r0000981.html?cp=SSEPGG_10.5.0%2F2-12-7-181&lang=en Select the following knowledgebase link for information regarding revoking schema privileges: http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.doc/doc/r0000988.html?cp=SSEPGG_10.5.0%2F2-12-7-189&lang=en

b
DB2 and the operating system must enforce access restrictions associated with changes to the configuration of DB2 or database(s).
CM-5 - Medium - CCI-001813 - V-213724 - SV-213724r879753_rule
RMF Control
CM-5
Severity
Medium
CCI
CCI-001813
Version
DB2X-00-008100
Vuln IDs
  • V-213724
  • V-74591
Rule IDs
  • SV-213724r879753_rule
  • SV-89265
Failure to provide logical access restrictions associated with changes to configuration may have significant effects on the overall security of the system. When dealing with access restrictions pertaining to change control, it should be noted that any changes to the hardware, software, and/or firmware components of the information system can potentially have significant effects on the overall security of the system. Accordingly, only qualified and authorized individuals should be allowed to obtain access to system components for the purposes of initiating changes, including upgrades and modifications.
Checks: C-14945r295221_chk

The base installation directory of the database server software and instance home directory location is configurable at the time of installation. Run the db2level command to find the installation directory of DB2 server software: $db2level If any user other than the sysadmin and root users has write permission on these directories and subsequent subdirectories under this directory, this is a finding. On Linux and UNIX operating systems, the instance directory is located in the $INSTHOME/sqllib directory, where $INSTHOME is the home directory of the instance owner. On Windows operating systems, the instance directory is located under the /sqllib directory where the DB2 database product was installed. If any user other than the instance owner and the root user has write permission to instance home directory and subsequent subdirectories under it, this is a finding.

Fix: F-14943r295222_fix

Remove the write permission from non-root/non-sysadmin users on the DB2 installation base directory and instance home directory.

b
DB2 must produce audit records of its enforcement of access restrictions associated with changes to the configuration of DB2 or database(s).
CM-5 - Medium - CCI-001814 - V-213725 - SV-213725r879754_rule
RMF Control
CM-5
Severity
Medium
CCI
CCI-001814
Version
DB2X-00-008200
Vuln IDs
  • V-213725
  • V-74593
Rule IDs
  • SV-213725r879754_rule
  • SV-89267
Without auditing the enforcement of access restrictions against changes to configuration, it would be difficult to identify attempted attacks and an audit trail would not be available for forensic investigation for after-the-fact actions. Enforcement actions are the methods or mechanisms used to prevent unauthorized changes to configuration settings. Enforcement action methods may be as simple as denying access to a file based on the application of file permissions (access restriction). Audit items may consist of lists of actions blocked by access restrictions or changes identified after the fact.
Checks: C-14946r295224_chk

To audit changes in configuration, the SYSADMIN category needs to be audited at both the instance level and the database level. Run the following command to ensure that the SYSADMIN category is being audited at the instance level: $db2audit describe If Log system administrator events is not set to “Both”, this is a finding. Run the following SQL statement to ensure that an audit policy exists at the database level: DB2&gt; SELECT AUDITPOLICYNAME, AUDITPOLICYID FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE = ' ' If no rows are returned, this is a finding. For the audit policy returned in the statement above, run the following SQL statement to confirm that the SYSADMIN category is part of that policy and the ERROR TYPE='A': DB2&gt; SELECT AUDITPOLICYNAME, SYSADMINSTATUS, CONTEXTSTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES WHERE AUDITPOLICYID = &lt;audit policy ID&gt; If the values for SYSADMINSTATUS and CONTEXTSTATUS are not 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding.

Fix: F-14944r295225_fix

Run the following command to set the auditing at the instance level: $db2audit configure scope sysadmin status both error type audit Run the following command to set the auditing at the database level: DB2> CREATE AUDIT POLICY <DB audit policy name> CATEGORIES SYSADMIN STATUS BOTH, CONTEXT STATUS BOTH ERROR TYPE AUDIT Run the following command if the auditing policy exists but does not include the sysadmin category: DB2> ALTER AUDIT POLICY <DB audit policy name> SYSADMIN STATUS BOTH, CONTEXT STATUS BOTH ERROR TYPE AUDIT If CREATE was used above, apply the policy created above to the database: DB2> AUDIT DATABASE USING POLICY <DB audit policy name> Note: See the following page for knowledgebase information regarding the ALTER AUDIT POLICY: http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.doc/doc/r0050608.html?lang=en

b
DB2 must disable network functions, ports, protocols, and services deemed by the organization to be nonsecure, in accord with the Ports, Protocols, and Services Management (PPSM) guidance.
CM-7 - Medium - CCI-001762 - V-213726 - SV-213726r879756_rule
RMF Control
CM-7
Severity
Medium
CCI
CCI-001762
Version
DB2X-00-008300
Vuln IDs
  • V-213726
  • V-74595
Rule IDs
  • SV-213726r879756_rule
  • SV-89269
Use of nonsecure network functions, ports, protocols, and services exposes the system to avoidable threats.
Checks: C-14947r295227_chk

Run the following command to find the value of the network service: $db2 get dbm cfg TCP/IP Service name (SVCENAME) SSL service name (SSL_SVCENAME) If the port numbers are not specified, look for the port numbers in services file and find the port numbers defined for the TCP/IP service name and SSL service name (SVCENAME, SSL_SVCENAME) above. Default Location for services file: Windows Service File: %SystemRoot%\system32\drivers\etc\services UNIX Services File: /etc/services If the network protocols and ports found in previous step are not in as per PPSM guidance, this is a finding.

Fix: F-14945r295228_fix

Use the following commands to set the protocol and ports as per PPSM guidance: $db2 update dbm cfg using svcename [service_name | port_number] $db2 update dbm cfg using ssl_svcename [ssl_service_name | port_number] Note: http://www.ibm.com/support/knowledgecenter/en/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec.doc/doc/t0025241.html

b
DB2 must only accept end entity certificates issued by DoD PKI or DoD-approved PKI Certification Authorities (CAs) for the establishment of all encrypted sessions.
SC-23 - Medium - CCI-002470 - V-213728 - SV-213728r879798_rule
RMF Control
SC-23
Severity
Medium
CCI
CCI-002470
Version
DB2X-00-008700
Vuln IDs
  • V-213728
  • V-74599
Rule IDs
  • SV-213728r879798_rule
  • SV-89273
Only DoD-approved external PKIs have been evaluated to ensure that they have security controls and identity vetting procedures in place which are sufficient for DoD systems to rely on the identity asserted in the certificate. PKIs lacking sufficient security controls and identity vetting procedures risk being compromised and issuing certificates that enable adversaries to impersonate legitimate users. The authoritative list of DoD-approved PKIs is published at http://iase.disa.mil/pki-pke/interoperability. This requirement focuses on communications protection for the DBMS session rather than for the network packet.
Checks: C-14949r295233_chk

Run the following command to find certificate details: $gsk8capicmd_64 -cert -details -db "&lt;mydbserver.kdb&gt;" -pw "&lt;PASSWORD&gt;" -label "&lt;myselfsigned&gt;" The output is displayed in a form similar to the following: -- label : myselfsigned key size : 1024 version : X509 V3 serial : 96c2db8fa769a09d -- issue:CN=myhost.mycompany.com,O=myOrganization,OU=myOrganizationUnit, L=myLocation,ST=ON,C=CA -- subject:CN=myhost.mycompany.com,O=myOrganization,OU=myOrganizationUnit, L=myLocation,ST=ON,C=CA not before : Tuesday, 24 February 2009 17:11:50 PM not after : Thursday, 25 February 2010 17:11:50 PM If the certificate is not issued by DoD PKI or DoD-approved PKI Certification Authorities (CAs), this is a finding.

Fix: F-14947r295234_fix

Create a key database and set up the digital certificates. The following command creates a key database called mydbserver.kdb and a stash file called mydbserver.sth: $gsk8capicmd_64 -keydb -create -db "mydbserver.kdb" -pw "myServerPassw0rdpw0" -stash When you create a key database, it is automatically populated with signer certificates from a few certificate authorities (CAs), such as Verisign. Add a certificate for your server to your key database. To obtain a certificate, you can either use GSKCapiCmd to create a new certificate request and submit it to a CA to be signed, or you can create a self-signed certificate for testing purposes. Following is an example of command to create a self-signed certificate with a label of myselfsigned, use the GSKCapiCmd command as shown in the following command: $gsk8capicmd_64 -cert -create -db "mydbserver.kdb" -pw "myServerPassw0rdpw0" -label "myselfsigned" -dn "CN=myhost.mycompany.com,O=myOrganization, OU=myOrganizationUnit,L=myLocation,ST=ON,C=CA" Notes: -- Use the GSKCapiCmd tool to create the key database. It must be a Certificate Management System (CMS) type key database. The GSKCapiCmd is a non-Java-based command-line tool, and Java does not need to be installed on the system to use this tool. You invoke GSKCapiCmd using the GSKCAPICMD command, as described in the GSKCapiCmd User's Guide. The path for the command is sqllib/gskit/bin on Linux and UNIX platforms, and C:\Program Files\IBM\GSK8\bin on both 32-bit and 64-bit Windows platforms. On 64-bit platforms, the 32-bit GSKit executable files and libraries are also present; in this case, the path for the command is C:\ProgramFiles (x86)\IBM\GSK8\bin. - Ensure PATH (on the Windows platform) includes the proper GSKit library path, and LIBPATH, SHLIB_PATH, or LD_LIBRARY_PATH (on UNIX or Linux platforms) include the proper GSKit library path, such as sqllib/lib64/gskit. The -stash option creates a stash file at the same path as the key database, with a file extension of .sth. At instance start-up, GSKit uses the stash file to obtain the password to the key database. To extract the certificate you created to a file, so that you can distribute it to computers running clients that will be establishing SSL connections to your DB2 server. Run the following GSKCapiCmd command extracts the certificate to a file called mydbserver.arm: $gsk8capicmd_64 -cert -extract -db "mydbserver.kdb" -pw "myServerPassw0rdpw0" -label "myselfsigned" -target "mydbserver.arm" -format ascii –fips

b
DB2 must implement cryptographic mechanisms to prevent unauthorized modification of organization-defined information at rest (to include, at a minimum, PII and classified information) on organization-defined information system components.
SC-28 - Medium - CCI-002475 - V-213729 - SV-213729r879799_rule
RMF Control
SC-28
Severity
Medium
CCI
CCI-002475
Version
DB2X-00-008800
Vuln IDs
  • V-213729
  • V-74601
Rule IDs
  • SV-213729r879799_rule
  • SV-89275
DBMSs handling data requiring "data at rest" protections must employ cryptographic mechanisms to prevent unauthorized disclosure and modification of the information at rest. These cryptographic mechanisms may be native to the DBMS or implemented via additional software or operating system/file system settings, as appropriate to the situation. Selection of a cryptographic mechanism is based on the need to protect the integrity of organizational information. The strength of the mechanism is commensurate with the security category and/or classification of the information. Organizations have the flexibility to either encrypt all information on storage devices (i.e., full disk encryption) or encrypt specific data structures (e.g., files, records, or fields). The decision whether to employ cryptography is the responsibility of the information owner/steward, who exercises discretion within the framework of applicable rules, policies, and law.
Checks: C-14950r295236_chk

Review the system documentation to determine whether the organization has defined the information at rest that is to be protected from disclosure; which must include, at a minimum, PII and classified information. If the documentation indicates no information requires such protections, this is not a finding. DB2 native encryption can encrypt the data at rest; or third-party tools, like IBM Guardium, can provide encryption for data at rest. To find if a database is encrypted with DB2 native encryption, run the following SQL Query: DB2&gt; SELECT * FROM TABLE(SYSPROC.ADMIN_GET_ENCRYPTION_INFO()) If the value of Algorithm is NULL for the database, this is a finding. If the database is not encrypted with native encryption or any third-party tool, this is a finding.

Fix: F-14948r295237_fix

To create the database using DB2 native encryption run the following command: $db2 create db <database name> encrypt See the detailed instructions in the link in the note section below to create the encrypted database. Note: Select the following link for details on how to set up DB2 native encryption: http://www-01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec.doc/doc/t0061766.html?lang=en If a third-party tool is used for database encryption (IBM highly recommends using IBM Guardium) use the third-party tool's specific check and fix.

b
DB2 must implement and/or support cryptographic mechanisms preventing the unauthorized disclosure of organization-defined information at rest on organization-defined information system components.
SC-28 - Medium - CCI-002476 - V-213730 - SV-213730r879800_rule
RMF Control
SC-28
Severity
Medium
CCI
CCI-002476
Version
DB2X-00-008900
Vuln IDs
  • V-213730
  • V-74603
Rule IDs
  • SV-213730r879800_rule
  • SV-89277
DBMSs handling data requiring "data at rest" protections must employ cryptographic mechanisms to prevent unauthorized disclosure and modification of the information at rest. These cryptographic mechanisms may be native to the DBMS or implemented via additional software or operating system/file system settings, as appropriate to the situation. Selection of a cryptographic mechanism is based on the need to protect the integrity of organizational information. The strength of the mechanism is commensurate with the security category and/or classification of the information. Organizations have the flexibility to either encrypt all information on storage devices (i.e., full disk encryption) or encrypt specific data structures (e.g., files, records, or fields). The decision whether to employ cryptography is the responsibility of the information owner/steward, who exercises discretion within the framework of applicable rules, policies, and law.
Checks: C-14951r295239_chk

Review the system documentation to determine whether the organization has defined the information at rest that is to be protected from disclosure; which must include, at a minimum, PII and classified information. If the documentation indicates no information requires such protections, this is not a finding. DB2 native encryption can encrypt the data at rest; or third-party tools, like IBM Guardium, can provide encryption for data at rest. To find if a database is encrypted with DB2 native encryption, run the following SQL Query: DB2&gt; SELECT * FROM TABLE(SYSPROC.ADMIN_GET_ENCRYPTION_INFO()) If the value of Algorithm is NULL for the database, this is a finding. If the database is not encrypted with native encryption or any third-party tool, this is a finding.

Fix: F-14949r295240_fix

To create the database using DB2 native encryption run the following command: $db2 create db mydb encrypt See the detailed instructions in link in the note section below to create the encrypted database. Note: Select the following link for details on how to set up DB2 native encryption: http://www-01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec.doc/doc/t0061766.html?lang=en If a third-party tool is used for database encryption (IBM highly recommends using IBM Guardium) use the third-party tool's specific check and fix.

b
DB2 must maintain the confidentiality and integrity of information during preparation for transmission.
SC-8 - Medium - CCI-002420 - V-213731 - SV-213731r917668_rule
RMF Control
SC-8
Severity
Medium
CCI
CCI-002420
Version
DB2X-00-009100
Vuln IDs
  • V-213731
  • V-74605
Rule IDs
  • SV-213731r917668_rule
  • SV-89279
Information can be either unintentionally or maliciously disclosed or modified during preparation for transmission, including, for example, during aggregation, at protocol transformation points, and during packing/unpacking. These unauthorized disclosures or modifications compromise the confidentiality or integrity of the information. Use of this requirement will be limited to situations where the data owner has a strict requirement for ensuring data integrity and confidentiality is maintained at every step of the data transfer and handling process. When transmitting data, the DBMS, associated applications, and infrastructure must leverage transmission protection mechanisms.
Checks: C-14952r917667_chk

The DB2 database system supports the use of Transport Layer Security (TLS) to enable a client to authenticate a server and to provide private communication between the client and server by use of encryption. Run the following command to find out what versions of TLS are supported by the server: $db2 get dbm cfg If the value of the ssl_versions parameter is not set to "TLSV1" or "TLSV12", this is a finding. Check the value of the DB2COMM parameter using the following command: $db2set -all If the value of DB2COMM is not set to "SSL", this is a finding. Note: When this topic mentions SSL, the same information applies to TLS unless otherwise noted.

Fix: F-14950r295243_fix

Run the following DB2 command to set the value of ssl_versions to approved TLS or SSL version: $db2 update dbm cfg using SSL_VERSIONS <SSL Version> Run the following command to set the value of db2comm parameter to SSL: $db2set db2comm=ssl Restart the database manager. Note: Details on key database creation and setting up SSL environment are in following links Select the following knowledgebase link for more information regarding configuring SSL support: http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec.doc/doc/t0025241.html?lang=en Select the following knowledgebase link for more information regarding SSL_versions: http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.config.doc/doc/r0053616.html?cp=SSEPGG_10.5.0%2F2-4-4-8-88&lang=en Select the following knowledgebase link for setting communication protocol: http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.qb.server.doc/doc/t0004714.html?cp=SSEPGG_10.5.0&lang=en

b
DB2 must maintain the confidentiality and integrity of information during reception.
SC-8 - Medium - CCI-002422 - V-213732 - SV-213732r917670_rule
RMF Control
SC-8
Severity
Medium
CCI
CCI-002422
Version
DB2X-00-009200
Vuln IDs
  • V-213732
  • V-74607
Rule IDs
  • SV-213732r917670_rule
  • SV-89281
: Information can be either unintentionally or maliciously disclosed or modified during reception, including, for example, during aggregation, at protocol transformation points, and during packing/unpacking. These unauthorized disclosures or modifications compromise the confidentiality or integrity of the information. This requirement applies only to those applications that are either distributed or can allow access to data non-locally. Use of this requirement will be limited to situations where the data owner has a strict requirement for ensuring data integrity and confidentiality is maintained at every step of the data transfer and handling process. When receiving data, the DBMS, associated applications, and infrastructure must leverage protection mechanisms.
Checks: C-14953r917669_chk

The DB2 database system supports the use of Transport Layer Security (TLS) to enable a client to authenticate a server and to provide private communication between the client and server by use of encryption. Run the following command to find out what versions of TLS are supported by the server: $db2 get dbm cfg If the value of the ssl_versions parameter is not set to "TLSV1" or "TLSV12" this is a finding. Check the value of the DB2COMM parameter using the following command: $db2set -all If the value of DB2COMM is not set to "SSL", this is a finding. Note: When this topic mentions SSL, the same information applies to TLS unless otherwise noted.

Fix: F-14951r295246_fix

Run the following DB2 command to set the value of ssl_versions to approved TLS or SSL version: $db2 update dbm cfg using SSL_VERSIONS <SSL Version> Run the following command to set the value of db2comm parameter to SSL: $db2set db2comm=ssl Restart the database manager. Note: Details on key database creation and setting up SSL environment are in the following links Select the following knowledgebase link for more information regarding configuring SSL support: http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec.doc/doc/t0025241.html?lang=en Select the following knowledgebase link for more information regarding SSL_versions: http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.config.doc/doc/r0053616.html?cp=SSEPGG_10.5.0%2F2-4-4-8-88&lang=en Select the following knowledgebase link for setting communication protocol: http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.qb.server.doc/doc/t0004714.html?cp=SSEPGG_10.5.0&lang=en

b
When invalid inputs are received, DB2 must behave in a predictable and documented manner that reflects organizational and system objectives.
SI-10 - Medium - CCI-002754 - V-213733 - SV-213733r879818_rule
RMF Control
SI-10
Severity
Medium
CCI
CCI-002754
Version
DB2X-00-009300
Vuln IDs
  • V-213733
  • V-74609
Rule IDs
  • SV-213733r879818_rule
  • SV-89283
A common vulnerability is unplanned behavior when invalid inputs are received. This requirement guards against adverse or unintended system behavior caused by invalid inputs, where information system responses to the invalid input may be disruptive or cause the system to fail into an unsafe state. The behavior will be derived from the organizational and system requirements and includes, but is not limited to, notification of the appropriate personnel, creating an audit record, and rejecting invalid input. This calls for the review of applications, which will require collaboration with the application developers. It is recognized that in many cases the database administrator (DBA) is organizationally separate from the application developers, and may have limited, if any, access to source code. Nevertheless, protections of this type are so important to the secure operation of databases that they must not be ignored. At a minimum, the DBA must attempt to obtain assurances from the development organization that this issue is addressed, and must document what has been discovered.
Checks: C-14954r295248_chk

Review system documentation to determine how input errors are to be handled in general and if any special handling is defined for specific circumstances. Review the source code for database program objects (stored procedures, functions, triggers) and application source code to identify how the system responds to invalid input. If it does not implement the documented behavior, this is a finding.

Fix: F-14952r295249_fix

Revise and deploy the source code for database program objects (stored procedures, functions, triggers) and application source code, to implement the documented behavior.

c
Security-relevant software updates to DB2 must be installed within the time period directed by an authoritative source (e.g. IAVM, CTOs, DTMs, and STIGs).
SI-2 - High - CCI-002605 - V-213734 - SV-213734r879827_rule
RMF Control
SI-2
Severity
High
CCI
CCI-002605
Version
DB2X-00-009500
Vuln IDs
  • V-213734
  • V-74611
Rule IDs
  • SV-213734r879827_rule
  • SV-89285
Security flaws with software applications, including database management systems, are discovered daily. Vendors are constantly updating and patching their products to address newly discovered security vulnerabilities. Organizations (including any contractor to the organization) are required to promptly install security-relevant software updates (e.g., patches, service packs, and hot fixes). Flaws discovered during security assessments, continuous monitoring, incident response activities, or information system error handling must also be addressed expeditiously. Organization-defined time periods for updating security-relevant software may vary based on a variety of factors including, for example, the security category of the information system or the criticality of the update (i.e., severity of the vulnerability related to the discovered flaw). This requirement will apply to software patch management solutions that are used to install patches across the enclave and also to applications themselves that are not part of that patch management solution. For example, many browsers today provide the capability to install their own patch software. Patch criticality, as well as system criticality, will vary. Therefore, the tactical situations regarding the patch management process will also vary. This means that the time period utilized must be a configurable parameter. Time frames for application of security-relevant software updates may be dependent upon the Information Assurance Vulnerability Management (IAVM) process. The application will be configured to check for and install security-relevant software updates within an identified time period from the availability of the update. The specific time period will be defined by an authoritative source (e.g. IAVM, CTOs, DTMs, and STIGs).
Checks: C-14955r295251_chk

Obtain evidence that software patches are consistently applied to DB2 within the time frame defined for each patch. If such evidence cannot be obtained, or the evidence that is obtained indicates a pattern of noncompliance, this is a finding.

Fix: F-14953r295252_fix

Institute and adhere to policies and procedures to ensure that patches are consistently applied to DB2 within the time allowed.

b
DB2 must generate audit records when security objects are accessed.
AU-12 - Medium - CCI-000172 - V-213735 - SV-213735r879863_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-009600
Vuln IDs
  • V-213735
  • V-74613
Rule IDs
  • SV-213735r879863_rule
  • SV-89287
Changes to the security configuration must be tracked. This requirement applies to situations where security data is retrieved or modified via data manipulation operations, as opposed to via specialized security functionality. In an SQL environment, types of access include, but are not necessarily limited to: SELECT INSERT UPDATE DELETE EXECUTE
Checks: C-14956r295254_chk

To ensure the database generates audit records when security objects are accessed the following audit categories must be implemented at the database level: AUDIT CHECKING CONTEXT SECMAINT SYSADMIN VALIDATE Run the following SQL statement to determine if an audit policy is defined upon the database: DB2&gt; SELECT AUDITPOLICYNAME, AUDITPOLICYID FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN (' ') If no rows are returned, this is a finding. Using the AUDITPOLICYID returned from above query, run the following command to find the details of audit policy: DB2&gt; SELECT AUDITPOLICYNAME, AUDITSTATUS, CHECKINGSTATUS, CONTEXTSTATUS, SECMAINTSTATUS, SYSADMINSTATUS, VALIDATESTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES WHERE AUDITPOLICYID = &lt;audit policy ID&gt; If the values for AUDITSTATUS, CHECKINGSTATUS, CONTEXTSTATUS, SECMAINTSTATUS, SYSMADMINSTATUS and VALIDATESTATUS are not 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding.

Fix: F-14954r295255_fix

Run the following command to define an audit policy with the needed subset using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <DB audit policy name> CATEGORIES SECMAINT STATUS BOTH, VALIDATE STATUS BOTH, CHECKING STATUS BOTH, CONTEXT STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, run the following command to apply the policy created above to the database: DB2> AUDIT DATABASE USING POLICY <DB audit policy name>

b
DB2 must generate audit records when unsuccessful attempts to access security objects occur.
AU-12 - Medium - CCI-000172 - V-213736 - SV-213736r879863_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-009700
Vuln IDs
  • V-213736
  • V-74615
Rule IDs
  • SV-213736r879863_rule
  • SV-89289
Changes to the security configuration must be tracked. This requirement applies to situations where security data is retrieved or modified via data manipulation operations, as opposed to via specialized security functionality. In an SQL environment, types of access include, but are not necessarily limited to: SELECT INSERT UPDATE DELETE EXECUTE To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.
Checks: C-14957r295257_chk

To ensure the database generates audit records when unsuccessful attempts are made to access security objects the following audit categories must be implemented at the database level: AUDIT CHECKING CONTEXT SECMAINT SYSADMIN VALIDATE Run the following SQL statement to ensure that an audit policy is defined upon the database: DB2&gt; SELECT AUDITPOLICYNAME, AUDITPOLICYID FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN (' ') If no rows are returned, this is a finding. Run the following SQL statement using the AUDITPOLICYID from above query find the details of audit policy: DB2&gt; SELECT AUDITPOLICYNAME, AUDITSTATUS, CHECKINGSTATUS, CONTEXTSTATUS, SECMAINTSTATUS, SYSADMINSTATUS, VALIDATESTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES WHERE AUDITPOLICYID = &lt;audit policy ID&gt; If the values for AUDITSTATUS, CHECKINGSTATUS, CONTEXTSTATUS, SECMAINTSTATUS, SYSMADMINSTATUS and VALIDATESTATUS are not 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding.

Fix: F-14955r295258_fix

Run the following command to define an audit policy with the needed subset using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <DB audit policy name> CATEGORIES SECMAINT STATUS BOTH, VALIDATE STATUS BOTH, CHECKING STATUS BOTH, CONTEXT STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, run the following command to apply the policy created above to the database: DB2> AUDIT DATABASE USING POLICY <DB audit policy name>

b
DB2 must generate audit records when categorized information (e.g., classification levels/security levels) are accessed.
AU-12 - Medium - CCI-000172 - V-213737 - SV-213737r879865_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-009800
Vuln IDs
  • V-213737
  • V-74617
Rule IDs
  • SV-213737r879865_rule
  • SV-89291
Use of categorized information must be tracked. Without an audit trail, unauthorized access to protected data could go undetected. For detailed information on categorizing information, refer to FIPS Publication 199, Standards for Security Categorization of Federal Information and Information Systems, and FIPS Publication 200, Minimum Security Requirements for Federal Information and Information Systems.
Checks: C-14958r295260_chk

Review the system documentation to determine whether it is required to track categories of information, such as classification or sensitivity level. If it is not, this is not applicable (NA). To verify the database generates audit records when categorized information (e.g., classification levels/security levels) is accessed the SECMAINT, CONTEXT category auditing must be implemented at the database level. Run the following SQL statement to ensure that an audit policy is defined upon the database: DB2&gt; SELECT AUDITPOLICYNAME, AUDITPOLICYID FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN (' ') If no rows are returned, this is a finding. Run the following SQL statement using the AUDITPOLICYID from the above query to find the details of the audit policy: DB2&gt; SELECT AUDITPOLICYNAME, CONTEXTSTATUS, SECMAINTSTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES WHERE AUDITPOLICYID = &lt;audit policy ID&gt; If the values for SECMAINTSTATUS and CONTEXTSTATUS are not 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding.

Fix: F-14956r295261_fix

Run the following command to define an audit policy with the needed subset using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <DB audit policy name> CATEGORIES SECMAINT STATUS BOTH, CONTEXT STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, run the following command to apply the policy created above to the database: DB2> AUDIT DATABASE USING POLICY <DB audit policy name> Note: The SECMAINT tracks the security and EXECUTE tracks the info on the tables for which it is defined.

b
DB2 must generate audit records when unsuccessful attempts to access categorized information (e.g., classification levels/security levels) occur.
AU-12 - Medium - CCI-000172 - V-213738 - SV-213738r879865_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-009900
Vuln IDs
  • V-213738
  • V-74619
Rule IDs
  • SV-213738r879865_rule
  • SV-89293
Use of categorized information must be tracked. Without an audit trail, unauthorized access to protected data could go undetected. To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones. For detailed information on categorizing information, refer to FIPS Publication 199, Standards for Security Categorization of Federal Information and Information Systems, and FIPS Publication 200, Minimum Security Requirements for Federal Information and Information Systems.
Checks: C-14959r295263_chk

Review the system documentation to determine whether it is required to track categories of information, such as classification or sensitivity level. If it is not, this is not applicable (NA). To verify the database generates audit records when categorized information (e.g., classification levels/security levels) is unsuccessfully accessed the SECMAINT, CONTEXT category auditing must be implemented at the database level. Run the following SQL statement to ensure that an audit policy is defined upon the database: DB2&gt; SELECT AUDITPOLICYNAME, AUDITPOLICYID FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN (' ') If no rows are returned, this is a finding. Run the following SQL statement using the AUDITPOLICYID returned from query above to find the details of the audit policy: DB2&gt; SELECT AUDITPOLICYNAME, CONTEXTSTATUS, SECMAINTSTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES WHERE AUDITPOLICYID = &lt;audit policy ID&gt; If the values is not 'B' (Both) CONTEXTSTATUS, SECMAINTSTATUS, columns and the value in ERRORTYPE column set to 'A' (AUDIT) , this is a finding.

Fix: F-14957r295264_fix

Run the following command to define an audit policy with the needed subset using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <DB audit policy name> CATEGORIES SECMAINT STATUS BOTH, CONTEXT STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, run the following command to apply the policy created above to the database: DB2> AUDIT DATABASE USING POLICY <DB audit policy name>

b
DB2 must generate audit records when privileges/permissions are added.
AU-12 - Medium - CCI-000172 - V-213739 - SV-213739r879866_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-010000
Vuln IDs
  • V-213739
  • V-74621
Rule IDs
  • SV-213739r879866_rule
  • SV-89295
Changes in the permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized elevation or restriction of individuals' and groups' privileges could go undetected. Elevated privileges give users access to information and functionality that they should not have; restricted privileges wrongly deny access to authorized users. In an SQL environment, adding permissions is typically done via the GRANT command.
Checks: C-14960r295266_chk

To verify the database generates audit records when privileges/permissions are added is accessed the SECMAINT, CONTEXT category auditing must be implemented at the database level. Run the following SQL statement to ensure that an audit policy is defined upon the database: DB2&gt; SELECT AUDITPOLICYNAME, AUDITPOLICYID FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN (' ') If no rows are returned, this is a finding. Run the following SQL statement using the AUDITPOLICYID from query above to find the details of the audit policy: DB2&gt; SELECT AUDITPOLICYNAME, CONTEXTSTATUS, SECMAINTSTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES WHERE AUDITPOLICYID = &lt;audit policy ID&gt; If the values for CONTEXTSTATUS and SECMAINTSTATUS are not 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding.

Fix: F-14958r295267_fix

Run the following command to define an audit policy with the needed subset using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <DB audit policy name> CATEGORIES SECMAINT STATUS BOTH, CONTEXT STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, run the following command to apply the policy created above to the database: DB2> AUDIT DATABASE USING POLICY <DB audit policy name>

b
DB2 must generate audit records when unsuccessful attempts to add privileges/permissions occur.
AU-12 - Medium - CCI-000172 - V-213740 - SV-213740r879866_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-010100
Vuln IDs
  • V-213740
  • V-74623
Rule IDs
  • SV-213740r879866_rule
  • SV-89297
Failed attempts to change the permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized attempts to elevate or restrict individuals' and groups' privileges could go undetected. In an SQL environment, adding permissions is typically done via the GRANT command. To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.
Checks: C-14961r295269_chk

To verify the database generates audit records when unsuccessful attempts are made to add privileges/permissions the SECMAINT, CONTEXT category auditing must be implemented at the database level. Run the following SQL statement to ensure that an audit policy is defined upon the database: DB2&gt; SELECT AUDITPOLICYNAME, AUDITPOLICYID FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN (' ') If no rows are returned, this is a finding. Run the following SQL statement using the AUDITPOLICYID from the query above find the details of the audit policy: DB2&gt; SELECT AUDITPOLICYNAME, CONTEXTSTATUS, SECMAINTSTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES WHERE AUDITPOLICYID = &lt;audit policy ID&gt; If the values for CONTEXTSTATUS and SECMAINTSTATUS are not 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding.

Fix: F-14959r295270_fix

Run the following command to define an audit policy with the needed subset using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <DB audit policy name> CATEGORIES SECMAINT STATUS BOTH, CONTEXT STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, run the following command to apply the policy created above to the database: DB2> AUDIT DATABASE USING POLICY <DB audit policy name>

b
DB2 must generate audit records when privileges/permissions are modified.
AU-12 - Medium - CCI-000172 - V-213741 - SV-213741r879866_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-010200
Vuln IDs
  • V-213741
  • V-74625
Rule IDs
  • SV-213741r879866_rule
  • SV-89299
Changes in the permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized elevation or restriction of individuals' and groups' privileges could go undetected. Elevated privileges give users access to information and functionality that they should not have; restricted privileges wrongly deny access to authorized users. In an SQL environment, modifying permissions is typically done via the GRANT and REVOKE.
Checks: C-14962r295272_chk

To verify the database generates audit records when the database privileges/permissions are modified the SECMAINT, CONTEXT category auditing must be implemented at the database level. Run the following SQL statement to ensure that an audit policy is defined upon the database: DB2&gt; SELECT AUDITPOLICYNAME, AUDITPOLICYID FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN (' ') If no rows are returned, this is a finding. Run the following SQL statement using the AUDITPOLICYID from the query above to find the details of the audit policy: DB2&gt; SELECT AUDITPOLICYNAME, CONTEXTSTATUS, SECMAINTSTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES WHERE AUDITPOLICYID = &lt;audit policy ID&gt; If the values for CONTEXTSTATUS and SECMAINTSTATUS are not 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding.

Fix: F-14960r295273_fix

If a correct audit policy does not exist, define an audit policy with the needed subset using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <DB audit policy name> CATEGORIES SECMAINT STATUS BOTH, CONTEXT STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, run the following command to apply the policy created above to the database: DB2> AUDIT DATABASE USING POLICY <DB audit policy name>

b
DB2 must generate audit records when unsuccessful attempts to modify privileges/permissions occur.
AU-12 - Medium - CCI-000172 - V-213742 - SV-213742r879866_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-010300
Vuln IDs
  • V-213742
  • V-74627
Rule IDs
  • SV-213742r879866_rule
  • SV-89301
Failed attempts to change the permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized attempts to elevate or restrict individuals' and groups' privileges could go undetected. In an SQL environment, modifying permissions is typically done via the GRANT and REVOKE. To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.
Checks: C-14963r295275_chk

To verify the database generates audit records when an unsuccessful attempt is made to modify the database privileges/permissions and that the SECMAINT, CONTEXT category auditing must be implemented at the database level. Run the following SQL statement to ensure that an audit policy is defined upon the database: DB2&gt; SELECT AUDITPOLICYNAME, AUDITPOLICYID FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN (' ') If no rows are returned, this is a finding. Run the following SQL statement using the AUDITPOLICYID from the query above to find the details of the audit policy: DB2&gt; SELECT AUDITPOLICYNAME, CONTEXTSTATUS, SECMAINTSTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES WHERE AUDITPOLICYID = &lt;audit policy ID&gt; If the values for CONTEXTSTATUS and SECMAINTSTATUS are not 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding.

Fix: F-14961r295276_fix

Run the following command to define an audit policy with the needed subset using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <DB audit policy name> CATEGORIES SECMAINT STATUS BOTH, CONTEXT STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, run the following command to apply the policy created above to the database: DB2> AUDIT DATABASE USING POLICY <DB audit policy name>

b
DB2 must generate audit records when security objects are modified.
AU-12 - Medium - CCI-000172 - V-213743 - SV-213743r879867_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-010400
Vuln IDs
  • V-213743
  • V-74629
Rule IDs
  • SV-213743r879867_rule
  • SV-89303
Changes in the database objects (tables, views, procedures, functions) that record and control permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized changes to the security subsystem could go undetected. The database could be severely compromised or rendered inoperative.
Checks: C-14964r295278_chk

If there are no locally defined security objects this is not applicable (NA). If there are locally defined security objects get a list of those objects from ISSO/DBA. If there are only tables in the list then a minimum audit set of OBJMAINT and SECMAINT categories on the locally defined security tables or database is required. If there are objects like packages and procedures in the list of locally defined security objects then a minimum audit set of OBJMAINT and SECMAINT categories on the database is required. Run the following SQL statement to ensure that an audit policy is defined in the database: DB2&gt; SELECT AUDITPOLICYNAME, OBJECTSCHEMA, OBJECTNAME, OBJECTTYPE FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN ('T',' ') If no rows are returned, this is a finding. If a row with OBJECTTYPE of ' ' (Database; value is a blank) exists in the output, it is a database level policy. If a row with OBJECTTYPE of 'T' exists in the output, it is a table level policy. For each audit policy returned in the statement above, run the following SQL statement to confirm that the OBJMAINT and SECMAINT categories are part of that policy: DB2&gt; SELECT AUDITPOLICYNAME, SECMAINTSTATUS, OBJMAINTSTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES If the database audit policy has the values for the SECMAINTSTATUS and OBJMAINTSTATUS columns set to 'S' (Success) or 'B' (Both) and the value in the ERRORTYPE column set to 'A' (Audit), this is not a finding. If there are objects in addition to tables in the list of locally defined security objects and if the database policy does not exist or does not cover SECMAINTSTATUS or OBJMAINTSTATUS, this is a finding. If there are only tables in the list and if the database policy does not exist or does not cover SECMAINTSTATUS or OBJMAINTSTATUS then check if the appropriate policies are defined for all the required locally defined security tables. If all the required locally defined security tables' audit policies do not have the values for the SECMAINTSTATUS and OBJMAINTSTATUS columns set to 'S' (Success) or 'B' (Both) or if the value in the ERRORTYPE column is not set to 'A' (Audit), this is a finding.

Fix: F-14962r295279_fix

Run the following command to define an audit policy with the needed subset using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <execdb> CATEGORIES OBJMAINT STATUS SUCCESS, SECMAINT STATUS SUCCESS ERROR TYPE AUDIT or CREATE AUDIT POLICY <execdb> CATEGORIES OBJMAINT STATUS SUCCESS, SECMAINT STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, run the following command to apply the correct policy to local security tables or database level: DB2> AUDIT TABLE <table name> USING POLICY EXECDB

b
DB2 must generate audit records when unsuccessful attempts to modify security objects occur.
AU-12 - Medium - CCI-000172 - V-213744 - SV-213744r879867_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-010500
Vuln IDs
  • V-213744
  • V-74631
Rule IDs
  • SV-213744r879867_rule
  • SV-89305
Changes in the database objects (tables, views, procedures, functions) that record and control permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized changes to the security subsystem could go undetected. The database could be severely compromised or rendered inoperative. To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.
Checks: C-14965r295281_chk

If there are no locally defined security objects this is not applicable (NA). If there are locally defined security objects get a list of those objects from ISSO/DBA. If there are only tables in the list then a minimum audit set of OBJMAINT and SECMAINT categories on the locally defined security tables or database is required. If there are objects like packages and procedures in the list of locally defined security objects then a minimum audit set of OBJMAINT and SECMAINT categories on the database is required. Run the following SQL statement to ensure that an audit policy is defined upon the database: DB2&gt; SELECT AUDITPOLICYNAME, OBJECTSCHEMA, OBJECTNAME, OBJECTTYPE FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN ('T',' ') If no rows are returned, this is a finding. If a row with OBJECTTYPE of ' ' (Database; value is a blank) exists in the output, it is a database level policy. If a row with OBJECTTYPE of 'T' exists in the output, it is a table level policy. For each audit policy returned in the statement above, run the following SQL statement to confirm that the OBJMAINT and SECMAINT categories are part of that policy: DB2&gt; SELECT AUDITPOLICYNAME, SECMAINTSTATUS, OBJMAINTSTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES If the database audit policy has the values for the SECMAINTSTATUS and OBJMAINTSTATUS columns set to 'F' (Failure) or 'B' (Both) and the value in the ERRORTYPE column set to 'A' (Audit), this is not a finding. If there are objects in additions to tables in the list of locally defined security objects and if the database policy does not exist or does not cover SECMAINTSTATUS or OBJMAINTSTATUS, this is a finding. If there are only tables in the list and if the database policy does not exist or does not cover SECMAINTSTATUS or OBJMAINTSTATUS then check if the appropriate policies are defined for all the required locally defined security tables. If any of the required locally defined security tables' audit policies do not have the values for the SECMAINTSTATUS and OBJMAINTSTATUS columns set to 'F' (Failure) or 'B' (Both) or the value in the ERRORTYPE column set to 'A' (Audit), then this is a finding.

Fix: F-14963r295282_fix

Run the following command to define an audit policy with the needed subset using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <execdb> CATEGORIES OBJMAINT STATUS SUCCESS, SECMAINT STATUS BOTH ERROR TYPE AUDIT or CREATE AUDIT POLICY <execdb> CATEGORIES OBJMAINT STATUS SUCCESS, SECMAINT STATUS FAILURE ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, run the following command to apply the correct policy to local security tables or database level: DB2> AUDIT TABLE <table name> USING POLICY EXECDB

b
DB2 must generate audit records when categorized information (e.g., classification levels/security levels) is modified.
AU-12 - Medium - CCI-000172 - V-213745 - SV-213745r879869_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-010600
Vuln IDs
  • V-213745
  • V-74633
Rule IDs
  • SV-213745r879869_rule
  • SV-89307
Changes in categorized information must be tracked. Without an audit trail, unauthorized access to protected data could go undetected. For detailed information on categorizing information, refer to FIPS Publication 199, Standards for Security Categorization of Federal Information and Information Systems, and FIPS Publication 200, Minimum Security Requirements for Federal Information and Information Systems.
Checks: C-14966r295284_chk

Review the system documentation to determine whether it is required to track categories of information, such as classification or sensitivity level. If it is not, this is not applicable (NA). To meet these requirements at the SECMAINT, CONTEXT category auditing needs to be implemented at database level. Run the following SQL statement to ensure that an audit policy is defined upon the database: DB2&gt; SELECT AUDITPOLICYNAME, AUDITPOLICYID FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN (' ') If no rows are returned, this is a finding. Using the AUDITPOLICYID from above query find the details of audit policy: DB2&gt; SELECT AUDITPOLICYNAME, CONTEXTSTATUS, SECMAINTSTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES WHERE AUDITPOLICYID = &lt;audit policy ID&gt; If the values for CONTEXTSTATUS and SECMAINTSTATUS are not 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding.

Fix: F-14964r295285_fix

Run the following command to define an audit policy with the needed subset using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <DB audit policy name> CATEGORIES SECMAINT STATUS BOTH, CONTEXT STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, run the following command to apply the policy created above to the database: DB2> AUDIT DATABASE USING POLICY <DB audit policy name>

b
DB2 must generate audit records when unsuccessful attempts to modify categorized information (e.g., classification levels/security levels) occur.
AU-12 - Medium - CCI-000172 - V-213746 - SV-213746r879869_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-010700
Vuln IDs
  • V-213746
  • V-74635
Rule IDs
  • SV-213746r879869_rule
  • SV-89309
Changes in categorized information must be tracked. Without an audit trail, unauthorized access to protected data could go undetected. To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones. For detailed information on categorizing information, refer to FIPS Publication 199, Standards for Security Categorization of Federal Information and Information Systems, and FIPS Publication 200, Minimum Security Requirements for Federal Information and Information Systems.
Checks: C-14967r295287_chk

Review the system documentation to determine whether it is required to track categories of information, such as classification or sensitivity level. If it is not, this is not applicable (NA). To meet these requirements at the SECMAINT, CONTEXT category auditing needs to be implemented at database level. Run the following SQL statement to ensure that an audit policy is defined upon the database: DB2&gt; SELECT AUDITPOLICYNAME, AUDITPOLICYID FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN (' ') If no rows are returned, this is a finding. Using the AUDITPOLICYID from above query find the details of audit policy: DB2&gt; SELECT AUDITPOLICYNAME, CONTEXTSTATUS, SECMAINTSTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES WHERE AUDITPOLICYID = &lt;audit policy ID&gt; If the values for CONTEXTSTATUS and SECMAINTSTATUS are not 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding.

Fix: F-14965r295288_fix

Run the following command to define an audit policy with the needed subset using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <DB audit policy name> CATEGORIES SECMAINT STATUS BOTH, CONTEXT STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, run the following command to apply the policy created above to the database: DB2> AUDIT DATABASE USING POLICY <DB audit policy name>

b
DB2 must generate audit records when privileges/permissions are deleted.
AU-12 - Medium - CCI-000172 - V-213747 - SV-213747r879870_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-010800
Vuln IDs
  • V-213747
  • V-74637
Rule IDs
  • SV-213747r879870_rule
  • SV-89311
Changes in the permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized elevation or restriction of individuals' and groups' privileges could go undetected. Elevated privileges give users access to information and functionality that they should not have; restricted privileges wrongly deny access to authorized users. In an SQL environment, deleting permissions is typically done via the REVOKE command.
Checks: C-14968r295290_chk

To meet these requirements at the SECMAINT, CONTEXT category auditing needs to be implemented at database level. Run the following SQL statement to ensure that an audit policy is defined upon the database: DB2&gt; SELECT AUDITPOLICYNAME, AUDITPOLICYID FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN (' ') If no rows are returned, this is a finding. Using the AUDITPOLICYID from above query find the details of audit policy: DB2&gt; SELECT AUDITPOLICYNAME, CONTEXTSTATUS, SECMAINTSTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES WHERE AUDITPOLICYID = &lt;audit policy ID&gt; If the values for CONTEXTSTATUS and SECMAINTSTATUS are not 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding.

Fix: F-14966r295291_fix

Run the following command to define an audit policy with the needed subset using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <DB audit policy name> CATEGORIES SECMAINT STATUS BOTH, CONTEXT STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, in the following command to apply the policy created above to the database: DB2> AUDIT DATABASE USING POLICY <DB audit policy name>

b
DB2 must generate audit records when unsuccessful attempts to delete privileges/permissions occur.
AU-12 - Medium - CCI-000172 - V-213748 - SV-213748r879870_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-010900
Vuln IDs
  • V-213748
  • V-74639
Rule IDs
  • SV-213748r879870_rule
  • SV-89313
Failed attempts to change the permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized attempts to elevate or restrict individuals' and groups' privileges could go undetected. In an SQL environment, deleting permissions is typically done via the REVOKE command. To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.
Checks: C-14969r295293_chk

To meet these requirements at the SECMAINT, CONTEXT category auditing needs to be implemented at database level. Run the following SQL statement to ensure that an audit policy is defined upon the database: DB2&gt; SELECT AUDITPOLICYNAME, AUDITPOLICYID FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN (' ') If no rows are returned, this is a finding. Using the AUDITPOLICYID from above query find the details of audit policy: DB2&gt; SELECT AUDITPOLICYNAME, CONTEXTSTATUS, SECMAINTSTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES WHERE AUDITPOLICYID = &lt;audit policy ID&gt; If the values for CONTEXTSTATUS and SECMAINTSTATUS are not 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding.

Fix: F-14967r295294_fix

Run the following command to define an audit policy with the needed subset using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <DB audit policy name> CATEGORIES SECMAINT STATUS BOTH, CONTEXT STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, run the following command to apply the policy created above to the database: DB2> AUDIT DATABASE USING POLICY <DB audit policy name>

b
DB2 must generate audit records when security objects are deleted.
AU-12 - Medium - CCI-000172 - V-213749 - SV-213749r879872_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-011000
Vuln IDs
  • V-213749
  • V-74641
Rule IDs
  • SV-213749r879872_rule
  • SV-89315
The removal of security objects from the database/DBMS would seriously degrade a system's information assurance posture. If such an event occurs, it must be logged.
Checks: C-14970r295296_chk

To meet these requirements at the SECMAINT, OBJMAINT, and CONTEXT categories, auditing need to be implemented at the database level. Run the following SQL statement to ensure that an audit policy is defined upon the database: DB2&gt; SELECT AUDITPOLICYNAME, AUDITPOLICYID FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN (' ') If no rows are returned, this is a finding. Using the AUDITPOLICYID from above query find the details of audit policy: DB2&gt; SELECT AUDITPOLICYNAME, CONTEXTSTATUS, SECMAINTSTATUS, OBJMAINTSTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES WHERE AUDITPOLICYID = &lt;audit policy ID&gt; If the values for CONTEXTSTATUS, OBJMAINTSTATUS and SECMAINTSTATUS are not 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding.

Fix: F-14968r295297_fix

Run the following command to define an audit policy with the needed subset using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <DB audit policy name> CATEGORIES SECMAINT STATUS BOTH, OBJMAINTSTATUS STATUS BOTH, CONTEXT STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, run the following command to apply the policy created above to the database: DB2> AUDIT DATABASE USING POLICY <DB audit policy name> Note: The SECMAINT command grants a role and the OBJMAINT command sets the grant on a user defined function.

b
DB2 must generate audit records when unsuccessful attempts to delete security objects occur.
AU-12 - Medium - CCI-000172 - V-213750 - SV-213750r879872_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-011100
Vuln IDs
  • V-213750
  • V-74649
Rule IDs
  • SV-213750r879872_rule
  • SV-89323
The removal of security objects from the database/DBMS would seriously degrade a system's information assurance posture. If such an action is attempted, it must be logged. To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.
Checks: C-14971r295299_chk

To meet these requirements at the SECMAINT, OBJMAINT, and CONTEXT categories, auditing need to be implemented at the database level. Run the following SQL statement to ensure that an audit policy is defined upon the database: DB2&gt; SELECT AUDITPOLICYNAME, AUDITPOLICYID FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN (' ') If no rows are returned, this is a finding. Using the AUDITPOLICYID from above query find the details of audit policy: DB2&gt; SELECT AUDITPOLICYNAME, CONTEXTSTATUS, SECMAINTSTATUS, OBJMAINTSTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES WHERE AUDITPOLICYID = &lt;audit policy ID&gt; If the values for CONTEXTSTATUS, OBJMAINTSTATUS and SECMAINTSTATUS are not 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding.

Fix: F-14969r295300_fix

Run the following command to define an audit policy with the needed subset using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <DB audit policy name> CATEGORIES SECMAINT STATUS BOTH, OBJMAINTSTATUS STATUS BOTH, CONTEXT STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, run the following command to apply the policy created above to the database: DB2> AUDIT DATABASE USING POLICY <DB audit policy name>

b
DB2 must generate audit records when categorized information (e.g., classification levels/security levels) is deleted.
AU-12 - Medium - CCI-000172 - V-213751 - SV-213751r879873_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-011200
Vuln IDs
  • V-213751
  • V-74651
Rule IDs
  • SV-213751r879873_rule
  • SV-89325
Changes in categorized information must be tracked. Without an audit trail, unauthorized access to protected data could go undetected. For detailed information on categorizing information, refer to FIPS Publication 199, Standards for Security Categorization of Federal Information and Information Systems, and FIPS Publication 200, Minimum Security Requirements for Federal Information and Information Systems.
Checks: C-14972r295302_chk

Get a list of tables from ISSO/DBA where the categorized information is stored. If there are no tables with categorized information, this is not applicable (NA). Run the following SQL statement to ensure that an audit policy is defined upon all the required tables and/or the database: DB2&gt; SELECT AUDITPOLICYNAME, OBJECTSCHEMA, OBJECTNAME, OBJECTTYPE FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN ('T',' ') If no rows are returned, this is a finding. If a row with OBJECTTYPE of ' ' (Database; value is a blank) exists in the output, it is a database level policy. If a row with OBJECTTYPE of 'T' exists in the output, it is a table level policy. For each audit policy returned in the statement above, run the following SQL statement to confirm that the CONTEXT and EXECUTE categories are part of that policy: DB2&gt; SELECT AUDITPOLICYNAME, CONTEXTSTATUS, EXECUTESTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES WHERE AUDITPOLICYID = &lt;audit policy ID&gt; If the database audit policy has the values for the CONTEXTSTATUS and EXECUTESTATUS columns set to 'S' (Success) or 'B' (Both) and the value in the ERRORTYPE column set to 'A' (Audit), this is not a finding. If the database policy does not exist or does not cover CONTEXTSTATUS and EXECUTESTATUS then check if the appropriate policies are defined for all the required tables. If any required application table audit policies do not have the values for the CONTEXTSTATUS and EXECUTESTATUS columns set to 'S' (Success) or 'B' (Both) or the value in the ERRORTYPE column set to 'A' (Audit), then this is a finding.

Fix: F-14970r295303_fix

Define an audit policy with the needed subset using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <DB audit policy name> CATEGORIES EXECUTE STATUS BOTH, CONTEXT STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, run the following command to apply the policy created above to the database: DB2> AUDIT DATABASE USING POLICY <DB audit policy name> Define an audit policy to audit deletes (DMLs) on required tables. DB2> CREATE AUDIT POLICY <table audit policy name> CATEGORIES EXECUTE STATUS BOTH, CONTEXT STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, run the following command to apply the policy created above to each required table: DB2> AUDIT TABLE <table name> USING POLICY <table audit policy name>

b
DB2 must generate audit records when unsuccessful attempts to delete categorized information (e.g., classification levels/security levels) occur.
AU-12 - Medium - CCI-000172 - V-213752 - SV-213752r879873_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-011300
Vuln IDs
  • V-213752
  • V-74653
Rule IDs
  • SV-213752r879873_rule
  • SV-89327
Changes in categorized information must be tracked. Without an audit trail, unauthorized access to protected data could go undetected. To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones. For detailed information on categorizing information, refer to FIPS Publication 199, Standards for Security Categorization of Federal Information and Information Systems, and FIPS Publication 200, Minimum Security Requirements for Federal Information and Information Systems.
Checks: C-14973r295305_chk

Get a list of tables from ISSO/DBA where the categorized information is stored. If there are no tables with categorized information, this is not applicable (NA). Run the following SQL statement to ensure that an audit policy is defined upon all the required tables and/or the database: DB2&gt; SELECT AUDITPOLICYNAME, OBJECTSCHEMA, OBJECTNAME, OBJECTTYPE FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN ('T',' ') If no rows are returned, this is a finding. If a row with OBJECTTYPE of ' ' (Database; value is a blank) exists in the output, it is a database level policy. If a row with OBJECTTYPE of 'T' exists in the output, it is a table level policy. For each audit policy returned in the statement above, run the following SQL statement to confirm that the CONTEXT and EXECUTE categories are part of that policy: DB2&gt; SELECT AUDITPOLICYNAME, CONTEXTSTATUS, EXECUTESTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES WHERE AUDITPOLICYID = &lt;audit policy ID&gt; If the database audit policy has the values for the CONTEXTSTATUS and EXECUTESTATUS columns set to 'F' (Failure) or 'B' (Both) and the value in the ERRORTYPE column set to 'A' (Audit), this is not a finding. If the database policy does not exist or does not cover CONTEXTSTATUS and EXECUTESTATUS then check if the appropriate policies are defined for all the required tables. If any required application table audit policies do not have the values for the CONTEXTSTATUS and EXECUTESTATUS columns set to 'F' (Failure) or 'B' (Both) or the value in the ERRORTYPE column set to 'A' (Audit), then this is a finding.

Fix: F-14971r295306_fix

Run the following command to define an audit policy with the needed subset using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <DB audit policy name> CATEGORIES SECMAINT STATUS BOTH, CONTEXT STATUS BOTH ERROR TYPE AUDIT Run the following command to apply the policy created above to the database: DB2> AUDIT DATABASE USING POLICY <DB audit policy name>

b
DB2 must generate audit records when successful logons or connections occur.
AU-12 - Medium - CCI-000172 - V-213753 - SV-213753r879874_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-011400
Vuln IDs
  • V-213753
  • V-74647
Rule IDs
  • SV-213753r879874_rule
  • SV-89321
For completeness of forensic analysis, it is necessary to track who/what (a user or other principal) logs on to the DBMS.
Checks: C-14974r295308_chk

To meet these requirements at the VALIDATE, CONTEXT category auditing needs to be implemented at database level. Run the following SQL statement to ensure that an audit policy is defined upon the database: DB2&gt; SELECT AUDITPOLICYNAME, AUDITPOLICYID FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN (' ') If no rows are returned, this is a finding. Using the AUDITPOLICYID from above query find the details of audit policy: DB2&gt; SELECT AUDITPOLICYNAME, CONTEXTSTATUS, VALIDATESTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES WHERE AUDITPOLICYID = &lt;audit policy ID&gt; If the values for CONTEXTSTATUS and VALIDATESTATUS are not 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding.

Fix: F-14972r295309_fix

Run the following command to define an audit policy with the needed subset using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <audit policy name> CATEGORIES VALIDATE STATUS BOTH, CONTEXT STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, run the following command to apply the policy created above to the database: DB2> AUDIT DATABASE USING POLICY <audit policy name>

b
DB2 must generate audit records when unsuccessful logons or connection attempts occur.
AU-12 - Medium - CCI-000172 - V-213754 - SV-213754r879874_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-011500
Vuln IDs
  • V-213754
  • V-74645
Rule IDs
  • SV-213754r879874_rule
  • SV-89319
For completeness of forensic analysis, it is necessary to track failed attempts to log on to the DBMS. While positive identification may not be possible in a case of failed authentication, as much information as possible about the incident must be captured.
Checks: C-14975r295311_chk

To meet these requirements at the VALIDATE, CONTEXT category auditing needs to be implemented at database level. Run the following SQL statement to ensure that an audit policy is defined upon the database: DB2&gt; SELECT AUDITPOLICYNAME, AUDITPOLICYID FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN (' ') If no rows are returned, this is a finding. Using the AUDITPOLICYID from above query find the details of audit policy: DB2&gt; SELECT AUDITPOLICYNAME, CONTEXTSTATUS, VALIDATESTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES WHERE AUDITPOLICYID = &lt;audit policy ID&gt; If the values for CONTEXTSTATUS and VALIDATESTATUS are not 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding.

Fix: F-14973r295312_fix

Run the following command to define an audit policy with the needed subset using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <DB audit policy name> CATEGORIES VALIDATE STATUS BOTH, CONTEXT STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, run the following command to apply the policy created above to the database: DB2> AUDIT DATABASE USING POLICY <DB audit policy name>

b
DB2 must generate audit records for all privileged activities or other system-level access.
AU-12 - Medium - CCI-000172 - V-213755 - SV-213755r879875_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-011600
Vuln IDs
  • V-213755
  • V-74643
Rule IDs
  • SV-213755r879875_rule
  • SV-89317
Without tracking privileged activity, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. System documentation should include a definition of the functionality considered privileged. A privileged function in this context is any operation that modifies the structure of the database, its built-in logic, or its security settings. This would include all Data Definition Language (DDL) statements and all security-related statements. In an SQL environment, it encompasses, but is not necessarily limited to: CREATE ALTER DROP GRANT REVOKE There may also be Data Manipulation Language (DML) statements that, subject to context, should be regarded as privileged. Possible examples in SQL include: TRUNCATE TABLE; DELETE, or DELETE affecting more than n rows, for some n, or DELETE without a WHERE clause; UPDATE or UPDATE affecting more than n rows, for some n, or UPDATE without a WHERE clause; any SELECT, INSERT, UPDATE, or DELETE to an application-defined security table executed by other than a security principal. Depending on the capabilities of the DBMS and the design of the database and associated applications, audit logging may be achieved by means of DBMS auditing features, database triggers, other mechanisms, or a combination of these. Note that it is particularly important to audit, and tightly control, any action that weakens the implementation of this requirement itself, since the objective is to have a complete audit trail of all administrative activity.
Checks: C-14976r295314_chk

Run the following SQL statement to ensure that an audit policy is defined upon the database: DB2&gt; SELECT AUDITPOLICYNAME, AUDITPOLICYID FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN (' ') If no rows are returned, this is a finding. Using the AUDITPOLICYID from above query find the details of the audit policy: DB2&gt; SELECT AUDITPOLICYNAME, SECMAINTSTATUS, SYSADMINSTATUS, OBJMAINTSTATUS, AUDITSTATUS, CONTEXTSTATUS, ERRORTYPE FROM SYSCAT.AUDITPOLICIES WHERE AUDITPOLICYID = &lt;audit policy ID&gt; If the values for SECMAINTSTATUS, OBJMAINTSTATUS, SYSADMINSTATUS, AUDITSTATUS and CONTEXTSTATUS are not 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding.

Fix: F-14974r295315_fix

Define an audit policy with the needed subset using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <DB audit policy name> CATEGORIES SECMAINT STATUS BOTH, OBJMAINT STATUS BOTH, AUDIT STATUS BOTH, SYSADMIN STATUS BOTH, CONTEXT STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, apply the policy created to the database: DB2> AUDIT DATABASE USING POLICY <DB audit policy name>

b
DB2 must generate audit records when unsuccessful attempts to execute privileged activities or other system-level access occur.
AU-12 - Medium - CCI-000172 - V-213756 - SV-213756r879875_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-011700
Vuln IDs
  • V-213756
  • V-74587
Rule IDs
  • SV-213756r879875_rule
  • SV-89261
Without tracking privileged activity, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. System documentation should include a definition of the functionality considered privileged. A privileged function in this context is any operation that modifies the structure of the database, its built-in logic, or its security settings. This would include all Data Definition Language (DDL) statements and all security-related statements. In an SQL environment, it encompasses, but is not necessarily limited to: CREATE ALTER DROP GRANT REVOKE Note that it is particularly important to audit, and tightly control, any action that weakens the implementation of this requirement itself, since the objective is to have a complete audit trail of all administrative activity. To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.
Checks: C-14977r295317_chk

Run the following SQL statement to ensure that an audit policy is defined upon the database: DB2&gt; SELECT AUDITPOLICYNAME, AUDITPOLICYID FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN (' ') If no rows are returned, this is a finding. Using the AUDITPOLICYID from above query find the details of audit policy: DB2&gt; SELECT AUDITPOLICYNAME, SECMAINTSTATUS, SYSADMINSTATUS, OBJMAINTSTATUS, AUDITSTATUS, CONTEXTSTATUS, ERRORTYPE FROM SYSCAT.AUDITPOLICIES WHERE AUDITPOLICYID = &lt;audit policy ID&gt; If the values for SECMAINTSTATUS, OBJMAINTSTATUS, SYSADMINSTATUS, AUDITSTATUS and CONTEXTSTATUS are not 'B' (Both) or 'F' (Failure), or ERRORTYPE is not 'A' (Audit), this is a finding.

Fix: F-14975r295318_fix

Define an audit policy with the needed subset using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <DB audit policy name> CATEGORIES SECMAINT STATUS BOTH, OBJMAINT STATUS BOTH, AUDIT STATUS BOTH, SYSADMIN STATUS BOTH, CONTEXT STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, apply the policy created above to the database: DB2> AUDIT DATABASE USING POLICY <DB audit policy name>

b
DB2 must generate audit records showing starting and ending time for user access to the database(s).
AU-12 - Medium - CCI-000172 - V-213757 - SV-213757r879876_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-011800
Vuln IDs
  • V-213757
  • V-74585
Rule IDs
  • SV-213757r879876_rule
  • SV-89259
For completeness of forensic analysis, it is necessary to know how long a user's (or other principal's) connection to the DBMS lasts. This can be achieved by recording disconnections, in addition to logons/connections, in the audit logs. Disconnection may be initiated by the user or forced by the system (as in a timeout) or result from a system or network failure. To the greatest extent possible, all disconnections must be logged.
Checks: C-14978r295320_chk

Run the following SQL statement to ensure that an audit policy is defined upon the database: DB2&gt; SELECT AUDITPOLICYNAME, AUDITPOLICYID FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN (' ') If no rows are returned, this is a finding. Using the AUDITPOLICYID from above query find the details of audit policy. DB2&gt; SELECT AUDITPOLICYNAME, CONTEXTSTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES WHERE AUDITPOLICYID = &lt;audit policy ID&gt; If the value for CONTEXTSTATUS is not 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding.

Fix: F-14976r295321_fix

Run the following command to define an audit policy with the needed subset using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <DB audit policy name> CATEGORIES CONTEXT STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, run the following command to apply the policy created above to the database: DB2> AUDIT DATABASE USING POLICY <DB audit policy name>

b
DB2 must generate audit records when concurrent logons/connections by the same user from different workstations occur.
AU-12 - Medium - CCI-000172 - V-213758 - SV-213758r879877_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-011900
Vuln IDs
  • V-213758
  • V-74583
Rule IDs
  • SV-213758r879877_rule
  • SV-89257
For completeness of forensic analysis, it is necessary to track who logs on to the DBMS. Concurrent connections by the same user from multiple workstations may be valid use of the system; or such connections may be due to improper circumvention of the requirement to use the CAC for authentication; or they may indicate unauthorized account sharing; or they may be because an account has been compromised. (If the fact of multiple, concurrent logons by a given user can be reliably reconstructed from the log entries for other events (logons/connections; voluntary and involuntary disconnections), then it is not mandatory to create additional log entries specifically for this.)
Checks: C-14979r295323_chk

Run the following SQL statement to ensure that an audit policy is defined upon the database: DB2&gt; SELECT AUDITPOLICYNAME, AUDITPOLICYID FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN (' ') If no rows are returned, this is a finding. Using the AUDITPOLICYID from above query find the details of audit policy: DB2&gt; SELECT AUDITPOLICYNAME, CONTEXTSTATUS, VALIDATESTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES WHERE AUDITPOLICYID = &lt;audit policy ID&gt; If the values for CONTEXTSTATUS and VALIDATESTATUS are not 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding.

Fix: F-14977r295324_fix

Run the following command to define an audit policy with the needed subset using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <DB audit policy name> CATEGORIES VALIDATE STATUS BOTH, CONTEXT STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, Run the following command to apply the policy created above to the database: DB2> AUDIT DATABASE USING POLICY <DB audit policy name> Note: Group by IPADDRESS and validate from audit log.

b
DB2 must generate audit records when successful accesses to objects occur.
AU-12 - Medium - CCI-000172 - V-213759 - SV-213759r879878_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-012000
Vuln IDs
  • V-213759
  • V-74581
Rule IDs
  • SV-213759r879878_rule
  • SV-89255
Without tracking all or selected types of access to all or selected objects (tables, views, procedures, functions, etc.), it would be difficult to establish, correlate, and investigate the events relating to an incident, or identify those responsible for one. In an SQL environment, types of access include, but are not necessarily limited to: SELECT INSERT UPDATE DELETE EXECUTE
Checks: C-14980r295326_chk

Run the following SQL statement to ensure that an audit policy is defined upon the all required application tables, routines and/or the database: DB2&gt; SELECT AUDITPOLICYNAME, OBJECTSCHEMA, OBJECTNAME, OBJECTTYPE FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN ('T',' ') If no rows are returned, this is a finding. If a row with OBJECTTYPE of ' ' (Database; value is a blank) exists in the output, it is a database level policy. If a row with OBJECTTYPE of 'T' exists in the output, it is a table level policy. For each audit policy returned in the statement above, run the following SQL statement to confirm that the CONTEXT and EXECUTE categories are part of that policy: DB2&gt; SELECT AUDITPOLICYNAME, CONTEXTSTATUS, EXECUTESTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES If the database audit policy has the values for the CONTEXTSTATUS and EXECUTESTATUS columns set to 'S' (Success) or 'B' (Both) and the value in the ERRORTYPE column set to 'A' (Audit), this is not a finding. If the database policy does not exist or does not cover CONTEXTSTATUS or EXECUTESTATUS then check if the appropriate policies are defined for all the required application tables. If any required application table audit policies do not have the values for the CONTEXTSTATUS and EXECUTESTATUS columns set to 'S' (Success) or 'B' (Both) or the value in the ERRORTYPE column set to 'A' (Audit), then this is a finding. Note: If the routines (stored procedures) execution need to be audited then execute policy has to be defined at database level. In DB2 EXECUTE policy can be created at the Database level or table level. EXECUTE audit policy covers the routine also if defined at database level. Currently there is no provision to define auditing of individual/specified routines.

Fix: F-14978r295327_fix

Run the following command to define an audit policy with the needed subset using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <execdb> CATEGORIES CONTEXT STATUS BOTH, EXECUTE STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, run one of the following commands to apply the correct policy to either the database as a whole or to the specific application tables: DB2> AUDIT DATABASE USING POLICY EXECDB Or DB2> AUDIT TABLE <table name> USING POLICY EXECDB

b
DB2 must generate audit records when unsuccessful accesses to objects occur.
AU-12 - Medium - CCI-000172 - V-213760 - SV-213760r879878_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-012100
Vuln IDs
  • V-213760
  • V-74579
Rule IDs
  • SV-213760r879878_rule
  • SV-89253
Without tracking all or selected types of access to all or selected objects (tables, views, procedures, functions, etc.), it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. In an SQL environment, types of access include, but are not necessarily limited to: SELECT INSERT UPDATE DELETE EXECUTE To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.
Checks: C-14981r295329_chk

Run the following SQL statement to ensure that an audit policy is defined upon the all required application tables, routines and/or the database: DB2&gt; SELECT AUDITPOLICYNAME, OBJECTSCHEMA, OBJECTNAME, OBJECTTYPE FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN ('T',' ') If no rows are returned, this is a finding. If a row with OBJECTTYPE of ' ' (Database; value is a blank) exists in the output, it is a database level policy. If a row with OBJECTTYPE of 'T' exists in the output, it is a table level policy. For each audit policy returned in the statement above, run the following SQL statement to confirm that the CONTEXT and EXECUTE categories are part of that policy: DB2&gt; SELECT AUDITPOLICYNAME, CONTEXTSTATUS, EXECUTESTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES If the database audit policy has the values for the CONTEXTSTATUS and EXECUTESTATUS columns set to 'S' (Success) or 'B' (Both) and the value in the ERRORTYPE column set to 'A' (Audit), this is not a finding. If the database policy does not exist or does not cover CONTEXTSTATUS or EXECUTESTATUS then check if the appropriate policies are defined for all the required application tables. If any required application table audit policies do not have the values for the CONTEXTSTATUS and EXECUTESTATUS columns set to 'S' (Success) or 'B' (Both) or the value in the ERRORTYPE column set to 'A' (Audit), then this is a finding. Note: If the routines (stored procedures) execution need to be audited then execute policy has to be defined at database level. . In DB2 EXECUTE policy can be created at the Database level or table level. EXECUTE audit policy covers the routine also if defined at database level. Currently there is no provision to define auditing of individual/specified routines.

Fix: F-14979r295330_fix

Run the following command to define an audit policy with the needed subset using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <execdb> CATEGORIES CONTEXT STATUS BOTH, EXECUTE STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, run one of the following commands to apply the correct policy to either the database as a whole or to the specific application tables: DB2> AUDIT DATABASE USING POLICY EXECDB Or DB2> AUDIT TABLE <table name> USING POLICY EXECDB

b
DB2 must generate audit records for all direct access to the database(s).
AU-12 - Medium - CCI-000172 - V-213761 - SV-213761r879879_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
DB2X-00-012200
Vuln IDs
  • V-213761
  • V-74577
Rule IDs
  • SV-213761r879879_rule
  • SV-89251
In this context, direct access is any query, command, or call to the DBMS that comes from any source other than the application(s) that it supports. Examples would be the command line or a database management utility program. The intent is to capture all activity from administrative and non-standard sources.
Checks: C-14982r295332_chk

Run the following SQL statement to ensure that an audit policy is defined upon the database: DB2&gt; SELECT AUDITPOLICYNAME, AUDITPOLICYID FROM SYSCAT.AUDITUSE WHERE OBJECTTYPE IN (' ') If no rows are returned, this is a finding. Using the AUDITPOLICYID from above query find the details of audit policy: DB2&gt; SELECT AUDITPOLICYNAME, CONTEXTSTATUS, VALIDATESTATUS, ERRORTYPE AS ERRORTYPE FROM SYSCAT.AUDITPOLICIES WHERE AUDITPOLICYID = &lt;audit policy ID&gt; If the values for CONTEXTSTATUS and VALIDATESTATUS are not 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding.

Fix: F-14980r295333_fix

Run the following command to define an audit policy with the needed subset using the CREATE AUDIT POLICY SQL statement: DB2> CREATE AUDIT POLICY <DB audit policy name> CATEGORIES VALIDATE STATUS BOTH, CONTEXT STATUS BOTH ERROR TYPE AUDIT To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately. If CREATE was used above, run the following command to apply the policy created above to the database: DB2> AUDIT DATABASE USING POLICY <DB audit policy name>

b
DB2 must off-load audit data to a separate log management facility; this must be continuous and in near real time for systems with a network connection to the storage facility and weekly or more often for stand-alone systems.
AU-4 - Medium - CCI-001851 - V-213762 - SV-213762r879886_rule
RMF Control
AU-4
Severity
Medium
CCI
CCI-001851
Version
DB2X-00-012600
Vuln IDs
  • V-213762
  • V-74575
Rule IDs
  • SV-213762r879886_rule
  • SV-89249
Information stored in one location is vulnerable to accidental or incidental deletion or alteration. Off-loading is a common process in information systems with limited audit storage capacity. The DBMS may write audit records to database tables, to files in the file system, to other kinds of local repository, or directly to a centralized log management system. Whatever the method used, it must be compatible with off-loading the records to the centralized system.
Checks: C-14983r295335_chk

Run the following command to find the value of “Audit Data Path” and “Audit Archive Path” $db2audit describe DB2 can asynchronously extract the audit records in comma delimited format from “Audit Archive Path”. If a separate log management facility approved by the organization exists and is configured to absorb the comma delimited audit log files, this is not a finding. If a separate log management facility is not configured to absorb the extracted log data, this is a finding.

Fix: F-14981r295336_fix

Configure the separate log management facility to absorb audit logs data from comma delimited files produced by extracting the audit data from archived audit logs.

c
DB2 must use NSA-approved cryptography to protect classified information in accordance with the data owners requirements.
SC-13 - High - CCI-002450 - V-253507 - SV-253507r917672_rule
RMF Control
SC-13
Severity
High
CCI
CCI-002450
Version
DB2X-00-008600
Vuln IDs
  • V-253507
  • V-74597
Rule IDs
  • SV-253507r917672_rule
  • SV-89271
Use of weak or untested encryption algorithms undermines the purposes of utilizing encryption to protect data. The application must implement cryptographic modules adhering to the higher standards approved by the federal government since this provides assurance they have been tested and validated. It is the responsibility of the data owner to assess the cryptography requirements in light of applicable federal laws, Executive Orders, directives, policies, regulations, and standards. NSA-approved cryptography for classified networks is hardware based. This requirement addresses the compatibility of a DBMS with the encryption devices.
Checks: C-56960r917671_chk

If the database is in the unclassified environment, this is not applicable (NA). Verify the instance configuration parameters so that the instance is strictly compliant with NIST SP 800-131A. Check the DB2 registry variable DB2COMM is set to SSL: $db2set -all If DB2COMM is not set to SSL, this is a finding. Find the value of SSL_VERSIONS by running: $db2 get dbm cfg If SSL_VERSIONS is not set to TLSV12, this is a finding. Find the value of SSL_CIPHERSPECS by running: $db2 get dbm cfg If SSL_CIPHERSPECS is not set to a symmetric algorithm key length that is greater than or equal to 112, this is a finding. Find the value of SSL_SVC_LABEL by running: $db2 get dbm cfg If the parameter SSL_SVC_LABEL is not set to a certificate with RSA key length that is greater than or equal to 2048, this is a finding. If the certificate does not have a digital signature with minimum SHA2, this is a finding. The above settings ensure that all connections over SSL in any CLP or Java application strictly adhere to NIST SP 800-131A.

Fix: F-56910r855474_fix

Setting instance configuration parameters so that the instance is strictly compliant with NIST SP 800-131A. Set the DB2 registry variable DB2COMM to SSL: $db2set DB2COMM=SSL Set the DB2 database manager configuration parameter SSL_VERSIONS to TLSV12: $db2 update dbm cfg using SSL_VERSIONS TLSV12 Set the DB2 database manager configuration parameter SSL_CIPHERSPECS to a symmetric algorithm key length that is greater than or equal to 112: $db2 update dbm cfg using SSL_CIPHERSPECS TLS_RSA_WITH_AES_256_GCM_SHA384 Set the database manager configuration parameter SSL_SVC_LABEL to a certificate with RSA key length that is greater than or equal to 2048. That certificate must also have a digital signature with minimum SHA2. Create the certificate. Example: $gsk8capicmd_64 -cert -create -db "mydbserver.kdb" -pw "password" -size 2048 -sigalg SHA256WithRSA -label "myselfsigned_SHA2_2K" -dn "CN=myhost.mycompany.com,O=myOrganization, OU=myOrganizationUnit,L=myLocation,ST=ON,C=CA" $db2 update dbm cfg using SSL_SVR_LABEL myselfsigned_SHA_2K Note: Here is an example of SSL set up on Linux: 1. Create a directory "ssl" $mkdir ssl 2. Make sure gsk8capicmd_64 command in PATH $ export PATH=$PATH:/home/db2inst1/sqllib/gskit/bin 3. Make sure library is in path $ echo $LD_LIBRARY_PATH /home/db2inst1/sqllib/lib64:/home/db2inst1/sqllib/lib64/gskit:/home/db2inst1/sqllib/lib32 4. Go to ssl directory (/home/db2inst1/ssl) 5. Create Server key database $db2inst1@potserver:~/ssl> gsk8capicmd_64 -keydb -create -db "mydbserver.kdb" -pw "password" -stash $db2inst1@potserver:~/ssl> ls $mydbserver.crl mydbserver.kdb mydbserver.rdb mydbserver.sth 6. To create a self-signed certificate with a label of myselfsigned, use the GSKCapiCmd command as shown in the following example: $gsk8capicmd_64 -cert -create -db "mydbserver.kdb" -pw "password" -label "myselfsigned" -dn "CN=myhost.mycompany.com,O=myOrganization, OU=myOrganizationUnit,L=myLocation,ST=ON,C=CA" 7. Extract the certificate you just created to a file, so that you can distribute it to computers running clients that will be establishing SSL connections to your DB2 server. For example, the following GSKCapiCmd command extracts the certificate to a file called mydbserver.arm: $gsk8capicmd_64 -cert -extract -db "mydbserver.kdb" -pw "password" -label "myselfsigned" -target "mydbserver.arm" -format ascii -fips 8. Set database manager configuration parameters: $db2 update dbm cfg using SSL_SVR_KEYDB /home/db2inst1/ssl/mydbserver.kdb $db2 update dbm cfg using SSL_SVR_STASH /home/db2inst1/ssl/mydbserver.sth $db2 update dbm cfg using SSL_SVR_LABEL SSLLabel $db2 update dbm cfg using SSL_SVCENAME 50602 9. Add the value SSL to the DB2COMM registry variable. For example: $db2set -i db2inst1 DB2COMM=SSL or $db2set -i db2inst1 DB2COMM=SSL