Cis Ibm Db2 10 Benchmark v1.1.0 Archive
Cis Ibm Db2 10 Benchmark v1.1.0 Archive
v1.1.0 - 08-31-2016
Terms of Use
Please see the below link for our current terms of use:
https://www.cisecurity.org/cis-securesuite/cis-securesuite-membership-terms-of-use/
1|Page
Table of Contents
Terms of Use .............................................................................................................................................................1
Table of Contents ....................................................................................................................................................2
Overview ....................................................................................................................................................................7
Intended Audience ............................................................................................................................................7
Consensus Guidance .........................................................................................................................................7
Typographical Conventions...........................................................................................................................8
Scoring Information ..........................................................................................................................................8
Profile Definitions..............................................................................................................................................9
Acknowledgements ........................................................................................................................................ 11
Recommendations............................................................................................................................................... 12
1 Installation and Patches ........................................................................................................................... 12
1.1 Install the latest fix packs (Not Scored) ................................................................................ 12
1.2 Use IP address rather than hostname (Scored)................................................................. 13
1.3 Leverage the least privilege principle (Not Scored) ........................................................ 15
1.4 Use non-default account names (Scored) ............................................................................ 16
1.5 Configure DB2 to use non-standard ports (Not Scored)................................................ 17
1.6 Creating the database with the RESTERICTIVE clause (Not Scored) ....................... 19
2 DB2 Directory and File Permissions ................................................................................................... 22
2.1 Secure DB2 Runtime Library (Scored).................................................................................. 22
2.2 Secure the database container directory (Scored)........................................................... 24
2.3 Set umask value for DB2 admin user .profile file (Scored) ........................................... 25
2.4 Verify the groups within the DB2_GRP_LOOKUP environment variable are
appropriate (Windows only) (Not Scored) ................................................................................ 26
2.5 Verify the domains within the DB2DOMAINLIST environment variable are
appropriate (Windows only) (Not Scored) ................................................................................ 27
3 DB2 Configurations .................................................................................................................................... 28
3.1 DB2 Instance Parameter Settings ................................................................................................ 28
3.1.1 Enable audit buffer (Scored) ................................................................................................. 28
3.1.2 Encrypt user data across the network (Scored) ............................................................ 30
2|Page
3.1.3 Require explicit authorization for cataloging (Scored) .............................................. 32
3.1.4 Disable datalinks support (Scored) .................................................................................... 34
3.1.5 Secure permissions for default database file path (Scored) ..................................... 36
3.1.6 Set diagnostic logging to capture errors and warnings (Scored) ........................... 39
3.1.7 Secure permissions for all diagnostic logs (Scored) .................................................... 41
3.1.8 Require instance name for discovery requests (Scored) ........................................... 43
3.1.9 Disable instance discoverability (Scored) ........................................................................ 45
3.1.10 Authenticate federated users at the instance level (Scored) ................................. 47
3.1.11 Set maximum connection limits (Scored) ..................................................................... 49
3.1.12 Set administrative notification level (Scored) ............................................................. 52
3.1.13 Enable server-based authentication (Scored) ............................................................. 54
3.1.14 Set failed archive retry delay (Scored) ........................................................................... 56
3.1.15 Auto-restart after abnormal termination (Scored) ................................................... 58
3.1.16 Disable database discovery (Scored) .............................................................................. 60
3.1.17 Secure permissions for the primary archive log location (Scored) .................... 62
3.1.18 Secure permissions for the secondary archive log location (Scored) ................ 64
3.1.19 Secure permissions for the tertiary archive log location (Scored)...................... 66
3.1.20 Secure permissions for the log mirror location (Scored)........................................ 68
3.1.21 Establish retention set size for backups (Scored) ...................................................... 71
3.1.22 Set archive log failover retry limit (Scored) ................................................................. 73
3.2 Database Manager Configuration parameters ........................................................................ 75
3.2.1 TCP/IP service name - svcename (Scored)...................................................................... 75
3.2.2 SSL service name - ssl_svcename (Scored) ...................................................................... 77
3.2.3 Authentication type for incoming connections at the server - srvcon_auth
(Scored)..................................................................................................................................................... 79
3.2.4 Database Manager Configuration parameter: trust_allclnts (Not Scored) ......... 81
3.2.5 Database Manager Configuration parameter: trust_clntauth (Not Scored) ....... 83
4 Row and Column Access Control (RCAC) .......................................................................................... 85
4.1 Review Organization's Policies against DB2 RCAC Policies (Not Scored) .............. 85
4.2 Secure SECADM Authority (Not Scored) .............................................................................. 87
4.3 Review Users, Groups, and Roles (Not Scored) ................................................................. 89
3|Page
4.4 Review Row Permission logic according to policy (Not Scored)................................ 92
4.5 Review Column Mask logic according to policy (Not Scored) ..................................... 94
5 Database Maintenance .............................................................................................................................. 96
5.1 Enable Backup Redundancy (Not Scored) ........................................................................... 96
5.2 Protecting Backups (Not Scored) ............................................................................................ 97
5.3 Enable Automatic Database Maintenance (Scored)......................................................... 98
6 Securing Database Objects ................................................................................................................... 100
6.1 Restrict Access to SYSCAT.AUDITPOLICIES (Scored) .................................................. 100
6.2 Restrict Access to SYSCAT.AUDITUSE (Scored) ............................................................. 102
6.3 Restrict Access to SYSCAT.DBAUTH (Scored) ................................................................. 104
6.4 Restrict Access to SYSCAT.COLAUTH (Scored) .............................................................. 106
6.5 Restrict Access to SYSCAT.EVENTS (Scored) .................................................................. 108
6.6 Restrict Access to SYSCAT.EVENTTABLES (Scored) .................................................... 110
6.7 Restrict Access to SYSCAT.ROUTINES (Scored) ............................................................. 112
6.8 Restrict Access to SYSCAT.INDEXAUTH (Scored) ......................................................... 114
6.9 Restrict Access to SYSCAT.PACKAGEAUTH (Scored) ................................................... 116
6.10 Restrict Access to SYSCAT.PACKAGES (Scored) .......................................................... 118
6.11 Restrict Access to SYSCAT.PASSTHRUAUTH (Scored) ............................................. 120
6.12 Restrict Access to SYSCAT.SECURITYPOLICIES (Scored) ........................................ 122
6.13 Restrict Access to SYSCAT.SECURITYPOLICYEXEMPTIONS (Scored) ................ 124
6.14 Restrict Access to SYSCAT.SURROGATEAUTHIDS (Scored) ................................... 126
6.15 Restrict Access to SYSCAT.ROLEAUTH (Scored) ......................................................... 128
6.16 Restrict Access to SYSCAT.ROLES (Scored)................................................................... 130
6.17 Restrict Access to SYSCAT.ROUTINEAUTH (Scored)................................................. 132
6.18 Restrict Access to SYSCAT.SCHEMAAUTH (Scored) .................................................. 134
6.19 Restrict Access to SYSCAT.SCHEMATA (Scored)......................................................... 136
6.20 Restrict Access to SYSCAT.SEQUENCEAUTH (Scored) ............................................. 138
6.21 Restrict Access to SYSCAT.STATEMENTS (Scored) ................................................... 140
6.22 Restrict Access to SYSCAT.TABAUTH (Scored) ........................................................... 142
6.23 Restrict Access to SYSCAT.TBSPACEAUTH (Scored) ................................................. 144
4|Page
6.24 Restrict Access to Tablespaces (Scored) ........................................................................ 146
6.25 Restrict Access to SYSCAT.MODULEAUTH (Scored).................................................. 148
6.26 Restrict Access to SYSCAT.VARIABLEAUTH (Scored) .............................................. 150
6.27 Restrict Access to SYSCAT.WORKLOADAUTH (Scored) ........................................... 152
6.28 Restrict Access to SYSCAT.XSROBJECTAUTH (Scored) ............................................ 154
6.29 Restrict Access to SYSCAT.AUTHORIZATIONIDS (Scored) ..................................... 156
6.30 Restrict Access to SYSIBMADM.OBJECTOWNERS (Scored) .................................... 158
6.31 Restrict Access to SYSIBMADM.PRIVILEGES (Scored) ............................................. 160
7 DB2 Authorities ........................................................................................................................................ 162
7.1 Secure SYSADM authority (Scored)..................................................................................... 162
7.2 Secure SYSCTRL authority (Scored).................................................................................... 164
7.3 Secure SYSMAINT Authority (Scored) ............................................................................... 166
7.4 Secure SYSMON Authority (Scored) .................................................................................... 168
7.5 Secure SECADM Authority (Scored).................................................................................... 170
7.6 Secure DBADM Authority (Scored) ..................................................................................... 172
7.7 Secure SQLADM Authority (Scored) ................................................................................... 174
7.8 Secure DATAACCESS Authority (Scored).......................................................................... 176
7.9 Secure ACCESSCTRL Authority (Scored) .......................................................................... 178
7.10 Secure WLMADM authority (Scored) .............................................................................. 180
7.11 Secure CREATAB Authority (Scored)............................................................................... 181
7.12 Secure BINDADD Authority (Scored)............................................................................... 183
7.13 Secure CONNECT Authority (Scored) .............................................................................. 185
7.14 Secure LOAD Authority (Scored) ....................................................................................... 187
7.15 Secure EXTERNALROUTINE Authority (Scored) ........................................................ 189
7.16 Secure QUIESCECONNECT Authority (Scored) ............................................................ 191
8 DB2 Roles .................................................................................................................................................... 193
8.1 Review Roles (Scored) .............................................................................................................. 193
8.2 Review Role Members (Scored)............................................................................................ 195
8.3 Nested Roles (Scored)............................................................................................................... 197
8.4 Review Roles granted to PUBLIC (Scored) ....................................................................... 199
5|Page
8.5 Review Role Grantees with WITH ADMIN OPTION (Scored) ................................... 201
9 General Policy and Procedures........................................................................................................... 203
9.1 Start and Stop DB2 Instance (Not Scored) ....................................................................... 203
9.2 Remove Unused Schemas (Not Scored)............................................................................. 205
9.3 Review System Tablespaces (Scored) ................................................................................ 207
9.4 Remove Default Databases (Scored) ................................................................................... 209
9.5 Enable SSL communication with LDAP server (Scored) ............................................. 211
9.6 Secure the permission of the IBMLDAPSecurity.ini file (Scored) ........................... 213
9.7 Secure the permission of the SSLconfig.ini file (Scored) ............................................ 215
9.8 Ensure Trusted Contexts are enabled (Not Scored) ..................................................... 217
9.9 Secure plug-in library locations (Not Scored)................................................................. 218
9.10 Ensure that security plug-in support for two-part user IDs is enabled (Not
Scored) ................................................................................................................................................... 220
9.11 Ensure permissions on communication exit library locations (Not Scored) ... 222
9.12 Ensure audit policies are enabled within the database (Not Scored) ................. 224
Appendix: Summary Table ........................................................................................................................... 225
Appendix: Change History ............................................................................................................................ 229
6|Page
Overview
This is the archive of the CIS Benchmark for IBM Db2 10. CIS encourages
you to migrate to a more recent, supported version of this technology.
This document, Security Configuration Benchmark for IBM DB2, provides prescriptive
guidance for establishing a secure configuration posture for DB2 versions 10.x running on
Linux and Windows. This guide was tested against DB2 version 10.5 installed on Windows
Server 2008 R2 and CentOS 6. To obtain the latest version of this guide, please visit
http://cisecurity.org. If you have questions or comments, or have identified ways to
improve this guide, please write us at [email protected].
Intended Audience
This document is intended for system and application administrators, security specialists,
auditors, help desk, and platform deployment personnel, who plan to develop, deploy,
assess, or secure solutions that incorporate DB2 on Linux and Windows platforms.
Consensus Guidance
This benchmark was created using a consensus review process comprised of subject
matter experts. Consensus participants provide perspective from a diverse set of
backgrounds including consulting, software development, audit and compliance, security
research, operations, government, and legal.
Each CIS benchmark undergoes two phases of consensus review. The first phase occurs
during initial benchmark development. During this phase, subject matter experts convene
to discuss, create, and test working drafts of the benchmark. This discussion occurs until
consensus has been reached on benchmark recommendations. The second phase begins
after the benchmark has been published. During this phase, all feedback provided by the
Internet community is reviewed by the consensus team for incorporation in the
benchmark. If you are interested in participating in the consensus process, please visit
https://community.cisecurity.org.
7|Page
Typographical Conventions
The following typographical conventions are used throughout this guide:
Convention Meaning
Stylized Monospace font Used for blocks of code, command, and script examples.
Text should be interpreted exactly as presented.
Monospace font Used for inline code, commands, or examples. Text should
be interpreted exactly as presented.
<italic font in brackets> Italic texts set in angle brackets denote a variable
requiring substitution for a real value.
Scoring Information
A scoring status indicates whether compliance with the given recommendation impacts the
assessed target's benchmark score. The following scoring statuses are used in this
benchmark:
Scored
Failure to comply with "Scored" recommendations will decrease the final benchmark score.
Compliance with "Scored" recommendations will increase the final benchmark score.
Not Scored
Failure to comply with "Not Scored" recommendations will not decrease the final
benchmark score. Compliance with "Not Scored" recommendations will not increase the
final benchmark score.
8|Page
Profile Definitions
The following configuration profiles are defined by this Benchmark:
• Level 1 - RDBMS
Items in this profile apply to the RDBMS proper and intend to:
• Level 2 - RDBMS
This profile extends the "Level 1" profile. Items in this profile exhibit one or more of
the following characteristics:
Items in this profile apply to the Windows Host OS proper and intend to:
This profile extends "Level 1 - Windows Host OS". Items in this profile exhibit one or
more of the following characteristics:
Items in this profile apply to the Linux Host OS proper and intend to:
9|Page
o Provide a clear security benefit; and
o Not inhibit the utility of the technology beyond acceptable means.
This profile extends "Level 1 - Linux Host OS". Items in this profile exhibit one or
more of the following characteristics:
10 | P a g e
Acknowledgements
This benchmark exemplifies the great things a community of users, vendors, and subject matter
experts can accomplish through consensus collaboration. The CIS community thanks the entire
consensus team with special recognition to the following individuals who contributed greatly to
the creation of this guide:
Contributor
Adam Montville
Chris Bielinski
Editor
Karen Scarfone
Timothy Harrison
11 | P a g e
Recommendations
1 Installation and Patches
1.1 Install the latest fix packs (Not Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 – RDBMS
Description:
Periodically, IBM releases fix packs to enhance features and resolve defects, including
security defects. It is recommended that the DB2 instance remain current with all fix packs.
Rationale:
Installing the latest DB2 fix pack will help protect the database from known vulnerabilities
as well as reduce downtime that may otherwise result from functional defects.
Audit:
$ db2level
DB21085I Instance "DB2" uses "32" bits and DB2 code release "SQL09050" with level
identifier "03010107".
Informational tokens are "DB2 v9.5.0.808", "s071001", "NT3295", and Fix Pack "3".
Remediation:
12 | P a g e
1.2 Use IP address rather than hostname (Scored)
Profile Applicability:
Description:
Use an IP address rather than a hostname to connect to the host of the DB2 instance.
Rationale:
Using a hostname to connect to a DB2 instance can display useful information about the
host to an attacker. For example, hostnames for DB2 instances often contain the DB2
version number, host type, or operating system type.
Audit:
Windows:
1. Run DB2 Command Prompt - Administrator
2. Type 'db2 list node directory show detail'
3. Verify that the 'HOSTNAME' values for all nodes listed are in IP address form and
not hostnames
Linux:
1. Log into DB2 as DB2 Instance owner
2. Type 'db2 list node directory show detail'
3. Verify that the 'HOSTNAME' values for all nodes listed are in IP address form and
not hostnames
Sample:
Node Directory
Number of entries in the directory = 2
Node 1 entry:
Node name = SAMPLE
Comment =
Directory entry type = LDAP
Protocol = TCPIP
Hostname = 192.168.145.10
Service name = 50000
13 | P a g e
Remediation:
Default Value:
IP address
14 | P a g e
1.3 Leverage the least privilege principle (Not Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 – RDBMS
Description:
The DB2 database instance will execute under the context of a given security principle. It is
recommended that this service have the least privileges possible. Furthermore, it is
advisable to have the DB2 service executed using the DB2 instance owner and monitor
such accounts for unauthorized access to the sensitive data.
Rationale:
Leveraging a least privilege account for the DB2 service will reduce an attacker's ability to
compromise the host operating system should the DB2 service process become
compromised.
Audit:
Review all accounts that have access to the DB2 database service to ensure least privilege is
applied.
Remediation:
Ensure that all accounts have the absolute minimal privilege granted to perform their tasks.
15 | P a g e
1.4 Use non-default account names (Scored)
Profile Applicability:
Description:
The DB2 service is installed with default accounts with well-known names such as
db2admin, db2inst1, dasusr1, or db2fenc1. It is recommended that the use of these account
names be avoided. The default accounts may be renamed and then used.
Rationale:
The use of default account names may increase the DB2 service's susceptibility to
unauthorized access by an attacker.
Audit:
For Windows:
1. Review the list of users for the system and confirm that none of the account names
are db2admin, db2inst1, dasusr1, or db2fenc1.
For Linux:
1. Review /etc/passwd and confirm that none of the account names are db2admin,
db2inst1, dasusr1, or db2fenc1.
Remediation:
For each account with a default name, either change the name to a name that is not well-
known or delete the account if it is not needed.
16 | P a g e
1.5 Configure DB2 to use non-standard ports (Not Scored)
Profile Applicability:
Description:
If enabled, the default DB2 instance will be assigned a default port of TCP:50000 for TCP/IP
communication. TCP:50000 is a widely known DB2 port, so this port assignment should be
changed. Though deprecated, if you still use the DAS, its default port uses TCP:523 and
should be changed.
Rationale:
Using a non-default port helps reduce the number of attacks directed at the database
through its port.
Audit:
Use the appropriate command below to identify the assigned port and confirm that it does
not use the default value of 50000.
Linux:
cat etc/services | grep db2
Windows:
netstat -bao
Remediation:
Assign a non-default port (a value other than 50000) to the default DB2 instance.
Impact:
Changing the port will break connectivity for any servers, clients, etc. configured to access
the DB instance at the original port. Any port number changes need to be coordinated to
prevent inadvertent outages.
17 | P a g e
References:
1. http://www.ibm.com/support/knowledgecenter/en/SSEPGG_10.5.0/com.ibm.db2.l
uw.admin.config.doc/doc/c0060794.html
18 | P a g e
1.6 Creating the database with the RESTERICTIVE clause (Not Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
This parameter indicates whether the database was created with the RESTRICTIVE clause
in the CREATE DATABASE statement. When creating a database, the use of the RESTRICTIVE
clause will cause certain commands to be revoked from PUBLIC.
Rationale:
Allowing the default privileges granted to the group PUBLIC to remain in tack can have
negative impacts on the database as well as undermine measures put in place to limit
access to authorized users.
Audit:
db2=> select case when value = '-1' then 'automatic' when value = '' then 'NULL'
else value end as value from sysibmadm.dbcfg where name = 'restrict_access'
Remediation:
There is no remediation for this parameter due to the fact that the placement of the
RESTRICTIVE clause happens within the CREATE DATABASE statement. Unless your backup
strategies allow for a complete overhaul of your environment where you are able to recreate the
database with the RESTRICTIVE clause, we do not recommend changing this parameter.
However, if you would like to align your database configuration to that which
the RESTRICTIVE clause would provide, please ensure the following:
• CREATETAB
• BINDADD
19 | P a g e
• CONNECT
• IMPLICIT_SCHEMA
20 | P a g e
8. SYSCAT.WORKLOADAUTH – Ensure PUBLIC is NOT granted the USAGE privilege on
SYSDEFAULTUSERWORKLOAD.
References:
1. https://www.ibm.com/support/knowledgecenter/en/SSEPGG_10.5.0/com.ibm.db2
.luw.admin.cmd.doc/doc/r0001941.html
2. https://www.ibm.com/support/knowledgecenter/en/SSEPGG_10.5.0/com.ibm.db2
.luw.admin.sec.doc/doc/c0054269.html
21 | P a g e
2 DB2 Directory and File Permissions
This section provides guidance on securing all operating system specific objects for DB2.
Description:
A DB2 software installation will place all executables under the default <DB2PATH>\sqllib
directory. This directory needs to be secured so it grants only the necessary access to
authorized users and administrators.
Rationale:
The DB2 runtime is comprised of files that are executed as part of the DB2 service. If these
resources are not secured, an attacker may alter them to execute arbitrary code.
Audit:
For Linux:
OS => ls -al
22 | P a g e
Remediation:
For Windows:
For Linux:
23 | P a g e
2.2 Secure the database container directory (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
Rationale:
The containers are needed in order for the database to operate properly. The loss of the
containers can cause down time. Also, allowing excessive access to the containers may help
an attacker to gain access to their contents. Therefore, secure the location(s) of the
containers by restricting the access and ownership. Allow only the instance owner to have
access to the tablespace containers.
Audit:
Review all users that have access to the directory of the containers to ensure only DB2
administrators have full access. All other users should have read-only access.
Remediation:
Set the privileges for the directory of the containers so that only DB2 administrators have
full access, and all other users have read-only access.
24 | P a g e
2.3 Set umask value for DB2 admin user .profile file (Scored)
Profile Applicability:
Description:
The DB2 Admin .profile file in Linux sets the environment variables and the settings for the
user.
Rationale:
The umask value should be set to 022 for the owner of the DB2 software at all times.
Audit:
Remediation:
25 | P a g e
2.4 Verify the groups within the DB2_GRP_LOOKUP environment
variable are appropriate (Windows only) (Not Scored)
Profile Applicability:
Description:
Rationale:
Periodic review of these groups is required to ensure that non-essential groups do not have
unnecessary authorization.
Audit:
Verify that the DB2_GRP_LOOKUP environment variable includes only the appropriate
groups listed within the local machine/domain.
db2set -all
Remediation:
Alter the value of the DB2_GRP_LOOKUP environment variable so that it includes only the
appropriate groups listed within the local machine/domain.
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec
.doc/doc/t0005914.html
26 | P a g e
2.5 Verify the domains within the DB2DOMAINLIST environment
variable are appropriate (Windows only) (Not Scored)
Profile Applicability:
Description:
It is possible to have a user id be represented across multiple domains. Issues could arise
when trying to authenticate such a user id. To prevent these issues, a listing of domains
should be defined within the DB2DOMAINLIST environment variable. Note: the
DB2DOMAINLIST is only effective if the authentication parameter is set to CLIENT.
Rationale:
Periodic review of the domain list assigned to the DB2DOMAINLIST environment variable
helps ensure that non-essential domains do not have unnecessary authorizations.
Audit:
Verify that the DB2DOMAINLIST environment variable includes only the appropriate
domains.
db2set -all
Remediation:
Alter the value of the DB2DOMAINLIST environment variable so that it includes only the
appropriate domains.
References:
1. https://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec
.doc/doc/t0011962.html?lang=en
27 | P a g e
3 DB2 Configurations
3.1 DB2 Instance Parameter Settings
This section provides guidance on how DB2 will control the data in the databases and the
system resources that are allocated to the instance.
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
DB2 can be configured to use an audit buffer. It is recommended that the audit buffer size
be set to at least 1000.
Rationale:
Increasing the audit buffer size to greater than 0 will allocate space for the audit records
generated by the audit facility. At scheduled intervals, or when the audit buffer is full, the
db2auditd audit daemon empties the audit buffer to disk, writing the audit records
asynchronously.
Audit:
28 | P a g e
db2 => get database manager configuration
Remediation:
29 | P a g e
3.1.2 Encrypt user data across the network (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
Rationale:
Audit:
db2 => get database manager configuration db2 => … Database manager
authentication (AUTHENTICATION) = DATA_ENCRYPT
Note: AUTHENTICATION is set to DATA_ENCRYPT in the above output.
30 | P a g e
Remediation:
31 | P a g e
3.1.3 Require explicit authorization for cataloging (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
DB2 can be configured to allow users that do not possess the SYSADM authority to catalog
and uncatalog databases and nodes. It is recommended that the catalog_noauth
parameter be set to NO.
Rationale:
Cataloging a database is the process of registering a database from a remote client to allow
remote call and access. Setting catalog-noauth to YES bypasses all permissions checks
and allows anyone to catalog and uncatalog databases.
Audit:
32 | P a g e
db2 => get database manager configuration
db2 => …
Cataloging allowed without authority (CATALOG_NOAUTH) = NO
Note: CATALOG_NOAUTH is set to NO in the above output.
Remediation:
Perform the following to require explicit authorization to catalog and uncatalog databases
and nodes.
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_9.1.0/com.ibm.db2.udb.admin.doc
/doc/r0000143.htm?cp=SSEPGG_9.1.0%2F11-0-0-4-3
33 | P a g e
3.1.4 Disable datalinks support (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
Datalinks enables the database to support the Data Links Manager to manage
unstructured data, such as images, large files and other unstructured files on the host. It is
recommended that datalinks support be disabled.
Rationale:
Disable datalinks if there is no use for them as this will reduce the attack surface of the
DB2 service.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
34 | P a g e
Remediation:
35 | P a g e
3.1.5 Secure permissions for default database file path (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The dftdbpath parameter contains the default file path used to create DB2 databases. It is
recommended that the permissions for this directory be set to full access for DB2
administrators and read and execute access only for all other accounts. It is also
recommended that this directory be owned by the DB2 Administrator.
Rationale:
Restricting access to the directory used as the default file path through permissions will
help ensure that the confidentiality, integrity, and availability of the files there are
protected.
Audit:
3. Locate this value in the output to find the default file path:
36 | P a g e
db2 => get database manager configuration
db2 => …
Default database path (DFTDBPATH) = <valid directory>
Additional steps for Windows:
OS => ls -al
Remediation:
2. Run the following command from the DB2 command window to change the default
file path, if necessary:
db2 => update database manager configuration using dftdbpath <valid directory>
Additional steps for Windows:
37 | P a g e
Additional steps for Linux:
38 | P a g e
3.1.6 Set diagnostic logging to capture errors and warnings (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The diaglevel parameter specifies the type of diagnostic errors that will be recorded in
the db2diag.log file. It is recommended that the diaglevel parameter be set to at least 3.
Rationale:
The recommended diaglevel setting is 3, but any value greater than 3 is also acceptable. A
value of at least 3 will allow the DB2 instance to capture all errors and warnings that occur
on the system.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
39 | P a g e
Remediation:
40 | P a g e
3.1.7 Secure permissions for all diagnostic logs (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The diagpath parameter specifies the location of the diagnostic files for the DB2 instance.
The directory at this location should be secured so that users have read and execute
privileges only (no write privileges). All DB2 administrators should have full access to the
directory.
Rationale:
Securing the directory will ensure that the confidentiality, integrity, and availability of the
diagnostic files contained in the directory are preserved.
Audit:
For both Windows and Linux, perform the following DB2 commands to obtain the location
of the directory:
41 | P a g e
Additional steps for Windows:
OS => ls -al
Remediation:
For Windows and Linux, to change the directory for the diagnostic logs:
db2 => update database manager configuration using diagpath <valid directory>
Additional steps for Windows:
42 | P a g e
3.1.8 Require instance name for discovery requests (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The discover parameter determines what kind of discovery requests, if any, the DB2
server will fulfill. It is recommended that the DB2 server only fulfill requests from clients
that know the given instance name (discover parameter value of known).
Rationale:
Discovery capabilities may be used by a malicious entity to derive the names of and target
DB2 instances. In this configuration, the client has to specify a known instance name to be
able to detect the instance.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
43 | P a g e
Remediation:
Impact:
44 | P a g e
3.1.9 Disable instance discoverability (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The discover_inst parameter specifies whether the instance can be discovered in the
network. It is recommended that instances not be discoverable.
Rationale:
Discovery capabilities may be used by a malicious entity to derive the names of and target
DB2 instances.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
45 | P a g e
Remediation:
46 | P a g e
3.1.10 Authenticate federated users at the instance level (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
Rationale:
Setting fed_noauth to no will ensure that authentication is checked at the instance level.
This will prevent any federated authentication from bypassing the client and the server.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
47 | P a g e
Remediation:
48 | P a g e
3.1.11 Set maximum connection limits (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
NOTE: Ensure that dependent parameters, such as maxappls, are set less than the
max_coordagents parameter. This would ensure that the lock limit isn't reached, which
would result in lock escalation issues.
Rationale:
By default, DB2 allows an unlimited number of users to access the DB2 instance. In addition
to giving access to the DB2 instance to authorized users only, it is recommended to set a
limit to the number of users allowed to access a DB2 instance. This helps prevent denial of
service conditions should an authorized process malfunction and attempt a large number
of simultaneous connections.
Audit:
Perform the following DB2 commands to obtain the value(s) for these settings:
49 | P a g e
2. Run the following command from the DB2 command window:
Note: MAX_CONNECTIONS is set to 150 and the MAX_COORDAGENTS is set to 150 in the
above output.
Perform the following DB2 commands to obtain the value of the MAXAPPLS parameter:
Remediation:
The default value for max_coordagents is set to AUTOMATIC. Allowable range is 1 to 64,000,
or -1 for unlimited. The recommended value is 100. The following command will set the
max_coordagents to 100, as well as set the max_connections to AUTOMATIC which is also
recommended.
50 | P a g e
If maxappls is NOT less than the value for max_coordagents, then adjust the value of
maxappls accordingly:
db2 => update database configuration using maxappls <a number less then
max_coordagents>
Default Value:
51 | P a g e
3.1.12 Set administrative notification level (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The notifylevel parameter specifies the type of administration notification messages that
are written to the administration notification log. It is recommended that this parameter be
set greater than or equal to 3. A setting of 3, which includes settings 1 & 2, will log all fatal
errors, failing services, system integrity, as well as system health.
Rationale:
The system should be monitoring all Health Monitor alarms, warnings, and attentions. This
may give an indication of any malicious usage on the DB2 instance.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
52 | P a g e
Note: NOTIFYLEVEL is set to 3 in the above output.
Remediation:
Default Value:
53 | P a g e
3.1.13 Enable server-based authentication (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The srvcon_auth parameter specifies how and where authentication is to take place for
incoming connections to the server. It is recommended that this parameter is not set to
CLIENT.
Rationale:
This parameter will take precedence over and override the authentication level.
Authentication should be set on the server side.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
54 | P a g e
Remediation:
The recommended value is SERVER. Note: this will require a DB2 restart.
Impact:
55 | P a g e
3.1.14 Set failed archive retry delay (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The archretrydelay parameter specifies the number of seconds the DB2 service will wait
before it reattempts to archive log files after a failure. It is recommended that this
parameter be set anywhere in the range of 10-30. You do not want the delay to be so short
that the database ends up in a denial of service scenario, but you don't want the delay to be
too long if an outside attack happens at the same time.
Rationale:
Ensure that the value is non-zero, otherwise archive logging will not retry after the first
failure. A denial of service attack can render the database without an archive log if this
setting is not set. An archive log will ensure that all transactions can safely be restored or
logged for auditing.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
56 | P a g e
3. Locate the ARCHRETRYDELAY value in the output:
Remediation:
2. To successfully set the archretrydelay within the 10-30 range, run the following
command from the DB2 command window:
Default Value:
57 | P a g e
3.1.15 Auto-restart after abnormal termination (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The autorestart parameter specifies if the database instance should restart after an
abnormal termination. It is recommended that this parameter be set to ON.
Rationale:
Setting the database to auto-restart will reduce the downtime of the database.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
db2 => get database configuration db2 => … Auto restart enabled (AUTORESTART)
= ON
58 | P a g e
Remediation:
59 | P a g e
3.1.16 Disable database discovery (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The discover_db parameter specifies if the database will respond to a discovery request
from a client. It is recommended that this parameter be set to DISABLE.
Rationale:
Setting the database discovery to disabled can hide a database with sensitive data.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
60 | P a g e
Remediation:
61 | P a g e
3.1.17 Secure permissions for the primary archive log location (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The logarchmeth1 parameter specifies the type of media and the location used as the
primary destination of archived logs. It is recommended that the directory used for the
archived logs be set to full access for DB2 administrator accounts and read and execute for
all other accounts.
Rationale:
Restricting access to the contents of the primary archive log directory will help ensure that
the confidentiality, integrity, and availability of archive logs are protected.
Although there are many ways to ensure that your primary logs will be archived, we
recommend using the value of DISK as part of the logarchmeth1 parameter. This will
properly ensure that the primary logs are archived. A finding of OFF is not acceptable.
Audit:
62 | P a g e
3. Locate this value in the output to find the primary archive log directory:
OS => ls -al
Remediation:
Additional steps for Linux (assuming that the logarchmeth1 parameter includes DISK):
63 | P a g e
3.1.18 Secure permissions for the secondary archive log location (Scored)
Profile Applicability:
Description:
The logarchmeth2 parameter specifies the type of media and the location used as the
secondary destination for archived logs. It is recommended that the directory used for the
archived logs be set to full access for DB2 administrator accounts and read and execute
only for all other accounts.
Rationale:
Restricting access to the contents of the secondary archive log directory will help ensure
that the confidentiality, integrity, and availability of archive logs are protected.
Although there are many ways to ensure that your logs will be archived, we recommend
using the value of DISK as part of the logarchmeth2 parameter. This will properly ensure
that the logs are archived. A finding of OFF is not acceptable.
Audit:
3. Locate this value in the output to find the secondary archive log directory:
64 | P a g e
Additional steps for Windows:
OS => ls -al
Remediation:
Additional steps for Linux (assuming that the logarchmeth2 parameter includes DISK):
65 | P a g e
3.1.19 Secure permissions for the tertiary archive log location (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The failarchpath parameter specifies the type of media and the location used as the
tertiary destination of archived logs. It is recommended that the directory used for the
archived logs be set to full access for DB2 administrator accounts and read and execute
only for all other accounts.
Rationale:
Restricting access to the contents of the tertiary archive log directory will help ensure that
the confidentiality, integrity, and availability of archive logs are protected.
Although there are many ways to ensure that your logs will be archived, we recommend
using the value of DISK as part of the failarchpath parameter. This will properly ensure
that the logs are archived. A finding of OFF is not acceptable.
Audit:
3. Locate this value in the output to find the tertiary archive log directory:
66 | P a g e
db2 => get database manager configuration
db2 => ...
Default database path (FAILARCHPATH) = <valid directory>
OS => ls -al
Remediation:
67 | P a g e
3.1.20 Secure permissions for the log mirror location (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The mirrorlogpath parameter specifies the type of media and the location used to store
the mirror copy of the logs. It is recommended that the directory used for the mirror copy
of the logs be set to full access for DB2 administrator accounts and read and execute only
for all other accounts.
Rationale:
A mirror log path should not be empty and it should be a valid path. The mirror log path
stores a second copy of the active log files. Access to the directory pointed to by that path
should be restricted through permissions to help ensure that the confidentiality, integrity,
and availability of the mirror logs are protected.
Audit:
For Windows and Linux, perform the following DB2 commands to obtain the directory
location:
68 | P a g e
db2 => get database configuration
db2 => …
Mirror log path (MIRRORLOGPATH) = C:\DB2MIRRORLOGS
Note: MIRRORLOGPATH is set to C:\DB2MIRRORLOGS in the above output.∂
OS => ls -al
Remediation:
2. Run the following command from the DB2 command window to change the mirror
log directory, if necessary:
69 | P a g e
2. Change to the mirror log directory
3. Change the permissions for the directory
70 | P a g e
3.1.21 Establish retention set size for backups (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The num_db_backups parameter specifies the number of backups to retain for a database
before marking the oldest backup as deleted. It is recommended that this parameter be set
to at least 12.
Rationale:
Retain multiple copies of the database backup to ensure that the database can recover from
an unexpected failure. This parameter should not be set to 0. Multiple backups should be
kept to ensure that all logs and transactions can be used for auditing.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
71 | P a g e
Note: NUM_DB_BACKUPS is set to 12 in the above output.
Remediation:
72 | P a g e
3.1.22 Set archive log failover retry limit (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The numarchretry parameter determines how many times a database will try to archive
the log file to the primary or the secondary archive destination before trying the failover
directory. It is recommended that this parameter be set to 5.
Rationale:
Establishing a failover retry time limit will ensure that the database will always have a
means to recover from an abnormal termination. This parameter should not be set to 0.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
73 | P a g e
Note: NUMARCHRETRY is set to 5 in the above output.
Remediation:
74 | P a g e
3.2 Database Manager Configuration parameters
Database Configuration Parameters set several resource limits [values] to be allocated to a
database. Many database configuration parameters can be modified to optimize
performance and capacity.
• Level 2 - RDBMS
Description:
The svcename parameter reserves the port number (or name, on Linux hosts) for listening
to incoming communications from a Data Server Runtime Client. Both the database server
port number or name and the TCP/IP service name must be defined on the database client.
Rationale:
When the database server is started, a port number or name is required to listen for
incoming connection requests. The svcename parameter defines the port number or name
for incoming connection requests. On Linux systems, the services file is found at:
/etc/services
Audit:
Run the following command to determine if the svcename parameter value is correctly set
and is not the default port (50000).
select name, value from sysibmadm.dbmcfg where name = 'svcename'
Remediation:
75 | P a g e
References:
1. https://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.co
nfig.doc/doc/r0000273.html?lang=en
76 | P a g e
3.2.2 SSL service name - ssl_svcename (Scored)
Profile Applicability:
• Level 2 - RDBMS
Description:
The ssl_svcename configuration parameter defines the name or number of the port the
database server listens for communications from remote client nodes using SSL protocol.
The ssl_svcename and the svcename port numbers cannot be the same.
Rationale:
The database requires a defined port to listen for incoming remote clients using the SSL
protocol. The ssl_svcename configuration parameter defines the port for communicating
with remote clients.
Consider using a non-default port to help protect the database from attacks directed to a
default port.
Audit:
Run the following command to determine if the current ssl_svcename parameter value is
correctly set and is not a default port (50000).
select name, value from sysibmadm.dbmcfg where name = 'ssl_svcename'
Remediation:
Default Value:
Null
77 | P a g e
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.co
nfig.doc/doc/r0053615.html
78 | P a g e
3.2.3 Authentication type for incoming connections at the server -
srvcon_auth (Scored)
Profile Applicability:
• Level 2 - RDBMS
Description:
The srvcon_auth parameter defines where and how user authentication is done for
incoming connections at the server. If no value is used, DB2 uses the database manager
configuration parameter authentication.
Rationale:
Incoming connections to the DB2 server must follow an authentication protocol. The
srvcon_auth server configuration parameter defines how and where user authentication is
done.
Audit:
Run the following command to identify the current value of the srvcon_auth database
configuration parameter:
select name, value from sysibmadm.dbmcfg where name = 'srvcon_auth'
Remediation:
Run the following command to update the current value of the srvcon_auth database
configuration parameter to the correct value:
db2 => update dbm cfg using srvcon_auth <any supported authentication>
Default Value:
Not specified
79 | P a g e
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.co
nfig.doc/doc/r0011454.html?lang=en
80 | P a g e
3.2.4 Database Manager Configuration parameter: trust_allclnts (Not
Scored)
Profile Applicability:
Description:
This parameter is used to determine where users are validated within the database
environment (client-side authentication). If the parameter is set to 'YES', the server
assumes that the client side is handling authentication to the database. If the parameter is
set to 'NO', the client must provide authentication to the server on behalf of the user.
This parameter is only active when the authentication parameter is set to CLIENT.
Rationale:
This parameter is relied upon to determine whether each user (client) needs to be
authenticated by the server or if the server should assume that each user (client) has
already been sufficiently authenticated.
Audit:
The value should be 'YES' for client-side authentication and 'NO' for server-side
authentication.
81 | P a g e
Remediation:
To specify client-side authentication, issue the following command to set the parameter to
'YES':
db2=> update dbm cfg using trust_allclnts YES
To specify server-side authentication, issue the following command to set the parameter to
'NO':
db2=> update dbm cfg using trust_allclnts NO
References:
1. http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.
admin.config.doc/doc/r0000380.html
82 | P a g e
3.2.5 Database Manager Configuration parameter: trust_clntauth (Not
Scored)
Profile Applicability:
Description:
This parameter specifies where a trusted client is authenticated (at the server or the client)
if it provides a user ID and password.
If the parameter is set to 'CLIENT', the user ID and password are not needed, but if they are
provided, authentication will occur at the client.
If the parameter is set to 'SERVER', the user ID and password are needed and will be
authenticated at the server.
Rationale:
This parameter is relied upon to determine whether each trusted client needs to be
authenticated by the server or the client after providing a user ID and password.
Audit:
Remediation:
83 | P a g e
References:
1. http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.
admin.config.doc/doc/r0000381.html
84 | P a g e
4 Row and Column Access Control (RCAC)
DB2 RCAC controls access to a table at the row and column level. Row and column access
control is sometimes referred to as fine-grained access control or FGAC. Identify and gather
the organization's security policies, management and staff roles, and user and group lists to
compare against existing DB2 RCAC policies for compliance.
• Level 2 - RDBMS
Description:
DB2 Row and Column Access Control (RCAC) Policies control access to DB2 tables. They
should match the organization's security and database access policies, and they should be
regularly reviewed for gaps.
Rationale:
Missing, incomplete, or incorrect DB2 RCAC policies will increase the risks to the
organization's protected data and will prevent efforts to monitor, alert, and respond to
these risks in the future.
Audit:
Schedule and complete a regular review of all organization security and data access
database policies against the current DB2 policies to determine if gaps exist.
Remediation:
1. Create RCAC policies for each 'gap' listed from the Audit procedure.
85 | P a g e
2. Review the newly created DB2 RCAC policy against the organization's written
policies.
Default Value:
Not installed
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec
.doc/doc/c0057423.html?lang=en
86 | P a g e
4.2 Secure SECADM Authority (Not Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The SECADM (security administrator) role grants the authority to create, alter (where
applicable), and drop roles, trusted contexts, audit policies, security label components,
security policies and security labels. It is also the authority required to grant and revoke
roles, security labels and exemptions, and the SETSESSIONUSER privilege. SECADM authority
has no inherent privilege to access data stored in tables. It is recommended that the SECADM
role be granted to authorized users only.
Rationale:
Audit:
Remediation:
87 | P a g e
References:
1. https://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.1.0/com.ibm.db2.luw.admin.sec
.doc/doc/c0021054.html?lang=en
88 | P a g e
4.3 Review Users, Groups, and Roles (Not Scored)
Profile Applicability:
Description:
With row and column access control, individuals are permitted access to only the subset of
data that is required to perform their job tasks. Periodic review of these individuals is
crucial when trying to keep data secure. As business needs move forward, requirements
behind accessing the data may change, leading to a revision in security policy. By
inspecting the list of users, groups, and roles, you are identifying excessive privileges that
could pose possible security threats within your infrastructure.
Rationale:
If a user (either by himself or part of a group or role) is no longer required access to the
data that is protected by row and column access controls, allowing that individual to
maintain access allows that individual to compromise the confidentiality, integrity, and/or
availability of the data in the DB2 instance.
Audit:
Linux:
cat /etc/passwd
Windows:
1. Run compmgmt.msc
2. Click 'Local Users and Groups'
3. Double click 'Users'
4. Review users
89 | P a g e
2. Review the groups within your database environment:
Linux:
cat /etc/group
Windows:
1. Run compmgmt.msc
2. Click 'Local Users and Groups'
3. Double click 'Groups'
4. Review groups
3. Review the roles and role members within your database environment:
Remediation:
Linux:
userdel -r <user name>
Windows:
1. Run compmgmt.msc
2. Click 'Local Users and Groups'
3. Double click 'Users'
4. Right-click on <user name>
5. Select 'Delete'
90 | P a g e
2. To remove groups from your database environment:
Linux:
groupdel <group name>
Windows:
1. Run compmgmt.msc
2. Click 'Local Users and Groups'
3. Double click 'Groups'
4. Right-click on <group name>
5. Select 'Delete'
91 | P a g e
4.4 Review Row Permission logic according to policy (Not Scored)
Profile Applicability:
• Level 2 - RDBMS
Description:
The logic behind instituting row permissions is crucial for a successful security
policy. Inspecting this logic and comparing it to the security policy will assure that all
aspects of the data access controls are being adhered to.
Rationale:
Missing or incomplete DB2 RCAC Security Policies will increase the risks to the
organization's protected data and will prevent efforts to monitor, alert, and respond to
these risks in the future.
Audit:
3. Run the following and review the results to confirm that the row permissions are
correct and that they comply with the existing security policy:
db2 => select role.rolename, control.ruletext from syscat.roles role inner join
syscat.controls control on locate(role.rolename,control.ruletext) <> 0 where
enable = 'Y' and enforced = 'A' and valid = 'Y' and controltype = 'R'
Remediation:
1. Create RCAC Policies for each 'gap' listed from the Audit procedure.
2. Review the newly created DB2 RCAC policy against the organization's policy
92 | P a g e
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec
.doc/doc/c0057423.html?lang=en
93 | P a g e
4.5 Review Column Mask logic according to policy (Not Scored)
Profile Applicability:
• Level 2 - RDBMS
Description:
The logic behind instituting column masks is crucial for a successful security
policy. Inspecting this logic and comparing it to the security policy will assure that all
aspects of the data access controls are being adhered to.
Rationale:
Missing or incomplete DB2 RCAC security policies will increase the risks to the
organization's protected data and will prevent efforts to monitor, alert, and respond to
these risks in the future.
Audit:
3. Run the following and review the results to verify that the permissions are correct
and that they comply with the organization's existing security policy:
Remediation:
1. Create RCAC Policies for each 'gap' listed from the Audit procedure.
2. Review the newly created DB2 RCAC policy against the organization's written policy.
94 | P a g e
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec
.doc/doc/c0057423.html?lang=en
95 | P a g e
5 Database Maintenance
This section provides guidance on protecting and maintaining the database instance.
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
Rationale:
Audit:
Remediation:
Define and implement a process to replicate your backups onto multiple locations.
96 | P a g e
5.2 Protecting Backups (Not Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
Backups of your database should be stored securely in a location with full access for
administrators, read and execute access for group, and no access for users.
Rationale:
Backups may contain sensitive data that attackers can use to retrieve valuable information
about the organization.
Audit:
Remediation:
Define a security policy for all backups that specifies the privileges they should be assigned.
97 | P a g e
5.3 Enable Automatic Database Maintenance (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
Enable automatic database maintenance on your DB2 instance. It is recommended that the
DB2 Automatic Maintenance tool be used to ensure that the instance is performing
optimally.
Rationale:
A well-maintained DB2 instance will provide access to the data and reduce database
outages.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
98 | P a g e
Remediation:
99 | P a g e
6 Securing Database Objects
Note: SYSCAT views have underlying SYSIBM tables that are also granted access by the
PUBLIC group by default. Ensure that permissions applied to these tables revoke access
from unnecessary users. If the database was created using the RESTRICTIVE option, then
grants to PUBLIC are voided.
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
Rationale:
This view contains sensitive information about the auditing security for this database.
Access to the audit policies may aid attackers in avoiding detection.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
100 | P a g e
db2 => select grantee from sysibm.systabauth where tcreator = 'SYSCAT' and
ttname = 'AUDITPOLICIES' and grantee = 'PUBLIC'
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
Remediation:
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.do
c/doc/r0050610.html?cp=SSEPGG_10.5.0%2F2-12-8-2&lang=en
101 | P a g e
6.2 Restrict Access to SYSCAT.AUDITUSE (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The SYSCAT.AUDITUSE view contains database audit policy for all non-database objects,
such as authority, groups, roles, and users. It is recommended that the PUBLIC role be
restricted from accessing this view.
Rationale:
This view contains sensitive information about the types of objects being audited. Access to
the audit policy may aid attackers in avoiding detection.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
db2 => select grantee from sysibm.systabauth where tcreator = 'SYSCAT' and
ttname = 'AUDITUSE' and grantee = 'PUBLIC'
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
Remediation:
102 | P a g e
1. Connect to the DB2 database.
103 | P a g e
6.3 Restrict Access to SYSCAT.DBAUTH (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
Rationale:
This view contains all the grants in the database and may be used as an attack vector.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
db2 => select grantee from sysibm.systabauth where tcreator = 'SYSCAT' and
ttname = 'DBAUTH' and grantee = 'PUBLIC'
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
Remediation:
104 | P a g e
1. Connect to the DB2 database.
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.do
c/doc/r0001041.html?cp=SSEPGG_10.5.0%2F2-12-8-30&lang=en
105 | P a g e
6.4 Restrict Access to SYSCAT.COLAUTH (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The SYSCAT.COLAUTH view contains the column privileges granted to the user, group, or
role in the database.
Rationale:
The SYSCAT.COLAUTH view contains the column privileges granted to the user or a group
of users. It is recommended that the PUBLIC role be restricted from accessing this view.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
db2 => select grantee from sysibm.systabauth where tcreator = 'SYSCAT' and
ttname = 'COLAUTH' and grantee = 'PUBLIC'
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
Remediation:
106 | P a g e
1. Connect to the DB2 database.
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.db
obj.doc/doc/t0005379.html?lang=en
107 | P a g e
6.5 Restrict Access to SYSCAT.EVENTS (Scored)
Profile Applicability:
• Level 2 - RDBMS
Description:
The SYSCAT.EVENTS view contains all types of events that the database is currently
monitoring. It is recommended that the PUBLIC role be restricted from accessing this view.
Rationale:
The types of events that the database is monitoring should not be made readily available to
the public.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
db2 => select grantee from sysibm.systabauth where tcreator = 'SYSCAT' and
ttname = 'EVENTS' and grantee = 'PUBLIC'
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
Remediation:
108 | P a g e
db2 => REVOKE SELECT ON SYSCAT.EVENTS FROM PUBLIC
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.do
c/doc/r0001043.html?cp=SSEPGG_10.5.0%2F2-12-8-34&lang=en
109 | P a g e
6.6 Restrict Access to SYSCAT.EVENTTABLES (Scored)
Profile Applicability:
• Level 2 - RDBMS
Description:
The SYSCAT.EVENTTABLES view contains the name of the destination table that will receive
the monitoring events. It is recommended that the PUBLIC role be restricted from
accessing this view.
Rationale:
PUBLIC should not have access to see the target name of the event monitoring table.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
db2 => select grantee from sysibm.systabauth where tcreator = 'SYSCAT' and
ttname = 'EVENTTABLES' and grantee = 'PUBLIC'
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
Remediation:
110 | P a g e
db2 => REVOKE SELECT ON SYSCAT.EVENTTABLES FROM PUBLIC
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.do
c/doc/r0007483.html?cp=SSEPGG_10.5.0%2F2-12-8-35&lang=en
111 | P a g e
6.7 Restrict Access to SYSCAT.ROUTINES (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The SYSCAT.ROUTINES view contains all user-defined routines, functions, and stored
procedures in the database. It is recommended that the PUBLIC role be restricted from
accessing this view.
Rationale:
User-defined functions and routines should not be exposed to the public for exploits.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
db2 => select grantee from sysibm.systabauth where tcreator = 'SYSCAT' and
ttname = 'ROUTINES' and grantee = 'PUBLIC'
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
Remediation:
112 | P a g e
1. Connect to the DB2 database.
113 | P a g e
6.8 Restrict Access to SYSCAT.INDEXAUTH (Scored)
Profile Applicability:
• Level 2 - RDBMS
Description:
The SYSCAT.INDEXAUTH view contains a list of users or groups that have CONTROL access on
an index. It is recommended that the PUBLIC role be restricted from accessing this view.
Rationale:
The list of all users with access to an index should not be exposed to the public.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
db2 => select grantee from sysibm.systabauth where tcreator = 'SYSCAT' and
ttname = 'INDEXAUTH' and grantee = 'PUBLIC'
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
Remediation:
114 | P a g e
db2 => REVOKE SELECT ON SYSCAT.INDEXAUTH FROM PUBLIC
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.do
c/doc/r0001046.html?cp=SSEPGG_10.5.0%2F2-12-8-44&lang=en
115 | P a g e
6.9 Restrict Access to SYSCAT.PACKAGEAUTH (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The SYSCAT.PACKAGEAUTH view contains a list of users or groups that has EXECUTE
privilege on a package. It is recommended that the PUBLIC role be restricted from
accessing this view.
Rationale:
The list of all users with access to a package should not be exposed to the public.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
db2 => select grantee from sysibm.systabauth where tcreator = 'SYSCAT' and
ttname = 'PACKAGEAUTH' and grantee = 'PUBLIC'
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
Remediation:
116 | P a g e
1. Connect to the DB2 database.
117 | P a g e
6.10 Restrict Access to SYSCAT.PACKAGES (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The SYSCAT.PACKAGES view contains the names of all packages created in the database
instance. It is recommended that the PUBLIC role be restricted from accessing this view.
Rationale:
The names of packages created in the database can be used as an entry point if a vulnerable
package exists.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
db2 => select grantee from sysibm.systabauth where tcreator = 'SYSCAT' and
ttname = 'PACKAGES' and grantee = 'PUBLIC'
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
Remediation:
118 | P a g e
1. Connect to the DB2 database.
119 | P a g e
6.11 Restrict Access to SYSCAT.PASSTHRUAUTH (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The SYSCAT.PASSTHRUAUTH view contains the names of user or group that have pass-
through authorization to query the data source. It is recommended that the PUBLIC role be
restricted from accessing this view.
Rationale:
The ability to see which accounts have the pass-through privilege could allow an attacker
to exploit these accounts to access another data source.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
db2 => select grantee from sysibm.systabauth where tcreator = 'SYSCAT' and
ttname = 'PASSTHRUAUTH' and grantee = 'PUBLIC'
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
120 | P a g e
Remediation:
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.do
c/doc/r0002184.html?cp=SSEPGG_10.5.0%2F2-12-8-70&lang=en
121 | P a g e
6.12 Restrict Access to SYSCAT.SECURITYPOLICIES (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
Rationale:
PUBLIC should not be able to view all the database security policies.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
db2 => select grantee from sysibm.systabauth where tcreator = 'SYSCAT' and
ttname = 'SECURITYPOLICIES' and grantee = 'PUBLIC'
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
Remediation:
122 | P a g e
db2 => connect to $DB2DATABASE user $USERNAME using $PASSWORD
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.do
c/doc/r0020048.html?cp=SSEPGG_10.5.0%2F2-12-8-91&lang=en
123 | P a g e
6.13 Restrict Access to SYSCAT.SECURITYPOLICYEXEMPTIONS (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
Rationale:
Public should not be able to view all the exemptions to the database security policies.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
db2 => select grantee from sysibm.systabauth where tcreator = 'SYSCAT' and
ttname = 'SECURITYPOLICYEXEMPTIONS' and grantee = 'PUBLIC'
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
Remediation:
124 | P a g e
1. Connect to the DB2 database.
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.do
c/doc/r0020042.html?cp=SSEPGG_10.5.0%2F2-12-8-93&lang=en
125 | P a g e
6.14 Restrict Access to SYSCAT.SURROGATEAUTHIDS (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The SYSCAT.SURROGATEAUTHIDS contains the names of all accounts that have been granted
SETSESSIONUSER privilege on a user or to PUBLIC. It is recommended that the PUBLIC role
be restricted from accessing this view.
Rationale:
Public should not be able to view the names of all the surrogate accounts with
SETSESSIONUSER privilege.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
db2 => select grantee from sysibm.systabauth where tcreator = 'SYSCAT' and
ttname = 'SURROGATEAUTHIDS' and grantee = 'PUBLIC'
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
Remediation:
126 | P a g e
1. Connect to the DB2 database.
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.do
c/doc/r0020044.html?cp=SSEPGG_10.5.0%2F2-12-8-102&lang=en
127 | P a g e
6.15 Restrict Access to SYSCAT.ROLEAUTH (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The SYSCAT.ROLEAUTH view contains information on all roles and their respective grantees.
It is recommended that the PUBLIC role be restricted from accessing this view.
Rationale:
PUBLIC should not have access to see the grants of the roles because this could be used as a
point of exploit.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
db2 => select grantee from sysibm.systabauth where tcreator = 'SYSCAT' and
ttname = 'ROLEAUTH' and grantee = 'PUBLIC'
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
Remediation:
128 | P a g e
1. Connect to the DB2 database.
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.do
c/doc/r0050619.html?cp=SSEPGG_10.5.0%2F2-12-8-74&lang=en
129 | P a g e
6.16 Restrict Access to SYSCAT.ROLES (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The SYSCAT.ROLES view contains all roles available in the database. It is recommended that
the PUBLIC role be restricted from accessing this view.
Rationale:
PUBLIC should not have access to see all the roles because this could be used as a point of
exploit.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
db2 => select grantee from sysibm.systabauth where tcreator = 'SYSCAT' and
ttname = 'ROLES' and grantee = 'PUBLIC'
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
Remediation:
130 | P a g e
1. Connect to the DB2 database.
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.do
c/doc/r0050612.html?cp=SSEPGG_10.5.0%2F2-12-8-75&lang=en
131 | P a g e
6.17 Restrict Access to SYSCAT.ROUTINEAUTH (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The SYSCAT.ROUTINEAUTH view contains a list of all users that have EXECUTE privilege on a
routine (function, method, or procedure). It is recommended that the PUBLIC role be
restricted from accessing this view.
Rationale:
PUBLIC should not have access to see all the users because this could be used as a point of
exploit.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
db2 => select grantee from sysibm.systabauth where tcreator = 'SYSCAT' and
ttname = 'ROUTINEAUTH' and grantee = 'PUBLIC'
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
Remediation:
132 | P a g e
1. Connect to the DB2 database.
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.do
c/doc/r0007491.html?cp=SSEPGG_10.5.0%2F2-12-8-76&lang=en
133 | P a g e
6.18 Restrict Access to SYSCAT.SCHEMAAUTH (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The SYSCAT.SCHEMAAUTH view contains a list of all users that have one or more privileges
or access to a particular schema. It is recommended that the PUBLIC role be restricted from
accessing this view.
Rationale:
PUBLIC should not have access to see all the users because this could be used as a point of
exploit.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
db2 => select grantee from sysibm.systabauth where tcreator = 'SYSCAT' and
ttname = 'SCHEMAAUTH' and grantee = 'PUBLIC'
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
Remediation:
134 | P a g e
1. Connect to the DB2 database.
135 | P a g e
6.19 Restrict Access to SYSCAT.SCHEMATA (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The SYSCAT.SCHEMATA view contains all schema names in the database. It is recommended
that the PUBLIC role be restricted from accessing this view.
Rationale:
PUBLIC should not have access to see all the schema names in the database because this
could be used as a point of exploit.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
db2 => select grantee from sysibm.systabauth where tcreator = 'SYSCAT' and
ttname = 'SCHEMATA' and grantee = 'PUBLIC'
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
Remediation:
136 | P a g e
1. Connect to the DB2 database.
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.do
c/doc/r0001059.html?cp=SSEPGG_10.5.0%2F2-12-8-85&lang=en
137 | P a g e
6.20 Restrict Access to SYSCAT.SEQUENCEAUTH (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
Rationale:
PUBLIC should not have access to see all the granted access of a sequence in the database
because this could be used as a point of exploit.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
db2 => select grantee from sysibm.systabauth where tcreator = 'SYSCAT' and
ttname = 'SEQUENCEAUTH' and grantee = 'PUBLIC'
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
Remediation:
138 | P a g e
1. Connect to the DB2 database.
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.do
c/doc/r0008181.html?cp=SSEPGG_10.5.0%2F2-12-8-94&lang=en
139 | P a g e
6.21 Restrict Access to SYSCAT.STATEMENTS (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
Rationale:
PUBLIC should not have access to the SQL statements of a database package. This could lead
to an exploit.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
db2 => select grantee from sysibm.systabauth where tcreator = 'SYSCAT' and
ttname = 'STATEMENTS' and grantee = 'PUBLIC'
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
Remediation:
140 | P a g e
1. Connect to the DB2 database.
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.do
c/doc/r0001060.html?cp=SSEPGG_10.5.0%2F2-12-8-99&lang=en
141 | P a g e
6.22 Restrict Access to SYSCAT.TABAUTH (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The SYSCAT.TABAUTH view contains users or groups that have been granted one or more
privileges on a table or view. It is recommended that the PUBLIC role be restricted from
accessing this view.
Rationale:
PUBLIC should not have access to the grants of views and tables in a database. This could
lead to an exploit.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
db2 => select grantee from sysibm.systabauth where tcreator = 'SYSCAT' and
ttname = 'TABAUTH' and grantee = 'PUBLIC'
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
Remediation:
142 | P a g e
1. Connect to the DB2 database.
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.do
c/doc/r0001061.html?cp=SSEPGG_10.5.0%2F2-12-8-103&lang=en
143 | P a g e
6.23 Restrict Access to SYSCAT.TBSPACEAUTH (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The SYSCAT.TBSPACEAUTH contains users or groups that have been granted the USE
privilege on a particular tablespace in the database. It is recommended that the PUBLIC
role be restricted from accessing this view.
Rationale:
PUBLIC should not have access to the grants of the tablespaces in a database. This could
lead to an exploit.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
db2 => select grantee from sysibm.systabauth where tcreator = 'SYSCAT' and
ttname = 'TBSPACEAUTH' and grantee = 'PUBLIC'
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
Remediation:
144 | P a g e
1. Connect to the DB2 database.
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.do
c/doc/r0002201.html?cp=SSEPGG_10.5.0%2F2-12-8-110&lang=en
145 | P a g e
6.24 Restrict Access to Tablespaces (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
Rationale:
Grant the USE of tablespace privilege to only authorized users. Restrict the privilege from
PUBLIC, where applicable, as a malicious user can cause a denial of service at the tablespace
level by overloading it with corrupted data.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
Remediation:
146 | P a g e
1. Connect to the DB2 database.
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.do
c/doc/r0001064.html?cp=SSEPGG_10.5.0%2F2-12-8-108&lang=en
147 | P a g e
6.25 Restrict Access to SYSCAT.MODULEAUTH (Scored)
Profile Applicability:
• Level 2 - RDBMS
Description:
The SYSCAT.MODULEAUTH view contains all granted privileges on a module for users,
groups, or roles and is read only.
Rationale:
Any databases created without the RESTRICT option automatically GRANT the SELECT
privilege to PUBLIC for SYSCAT views. Therefore, it is strongly recommended to explicitly
REVOKE the SELECT privilege on the SYSCAT.MODULEAUTH view from PUBLIC to reduce
risk to the organization's data.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
Remediation:
148 | P a g e
2. Run the following command from the DB2 command window:
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.do
c/doc/r0054748.html?lang=en
149 | P a g e
6.26 Restrict Access to SYSCAT.VARIABLEAUTH (Scored)
Profile Applicability:
• Level 2 - RDBMS
Description:
The SYSCAT.VARIABLEAUTH view contains the granted privileges on a global variable for
users, groups, or roles and is read only.
Rationale:
Any databases created without the RESTRICT option automatically GRANT the SELECT
privilege to PUBLIC for SYSCAT views. Therefore, it is strongly recommended to explicitly
REVOKE the SELECT privilege on the SYSCAT.VARIABLEAUTH view from PUBLIC to reduce
risk to the organization's data.
Audit:
Determine if SYSCAT.VARIABLEAUTH privileges for users, groups, and roles are correctly
set.
Perform the following DB2 commands to obtain the value for this setting:
3. Review privileges for users, groups, and roles. If the output is BLANK, then it is
considered a successful finding.
150 | P a g e
Remediation:
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.do
c/doc/r0050504.html?lang=en
151 | P a g e
6.27 Restrict Access to SYSCAT.WORKLOADAUTH (Scored)
Profile Applicability:
• Level 2 - RDBMS
Description:
The SYSCAT.WORKLOADAUTH catalog represents the users, groups, or roles that have
been granted the USAGE privilege on a workload.
Rationale:
Any databases created without the RESTRICT option automatically GRANT the SELECT
privilege to PUBLIC for SYSCAT views. Therefore, it is strongly recommended to explicitly
REVOKE the SELECT privilege on the SYSCAT.WORKLOADAUTH from PUBLIC to reduce
risk to the organization's data.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
Remediation:
152 | P a g e
2. Run the following command from the DB2 command window:
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.do
c/doc/r0050558.html?cp=SSEPGG_10.5.0%2F2-12-8-127&lang=en
153 | P a g e
6.28 Restrict Access to SYSCAT.XSROBJECTAUTH (Scored)
Profile Applicability:
• Level 2 - RDBMS
Description:
Rationale:
Any databases created without the RESTRICT option automatically GRANT the SELECT
privilege to PUBLIC for SYSCAT views. Therefore, it is strongly recommended to explicitly
REVOKE the SELECT privilege on the SYSCAT.XSROBJECTAUTH view from PUBLIC to
reduce risk to the organization's data.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
Remediation:
154 | P a g e
2. Run the following command from the DB2 command window:
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.do
c/doc/r0021693.html?cp=SSEPGG_10.5.0%2F2-12-8-135&lang=en
155 | P a g e
6.29 Restrict Access to SYSCAT.AUTHORIZATIONIDS (Scored)
Profile Applicability:
• Level 1 – RDBMS
• Level 2 – RDBMS
Description:
Rationale:
Databases created without the RESTRICT option automatically GRANT the SELECT
privilege to PUBLIC for SYSCAT views. Therefore, it is strongly recommended to explicitly
REVOKE the SELECT privilege on the SYSCAT.AUTHORIZATIONIDS view from PUBLIC to
reduce risk to the organization's data.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
156 | P a g e
Remediation:
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.rtn.do
c/doc/r0021977.html?lang=en
157 | P a g e
6.30 Restrict Access to SYSIBMADM.OBJECTOWNERS (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 – RDBMS
Description:
Rationale:
Any databases created without the RESTRICT option automatically GRANT the SELECT
privilege to PUBLIC for views. Therefore, it is strongly recommended to explicitly REVOKE
the SELECT privilege on the SYSIBMADM.OBJECTOWNERS view from PUBLIC to reduce
risk to the organization's data.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
158 | P a g e
Remediation:
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.rtn.do
c/doc/r0021979.html?cp=SSEPGG_10.5.0%2F3-6-1-3-12-6&lang=en
159 | P a g e
6.31 Restrict Access to SYSIBMADM.PRIVILEGES (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 – RDBMS
Description:
The SYSIBMADM.PRIVILEGES administrative view displays all explicit privileges for all
authorization IDs in the currently connected databases' system catalogs. PRIVILEGES
schema is SYSIBMADM.
Rationale:
Any databases created without the RESTRICT option automatically GRANT the SELECT
privilege to PUBLIC for catalog views. Therefore, it is strongly recommended to explicitly
REVOKE the SELECT privilege on SYSIBMADM.PRIVILEGES from PUBLIC to reduce risk to
the organization's data.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
3. Review privileges granted to users, groups, and roles. If the output is BLANK, then it
is considered a successful finding.
160 | P a g e
Remediation:
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.rtn.do
c/doc/r0021978.html?cp=SSEPGG_10.5.0%2F3-6-1-3-12-7&lang=en
161 | P a g e
7 DB2 Authorities
This section provides guidance on securing the authorities that exist in the DB2
instance and database.
• Level 2 - RDBMS
Description:
Rationale:
Audit:
Perform the following DB2 commands to obtain the value for this setting:
3. Locate the sysadm_group value in the output and ensure the value is not NULL:
db2 => get database manager configuration db2 => … SYSADM group name
(SYSADM_GROUP) = DB2ADM
Note: sysadm_group is set to DB2ADM in the above output.
162 | P a g e
4. Review the members of the sysadm_group on the operating system.
Linux:
cat /etc/group | grep <sysadm group name>
Windows:
1. Run compmgmt.msc
2. Click 'Local Users and Groups'
3. Double click 'Groups'
4. Double click
5. Review group members
Remediation:
db2 => update database manager configuration using sysadm_group <sys adm group
name>
Default Value:
163 | P a g e
7.2 Secure SYSCTRL authority (Scored)
Profile Applicability:
• Level 2 - RDBMS
Description:
The sysctrl_group parameter defines the system administrator group with system
control (SYSCTRL) authority. It is recommended that the sysctrl_group group contains
authorized users only.
Rationale:
Audit:
Perform the following DB2 commands to obtain the value for this setting:
3. Locate the sysctrl_group value in the output and ensure the value is not NULL:
db2 => get database manager configuration db2 => … SYSCTRL group name
(SYSCTRL_GROUP) = DB2CTRL
Note: sysctrl_group is set to DB2CTRL in the above output.
Linux:
cat /etc/group | grep <sysctrl group name>
Windows:
164 | P a g e
1. Run compmgmt.msc
2. Click 'Local Users and Groups'
3. Double click 'Groups'
4. Double click <sysctrl group name>
5. Review group members
Remediation:
db2 => update database manager configuration using sysctrl_group <sys control
group name>
Default Value:
165 | P a g e
7.3 Secure SYSMAINT Authority (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 – RDBMS
Description:
The sysmaint_group parameter defines the system administrator group that possesses the
system maintenance (SYSMAINT) authority. It is recommended that the sysmaint_group
group contains authorized users only.
Rationale:
Audit:
Perform the following DB2 commands to obtain the value for this setting:
3. Locate the sysmaint_group value in the output and ensure the value is not NULL:
db2 => get database manager configuration db2 => … SYSMAINT group name
(SYSMAINT_GROUP) = DB2MAINT
Note: sysmaint_group is set to DB2MAINT in the above output.
166 | P a g e
4. Review the members of the sysmaint_group on the operating system.
Linux:
cat /etc/group | grep <sysmaint group name>
Windows:
1. Run compmgmt.msc
2. Click 'Local Users and Groups'
3. Double click 'Groups'
4. Double click <sysmaint group name>
5. Review group members
Remediation:
Default Value:
167 | P a g e
7.4 Secure SYSMON Authority (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 – RDBMS
Description:
The sysmon_group parameter defines the operating system groups with system monitor
(SYSMON) authority. It is recommended that the sysmon_group group contain authorized
users only.
Rationale:
Audit:
Perform the following DB2 commands to obtain the value for this setting:
3. Locate the sysmon_group value in the output and ensure the value is not NULL:
db2 => get database manager configuration db2 => … SYSMON group name
(SYSMON_GROUP) = DB2MON
Note: sysmon_group is set to DB2MON in the above output.
168 | P a g e
4. Review the members of the sysmon_group on the operating system.
Linux:
cat /etc/group | grep <sysmon group name>
Windows:
1. Run compmgmt.msc
2. Click 'Local Users and Groups'
3. Double click 'Groups'
4. Double click
5. Review group members
Remediation:
db2 => update database manager configuration using sysmon_group <sys monitor
group name>
Default Value:
169 | P a g e
7.5 Secure SECADM Authority (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 – RDBMS
Description:
The SECADM (security administrator) role grants the authority to create, alter (where
applicable), and drop roles, trusted contexts, audit policies, security label components,
security policies and security labels. It is also the authority required to grant and revoke
roles, security labels and exemptions, and the SETSESSIONUSER privilege. SECADM authority
has no inherent privilege to access data stored in tables. It is recommended that the SECADM
role be granted to authorized users only.
Rationale:
Audit:
Perform the following DB2 commands to obtain the value for this setting:
170 | P a g e
3. Review the list of users in the above output to ensure only approved users are
assigned.
Remediation:
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec
.doc/doc/c0021054.html?lang=en
171 | P a g e
7.6 Secure DBADM Authority (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 – RDBMS
Description:
The DBADM (database administration) role grants the authority to a user to perform
administrative tasks on a specific database. It is recommended that the DBADM role be
granted to authorized users only.
Rationale:
Audit:
Perform the following DB2 commands to obtain the value for this setting:
db2 => select distinct grantee, granteetype from syscat.dbauth where dbadmauth
= 'Y'
3. Review the list of users in the above output to ensure only approved users are
assigned.
Remediation:
172 | P a g e
Revoke this permission from any unauthorized users.
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec
.doc/doc/c0005521.html?lang=en
173 | P a g e
7.7 Secure SQLADM Authority (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The SQLADM authority is required to monitor, tune, and alter SQL statements.
Rationale:
The SQLADM authority can CREATE, SET, FLUSH, DROP EVENT MONITORS and perform
RUNSTATS and REORG INDEXES and TABLES. SQLADM can be granted to users, groups, or
roles or PUBLIC. SQLADM authority is a subset of the DBADM authority and can be granted
by the SECADM authority.
Audit:
2. Review the list of users in the above output to ensure only approved users are
assigned.
Remediation:
174 | P a g e
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec
.doc/doc/c0053931.html?lang=en
175 | P a g e
7.8 Secure DATAACCESS Authority (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
Grants the authority to access data. The DATAACCESS authority allows the grantee to
leverage DML level commands i.e. SELECT, INSERT, UPDATE, DELETE, LOAD, and EXECUTE
any package or routine.
Rationale:
The DATAACCESS authority gives the grantee read access and also control over
manipulating the data. DATAACCESS can be granted to users, groups, or roles, but not
PUBLIC. DATAACCESS authority is a subset of the DBADM authority and can be granted by
the SECADM authority.
Audit:
2. Review the list of users in the above output to ensure only approved users are
assigned.
Remediation:
176 | P a g e
References:
1. https://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec
.doc/doc/c0005524.html?lang=en
177 | P a g e
7.9 Secure ACCESSCTRL Authority (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
ACCESSCTRL authority is the authority required to grant and revoke privileges on objects
within a specific database. Some of these privileges include BINDADD, CONNECT,
CREATETAB, CREATE_EXTERNAL_ROUTINE, LOAD, and QUIESCE_CONNECT. It has no
inherent privilege to access data stored in tables, except the catalog tables and views.
Rationale:
The ACCESSCTRL authority gives the grantee access control to a specified database. With
this authority, the grantee can grant/revoke privileges to other users. ACCESSCTRL can be
granted to users, groups, or roles, but not PUBLIC. ACCESSCTRL authority can only be
granted by the SECADM authority.
Audit:
2. Review the list of users in the above output to ensure only approved users are
assigned.
Remediation:
178 | P a g e
REVOKE ACCESSCTRL ON DATABASE FROM USER <username>
References:
1. https://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec
.doc/doc/c0053933.html?lang=en
179 | P a g e
7.10 Secure WLMADM authority (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The WLMADM authority manages workload objects for a database. Holders of DBADM
authority implicitly also hold WLMADM authority.
Rationale:
The WLMADM authority enables creating, altering, dropping, commenting, granting, and
revoking access to workload objects for a database.
Audit:
Remediation:
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec
.doc/doc/c0053932.html?lang=en
180 | P a g e
7.11 Secure CREATAB Authority (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The CREATAB (create table) role grants the authority to a user to create tables within a
specific database. It is recommended that the CREATAB role be granted to authorized users
only.
Rationale:
Review all users that have access to this authority to avoid the addition of unnecessary
and/or inappropriate users.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
3. Review the list of users in the above output to ensure only approved users are
assigned.
Remediation:
181 | P a g e
1. Connect to the DB2 database.
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec
.doc/doc/c0054269.html?lang=en
182 | P a g e
7.12 Secure BINDADD Authority (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The BINDADD (bind application) role grants the authority to a user to create packages on a
specific database. It is recommended that the BINDADD role be granted to authorized users
only.
Rationale:
Audit:
Perform the following DB2 commands to obtain the value for this setting:
3. Review the list of users in the above output to ensure only approved users are
assigned.
183 | P a g e
Remediation:
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec
.doc/doc/c0005524.html?lang=en
184 | P a g e
7.13 Secure CONNECT Authority (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The CONNECT role grants the authority to a user to connect to mainframe and midrange
databases from Windows, Unix, and Linux operating systems. It is recommended that
the CONNECT role be granted to authorized users only.
Rationale:
All users that have access to this authority should be regularly reviewed.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
3. Review the list of users in the above output to ensure only approved users are
assigned.
Remediation:
185 | P a g e
1. Connect to the DB2 database.
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.qb.dbcon
n.doc/doc/r0059046.html?cp=SSEPGG_10.5.0%2F6&lang=en
186 | P a g e
7.14 Secure LOAD Authority (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The LOAD role grants the authority to a user to load data into tables. It is recommended
that the LOAD role be granted to authorized users only.
Rationale:
All users that have access to this authority should be regularly reviewed.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
db2 => select distinct grantee, granteetype from syscat.dbauth where loadauth =
'Y'
3. Review the list of users in the above output to ensure only approved users are
assigned.
Remediation:
187 | P a g e
db2 => connect to $DB2DATABASE user $USERNAME using $PASSWORD
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec
.doc/doc/c0005522.html?lang=en
188 | P a g e
7.15 Secure EXTERNALROUTINE Authority (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
Rationale:
All users with this authority should be regularly reviewed and approved.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
3. Review the list of users in the above output to ensure only approved users are
assigned.
Remediation:
189 | P a g e
db2 => connect to $DB2DATABASE user $USERNAME using $PASSWORD
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.apdv.rout
ines.doc/doc/c0009198.html?lang=en
190 | P a g e
7.16 Secure QUIESCECONNECT Authority (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
The QUIESCECONNECT role grants the authority to a user to access a database even in the
quiesced state.
Rationale:
Audit:
Perform the following DB2 commands to obtain the value for this setting:
3. Review the list of users in the above output to ensure only approved users are
assigned.
Remediation:
191 | P a g e
db2 => connect to $DB2DATABASE user $USERNAME using $PASSWORD
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.apdv.api.
doc/doc/r0009331.html?lang=en
192 | P a g e
8 DB2 Roles
Roles simplify the administration and management of privileges by offering an equivalent
capability as groups but without the same restrictions. A role is a database object that groups
together one or more privileges and can be assigned to users, groups, PUBLIC, or other roles by
using a GRANT statement. All the roles assigned to a user are enabled when that user
establishes a connection, so all privileges and authorities granted to roles are taken into account
when a user connects. Roles cannot be explicitly enabled or disabled.
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
Roles provide several advantages that make it easier to manage privileges in a database
system. Security administrators can control access to their databases in a way that mirrors
the structure of their organizations (they can create roles in the database that map directly
to the job functions in their organizations). The assignment of privileges is simplified.
Instead of granting the same set of privileges to each individual user in a particular job
function, the administrator can grant this set of privileges to a role representing that job
function and then grant that role to each user in that job function.
Rationale:
Reviewing the roles within a database helps minimize the possibility of unwanted access.
Audit:
193 | P a g e
2. Connect to DB2 database:
3. Run the following and review the results to determine if each role name still has a
business requirement to access the data:
db2 => select rolename from syscat.roleauth where grantortype <> 'S' group by
rolename
Remediation:
References:
1. https://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec
.doc/doc/c0050531.html
194 | P a g e
8.2 Review Role Members (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
Having roles that have been granted specific privileges, then assigning users to the roles, is
usually considered the best way to grant application access. Because granting privileges to
individual users can be more difficult to track and maintain against unauthorized access,
users should be assigned to organization-defined database roles according to the needs of
the business. As users leave the organization or change responsibilities within the
organization, the appropriate roles for them change as well, so role membership needs to
be reviewed and verified periodically.
Rationale:
Users who have excessive privileges not needed to do their jobs pose an unnecessary risk
to the organization as an insider threat.
Audit:
195 | P a g e
3. Run the following to review and verify that the role members are correct for each
role:
db2 => select rolename,grantee from syscat.roleauth where grantortype <> 'S'
group by rolename, grantee
Remediation:
References:
1. https://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec
.doc/doc/c0050531.html
196 | P a g e
8.3 Nested Roles (Scored)
Profile Applicability:
• Level 2 - RDBMS
Description:
The user-defined roles in DB2 can be nested in the same fashion as Windows security
groups--a nested group has both its directly assigned permissions as well as the assigned
group permissions. By nesting roles, the database administrator is saving time by only
having to assign a group of users versus assigning them individually. Nesting roles properly
can often ease the application of the security model if it's kept fairly shallow, and if the
roles are logically named. If these are all true, then nesting of roles is a good idea.
Rationale:
Audit:
db2 => select grantee, rolename from syscat.roleauth where grantee in (select
rolename from syscat.roles)
Note: If value is blank, this would be considered passing.
Remediation:
197 | P a g e
db2 => attach to $DB2INSTANCE
198 | P a g e
8.4 Review Roles granted to PUBLIC (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
Granting to PUBLIC increases the risk of unauthorized entry into the database. Because
PUBLIC is accessible by any database user, it is important to understand the exposure it has
on all database objects. It would make sense to grant role membership to PUBLIC if all
users required all the privileges granted through that role.
Rationale:
As any role granted to PUBLIC can potentially allow the compromise of database
availability, confidentiality, or integrity, these roles should be restricted according to the
needs of the business.
Audit:
db2 => select grantee, rolename from syscat.roleauth where grantee = 'PUBLIC'
Note: If the value returned is blank, that is considered a passable finding.
199 | P a g e
Remediation:
References:
1. https://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec
.doc/doc/c0050531.html
200 | P a g e
8.5 Review Role Grantees with WITH ADMIN OPTION (Scored)
Profile Applicability:
• Level 2 - RDBMS
Description:
Using the WITH ADMIN OPTION clause of the GRANT (Role) SQL statement, the security
administrator can delegate the management and control of membership in a role to
someone else.
Rationale:
The WITH ADMIN OPTION clause gives another user the authority to grant membership in
the role to other users, to revoke membership in the role from other members of the role,
and to comment on a role, but not to drop the role.
Audit:
db2 => select rolename, grantee, admin from syscat.roleauth where grantortype
<> 'S' and admin = 'Y'
Note: If the value returned is blank, that is considered a passable finding.
Remediation:
201 | P a g e
db2 => connect to $DBNAME
db2=> revoke admin option for role <role name> from user <user name>
202 | P a g e
9 General Policy and Procedures
[This space intentionally left blank]
Description:
The DB2 instance manages the database environment and sets the configuration
parameters. It is recommended that only administrators are allowed to start and stop the
DB2 instance.
Rationale:
Only privileged users should have access to start and stop the DB2 instance. This will
ensure that the DB2 instance is controlled by authorized administrators.
Audit:
On Windows:
On Linux:
203 | P a g e
Remediation:
204 | P a g e
9.2 Remove Unused Schemas (Not Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
Rationale:
Unused schemas can be left unmonitored and may be subjected to abuse and therefore
should be removed.
Audit:
Remediation:
205 | P a g e
2. Run the following command from the DB2 command window:
206 | P a g e
9.3 Review System Tablespaces (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
System tablespaces store all system object data within that database. It is recommended
that system tablespaces are used to stored system data only and not user data.
Rationale:
Users should not have privileges to create user data objects within the system tablespaces.
User data objects created within the system tablespaces should be removed.
Audit:
3. Review the list of system tablespaces. If the output is BLANK, that is considered a
successful finding.
Remediation:
207 | P a g e
2. Review the system tablespaces to identify any user data objects within them.
3. Drop, migrate, or otherwise remove all user data objects (tables, schemas, etc.) from
within the system tablespaces.
4. Revoke write access for the system tablespaces from all users.
208 | P a g e
9.4 Remove Default Databases (Scored)
Profile Applicability:
• Level 1 - RDBMS
• Level 2 - RDBMS
Description:
A DB2 instance may come installed with default databases. It is recommended that the
SAMPLE database be removed.
Rationale:
Removing unused, well-known databases will reduce the attack surface of the system.
Audit:
db2 =>
Database 3 entry:
Database alias = SAMPLE
Database name = SAMPLE
Local database directory = C:
Database release level = c.00
Comment = Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
209 | P a g e
4. Review the output above and identify the SAMPLE database. If there is no SAMPLE
database, then it is considered a successful finding.
Remediation:
210 | P a g e
9.5 Enable SSL communication with LDAP server (Scored)
Profile Applicability:
Description:
The communication layer between a DB2 instance and the LDAP server should be
encrypted. It is recommended that the ENABLE_SSL parameter in the IBMLDAPSecurity.ini
file be set to TRUE.
Rationale:
Enabling SSL will help ensure the confidentiality of authentication credentials and other
information that is sent between the DB2 instance and the LDAP server.
Audit:
ENABLE_SSL = TRUE
Remediation:
ENABLE_SSL = TRUE
211 | P a g e
Default Value:
212 | P a g e
9.6 Secure the permission of the IBMLDAPSecurity.ini file (Scored)
Profile Applicability:
Description:
The IBMLDAPSecurity.ini file contains the IBM LDAP security plug-in configurations.
Rationale:
Recommended value is read and write access to DB2 administrators only and read-only to
Everyone/Other/Users/Domain Users. This will ensure that the parameter file is protected.
Note: the file is located under INSTANCE_HOME/sqllib/cfg/, for Linux; and
%DB2PATH%\cfg\, for Windows.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
For Windows:
For Linux:
OS => ls -al
213 | P a g e
Remediation:
For Windows:
For Linux:
214 | P a g e
9.7 Secure the permission of the SSLconfig.ini file (Scored)
Profile Applicability:
Description:
The SSLconfig.ini file contains the SSL configuration parameters for the DB2 instance,
including the password for KeyStore.
Rationale:
Recommended value is full access to DB2 administrators only, read and write access only
to members of the SYSADM group, and no access to other users. This will ensure that the
parameter file is protected.
Note: the file is located under INSTANCE_HOME/sqllib/cfg/, for Linux; and %INSTHOME%\,
for Windows.
Audit:
Perform the following DB2 commands to obtain the value for this setting:
For Windows:
For Linux:
215 | P a g e
OS => ls -al
Remediation:
For Windows:
For Unix:
216 | P a g e
9.8 Ensure Trusted Contexts are enabled (Not Scored)
Profile Applicability:
Description:
Rationale:
Creating Trusted Context objects to enforce encryption and assign roles will protect data in
transit and limit access to information on a per user/role basis. Additionally, it ensures
actions can be traced back to the user.
Audit:
Issue the following command to verify that a Trusted Context object is enabled:
select contextname, enabled from syscat.contexts where enabled = 'Y'
Remediation:
If there is no enabled Trusted Context object, create a Trusted Context object if needed and
enable it.
References:
1. http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.
admin.sec.doc/doc/c0050514.html
217 | P a g e
9.9 Secure plug-in library locations (Not Scored)
Profile Applicability:
Description:
Whether developing your own security plug-ins or migrating established plug-ins into your
environment, it is important to ensure that the plug-in directories are secure.
Rationale:
If plug-in directories are not secure, the plug-ins could be misused, tampered with, or
otherwise accessed in ways that could jeopardize the security of the server.
Audit:
Linux 32-bit:
Review the privileges assigned to the plug-in directories to ensure they are set to 755.
Linux 64-bit:
Review the privileges assigned to the plug-in directories to ensure they are set to 755.
218 | P a g e
Windows 32-bit and 64-bit:
Review the privileges assigned to the plug-in directories to ensure they are set to 755.
Note: The sub-directories 'instance name' and 'client', 'server', and 'group' are not created
automatically. The instance owner has to manually create them.
Remediation:
Change the privileges for all plug-in directories so they are set to 755.
On a Linux system, perform the following for each directory needing its privileges changed:
[db2inst1@tgt-db2-101-abc123 IBM]$ chmod 755 <directory>
219 | P a g e
9.10 Ensure that security plug-in support for two-part user IDs is
enabled (Not Scored)
Profile Applicability:
Description:
The DB2 database manager on Windows supports the use of two-part user IDs and the
mapping of two-part user IDs to two-part authorization IDs.
Rationale:
Having a two-part authorization scheme increases the security of user IDs by making them
harder to compromise.
Audit:
220 | P a g e
Remediation:
To enable server authentication that maps two-part user IDs to two-part authorization IDs,
you must set:
• srvcon_pw_plugin to IBMOSauthserverTwoPart
• clnt_pw_plugin to IBMOSauthclientTwoPart
To enable client authentication that maps two-part user IDs to two-part authorization IDs,
you must set:
• srvcon_pw_plugin to IBMOSauthserverTwoPart
• clnt_pw_plugin to IBMOSauthclientTwoPart
To enable Kerberos authentication that maps two-part user IDs to two-part authorization
IDs, you must set:
• srvcon_gssplugin_list to IBMOSkrb5TwoPart
• clnt_krb_plugin to IBMkrb5TwoPart
For example:
db2=> update dbm cfg using srvcon_pw_plugin IBMOSauthserverTwoPart
References:
1. http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.sec
.doc/doc/c0012039.html
221 | P a g e
9.11 Ensure permissions on communication exit library locations (Not
Scored)
Profile Applicability:
Description:
DB2 communication exit libraries must exist in specific directories. There should be proper
permissions on these directories.
Rationale:
If the permissions on the DB2 communication exit library directories are not set properly,
the contents of those directories could be misused, tampered with, or otherwise accessed
to negatively impact the security of the server.
Audit:
Linux 64-bit:
Issue the following command to check the permissions for the communication exit library:
[db2inst1@tgt-db2-101-abcd plugin]$ ll /opt/ibm/db2/V10.5/security64/plugin
total 12
drwxr-x--- 2 db2iadm1 db2inst1 4096 Aug 17 2013 commexit
222 | P a g e
Remediation:
The database manager looks for communication exit libraries in the following directories:
After locating the directory, update its permissions. The following is an example for a Linux
64-bit system:
[db2inst1@tgt-db2-101-abcd plugin]$ pwd
/opt/ibm/db2/V10.5/security64/plugin
[db2inst1@tgt-db2-101-abcd IBM]$ chmod -R 750 commexit
References:
1. http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.
admin.sec.doc/doc/c0060264.html
223 | P a g e
9.12 Ensure audit policies are enabled within the database (Not Scored)
Profile Applicability:
Description:
Creating and applying audit policies is crucial for securing and discovering issues within
your databases. Audit policies can help trigger events for changes to data objects, table
DML, and user access.
Rationale:
If audit policies are not enabled, issues may go undiscovered, and compromises and other
incidents may occur without being quickly detected. It may also not be possible to provide
evidence of compliance with security laws, regulations, and other requirements.
Audit:
Issue the following command to ensure that at least one audit policy returns an
auditstatus not equal to 'N'. The assumption is that if there is an active policy, then
information is being captured to audit.
db2=> select auditpolicyname, auditstatus from syscat.auditpolicies
Remediation:
References:
1. http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.
sql.ref.doc/doc/r0050607.html
224 | P a g e
Appendix: Summary Table
Control Set
Correctly
Yes No
1 Installation and Patches
1.1 Install the latest fix packs (Not Scored)
1.2 Use IP address rather than hostname (Scored)
1.3 Leverage the least privilege principle (Not Scored)
1.4 Use non-default account names (Scored)
1.5 Configure DB2 to use non-standard ports (Not Scored)
1.6 Creating the database with the RESTERICTIVE clause (Not
Scored)
2 DB2 Directory and File Permissions
2.1 Secure DB2 Runtime Library (Scored)
2.2 Secure the database container directory (Scored)
2.3 Set umask value for DB2 admin user .profile file (Scored)
2.4 Verify the groups within the DB2_GRP_LOOKUP environment
variable are appropriate (Windows only) (Not Scored)
2.5 Verify the domains within the DB2DOMAINLIST environment
variable are appropriate (Windows only) (Not Scored)
3 DB2 Configurations
3.1 DB2 Instance Parameter Settings
3.1.1 Enable audit buffer (Scored)
3.1.2 Encrypt user data across the network (Scored)
3.1.3 Require explicit authorization for cataloging (Scored)
3.1.4 Disable datalinks support (Scored)
3.1.5 Secure permissions for default database file path (Scored)
3.1.6 Set diagnostic logging to capture errors and warnings
(Scored)
3.1.7 Secure permissions for all diagnostic logs (Scored)
3.1.8 Require instance name for discovery requests (Scored)
3.1.9 Disable instance discoverability (Scored)
3.1.10 Authenticate federated users at the instance level (Scored)
3.1.11 Set maximum connection limits (Scored)
3.1.12 Set administrative notification level (Scored)
3.1.13 Enable server-based authentication (Scored)
3.1.14 Set failed archive retry delay (Scored)
3.1.15 Auto-restart after abnormal termination (Scored)
3.1.16 Disable database discovery (Scored)
3.1.17 Secure permissions for the primary archive log location
(Scored)
225 | P a g e
3.1.18 Secure permissions for the secondary archive log location
(Scored)
3.1.19 Secure permissions for the tertiary archive log location
(Scored)
3.1.20 Secure permissions for the log mirror location (Scored)
3.1.21 Establish retention set size for backups (Scored)
3.1.22 Set archive log failover retry limit (Scored)
3.2 Database Manager Configuration parameters
3.2.1 TCP/IP service name - svcename (Scored)
3.2.2 SSL service name - ssl_svcename (Scored)
3.2.3 Authentication type for incoming connections at the server -
srvcon_auth (Scored)
3.2.4 Database Manager Configuration parameter: trust_allclnts
(Not Scored)
3.2.5 Database Manager Configuration parameter: trust_clntauth
(Not Scored)
4 Row and Column Access Control (RCAC)
4.1 Review Organization's Policies against DB2 RCAC Policies
(Not Scored)
4.2 Secure SECADM Authority (Not Scored)
4.3 Review Users, Groups, and Roles (Not Scored)
4.4 Review Row Permission logic according to policy (Not
Scored)
4.5 Review Column Mask logic according to policy (Not Scored)
5 Database Maintenance
5.1 Enable Backup Redundancy (Not Scored)
5.2 Protecting Backups (Not Scored)
5.3 Enable Automatic Database Maintenance (Scored)
6 Securing Database Objects
6.1 Restrict Access to SYSCAT.AUDITPOLICIES (Scored)
6.2 Restrict Access to SYSCAT.AUDITUSE (Scored)
6.3 Restrict Access to SYSCAT.DBAUTH (Scored)
6.4 Restrict Access to SYSCAT.COLAUTH (Scored)
6.5 Restrict Access to SYSCAT.EVENTS (Scored)
6.6 Restrict Access to SYSCAT.EVENTTABLES (Scored)
6.7 Restrict Access to SYSCAT.ROUTINES (Scored)
6.8 Restrict Access to SYSCAT.INDEXAUTH (Scored)
6.9 Restrict Access to SYSCAT.PACKAGEAUTH (Scored)
6.10 Restrict Access to SYSCAT.PACKAGES (Scored)
6.11 Restrict Access to SYSCAT.PASSTHRUAUTH (Scored)
6.12 Restrict Access to SYSCAT.SECURITYPOLICIES (Scored)
6.13 Restrict Access to SYSCAT.SECURITYPOLICYEXEMPTIONS
(Scored)
226 | P a g e
6.14 Restrict Access to SYSCAT.SURROGATEAUTHIDS (Scored)
6.15 Restrict Access to SYSCAT.ROLEAUTH (Scored)
6.16 Restrict Access to SYSCAT.ROLES (Scored)
6.17 Restrict Access to SYSCAT.ROUTINEAUTH (Scored)
6.18 Restrict Access to SYSCAT.SCHEMAAUTH (Scored)
6.19 Restrict Access to SYSCAT.SCHEMATA (Scored)
6.20 Restrict Access to SYSCAT.SEQUENCEAUTH (Scored)
6.21 Restrict Access to SYSCAT.STATEMENTS (Scored)
6.22 Restrict Access to SYSCAT.TABAUTH (Scored)
6.23 Restrict Access to SYSCAT.TBSPACEAUTH (Scored)
6.24 Restrict Access to Tablespaces (Scored)
6.25 Restrict Access to SYSCAT.MODULEAUTH (Scored)
6.26 Restrict Access to SYSCAT.VARIABLEAUTH (Scored)
6.27 Restrict Access to SYSCAT.WORKLOADAUTH (Scored)
6.28 Restrict Access to SYSCAT.XSROBJECTAUTH (Scored)
6.29 Restrict Access to SYSCAT.AUTHORIZATIONIDS (Scored)
6.30 Restrict Access to SYSIBMADM.OBJECTOWNERS (Scored)
6.31 Restrict Access to SYSIBMADM.PRIVILEGES (Scored)
7 DB2 Authorities
7.1 Secure SYSADM authority (Scored)
7.2 Secure SYSCTRL authority (Scored)
7.3 Secure SYSMAINT Authority (Scored)
7.4 Secure SYSMON Authority (Scored)
7.5 Secure SECADM Authority (Scored)
7.6 Secure DBADM Authority (Scored)
7.7 Secure SQLADM Authority (Scored)
7.8 Secure DATAACCESS Authority (Scored)
7.9 Secure ACCESSCTRL Authority (Scored)
7.10 Secure WLMADM authority (Scored)
7.11 Secure CREATAB Authority (Scored)
7.12 Secure BINDADD Authority (Scored)
7.13 Secure CONNECT Authority (Scored)
7.14 Secure LOAD Authority (Scored)
7.15 Secure EXTERNALROUTINE Authority (Scored)
7.16 Secure QUIESCECONNECT Authority (Scored)
8 DB2 Roles
8.1 Review Roles (Scored)
8.2 Review Role Members (Scored)
8.3 Nested Roles (Scored)
8.4 Review Roles granted to PUBLIC (Scored)
8.5 Review Role Grantees with WITH ADMIN OPTION (Scored)
9 General Policy and Procedures
227 | P a g e
9.1 Start and Stop DB2 Instance (Not Scored)
9.2 Remove Unused Schemas (Not Scored)
9.3 Review System Tablespaces (Scored)
9.4 Remove Default Databases (Scored)
9.5 Enable SSL communication with LDAP server (Scored)
9.6 Secure the permission of the IBMLDAPSecurity.ini file
(Scored)
9.7 Secure the permission of the SSLconfig.ini file (Scored)
9.8 Ensure Trusted Contexts are enabled (Not Scored)
9.9 Secure plug-in library locations (Not Scored)
9.10 Ensure that security plug-in support for two-part user IDs is
enabled (Not Scored)
9.11 Ensure permissions on communication exit library locations
(Not Scored)
9.12 Ensure audit policies are enabled within the database (Not
Scored)
228 | P a g e
Appendix: Change History
Date Version Changes for this version
229 | P a g e
230 | P a g e