CIS Oracle Database 19c Benchmark v1.0.0
CIS Oracle Database 19c Benchmark v1.0.0
CIS Oracle Database 19c Benchmark v1.0.0
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 | P a g e
Table of Contents
2 | P a g e
3 | P a g e
4 | P a g e
6.1.5 Ensure the 'DATABASE LINK' Audit Option Is Enabled (Automated) .......... 157
6.1.6 Ensure the 'PUBLIC DATABASE LINK' Audit Option Is Enabled (Automated)
................................................................................................................................................................. 159
6.1.7 Ensure the 'PUBLIC SYNONYM' Audit Option Is Enabled (Automated) ....... 161
6.1.8 Ensure the 'SYNONYM' Audit Option Is Enabled (Automated) ........................ 163
6.1.9 Ensure the 'DIRECTORY' Audit Option Is Enabled (Automated) .................... 165
6.1.10 Ensure the 'SELECT ANY DICTIONARY' Audit Option Is Enabled
(Automated) ...................................................................................................................................... 167
6.1.11 Ensure the 'GRANT ANY OBJECT PRIVILEGE' Audit Option Is Enabled
(Automated) ...................................................................................................................................... 169
6.1.12 Ensure the 'GRANT ANY PRIVILEGE' Audit Option Is Enabled (Automated)
................................................................................................................................................................. 171
6.1.13 Ensure the 'DROP ANY PROCEDURE' Audit Option Is Enabled (Automated)
................................................................................................................................................................. 174
6.1.14 Ensure the 'ALL' Audit Option on 'SYS.AUD$' Is Enabled (Automated) .... 176
6.1.15 Ensure the 'PROCEDURE' Audit Option Is Enabled (Automated) ................ 178
6.1.16 Ensure the 'ALTER SYSTEM' Audit Option Is Enabled (Automated) .......... 181
6.1.17 Ensure the 'TRIGGER' Audit Option Is Enabled (Automated) ....................... 183
6.1.18 Ensure the 'CREATE SESSION' Audit Option Is Enabled (Automated) ...... 186
6.2 Unified Auditing ................................................................................................................................. 188
6.2.1 Ensure the 'CREATE USER' Action Audit Is Enabled (Automated) ................ 188
6.2.2 Ensure the 'ALTER USER' Action Audit Is Enabled (Automated) ................... 190
6.2.3 Ensure the 'DROP USER' Audit Option Is Enabled (Automated) ..................... 192
6.2.4 Ensure the 'CREATE ROLE' Action Audit Is Enabled (Automated) ................ 194
6.2.5 Ensure the 'ALTER ROLE' Action Audit Is Enabled (Automated) ................... 196
6.2.6 Ensure the 'DROP ROLE' Action Audit Is Enabled (Automated) ..................... 198
6.2.7 Ensure the 'GRANT' Action Audit Is Enabled (Automated) ............................... 200
6.2.8 Ensure the 'REVOKE' Action Audit Is Enabled (Automated) ............................ 202
6.2.9 Ensure the 'CREATE PROFILE' Action Audit Is Enabled (Automated) ......... 204
6.2.10 Ensure the 'ALTER PROFILE' Action Audit Is Enabled (Automated) ......... 206
6.2.11 Ensure the 'DROP PROFILE' Action Audit Is Enabled (Automated) ........... 208
6 | P a g e
7 | P a g e
Overview
This document is intended to address the recommended security settings for Oracle
Database 19c. This guide was tested against Oracle Database 19c installed with and without
pluggable database support running on a Windows Server instance as a stand-alone system
and running on an Oracle Linux instance also as a stand-alone system. Future Oracle
Database 19c critical patch updates (CPUs) may impact the recommendations included in
this document.
To obtain the latest version of this guide, please visit http://benchmarks.cisecurity.org. If
you have questions, comments, or have identified ways to improve this guide, please write
us at feedback@cisecurity.org.
Intended Audience
This benchmark 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 Oracle Database 19c on Oracle Linux or
Microsoft Windows Server.
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://workbench.cisecurity.org/.
8 | P a g e
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.
Assessment Status
An assessment status is included for every recommendation. The assessment status
indicates whether the given recommendation can be automated or requires manual steps
to implement. Both statuses are equally important and are determined and supported as
defined below:
Automated
Manual
9 | P a g e
Profile Definitions
The following configuration profiles are defined by this Benchmark:
Items in this profile apply to Oracle Database 19c configured to use Traditional
Auditing and intend to:
This profile extends the “RDBMS using Traditional Auditing” profile. Items in this
profile apply to RDBMS running on a Linux Host operating system with Oracle
Database 19c configured to use Traditional Auditing and intend to:
This profile extends the “RDBMS using Traditional Auditing” profile. Items in this
profile apply to RDBMS running on a Windows Server operating system with Oracle
Database 19c configured to use Traditional Auditing and intend to:
Items in this profile apply to Oracle Database 19c configured to use Unified Auditing
and intend to:
10 | P a g e
This profile extends the “RDBMS using Unified Auditing” profile. Items in this profile
apply to RDBMS running on a Linux Host operating system with Oracle Database
19c configured to use Unified and intend to:
This profile extends the “RDBMS using Unified Auditing” profile. Items in this profile
apply to RDBMS running on a Windows Server operating system with Oracle
Database 19c configured to use Unified and intend to:
11 | 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
Emad Al-Mousa
Nelly Chng
Editor
Alexander Kornbrust
Jay Mehta
Tim Harrison, Center for Internet Security
Joseph Testa
12 | P a g e
Recommendations
1 Oracle Database Installation and Patching Requirements
One of the best ways to ensure secure Oracle security is to implement Critical Patch
Updates (CPUs) as they come out, along with any applicable OS patches that will not
interfere with system operations. It is additionally prudent to remove Oracle sample data
from production environments.
Description:
The Oracle installation version and patches should be the most recent that are compatible
with the organization's operational needs.
Rationale:
Using the most recent Oracle database software, along with all applicable patches can help
limit the possibilities for vulnerabilities in the software, the installation version and/or
patches applied during setup should be established according to the needs of the
organization. Ensure you are using a release that is covered by a level of support that
includes the generation of Critical Patch Updates.
Audit:
To assess this recommendation, use the following example shell command as appropriate
for your environment.
For example, on Linux systems:
13 | P a g e
Remediation:
References:
1. http://www.oracle.com/us/support/assurance/fixing-policies/index.html
2. http://www.oracle.com/technetwork/topics/security/alerts-086861.html
3. http://www.oracle.com/us/support/library/lifetime-support-technology-
069183.pdf
CIS Controls:
Version 6
Version 7
Note: For all files that have parameters that can be modified with the OS and/or SQL
commands/scripts, these will both be listed where appropriate.
14 | P a g e
Description:
extproc should be removed from the listener.ora to mitigate the risk that OS libraries
can be invoked by the Oracle instance.
Rationale:
extproc allows the database to run procedures from OS libraries. These library calls can, in
turn, run any OS command.
Audit:
To audit this recommendation, execute the following shell commands as appropriate for
your Linux/Windows environment.
Linux environment:
Windows environment:
Remediation:
15 | P a g e
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/netag/configuring-and-administering-oracle-net-listener.html
CIS Controls:
Version 6
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
16 | P a g e
Description:
Rationale:
Blocking unprivileged users from making alterations of the listener.ora file, where
remote data/service settings are specified, will help protect data confidentiality.
Audit:
To audit this recommendation, execute the following shell commands as appropriate for
your Linux/Windows environment.
Linux environment:
Windows environment:
Remediation:
17 | P a g e
Default Value:
Not set.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/netag/configuring-and-administering-oracle-net-listener.html
CIS Controls:
Version 6
Version 7
18 | P a g e
Note: The remediation procedures assume the use of a server parameter file, which is often
a preferred method of storing server initialization parameters.
For your environment, leaving off the SCOPE = SPFILE directive or substituting it with
SCOPE = BOTH might be preferred depending on the recommendation.
Description:
The AUDIT_SYS_OPERATIONS setting provides for the auditing of all user activities conducted
under the SYSOPER and SYSDBA accounts. The setting should be set to TRUE to enable this
auditing.
Rationale:
Audit:
SELECT UPPER(VALUE)
FROM V$SYSTEM_PARAMETER
WHERE UPPER(NAME) = 'AUDIT_SYS_OPERATIONS';
19 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement and restart the instance.
Default Value:
TRUE
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/refrn/AUDIT_SYS_OPERATIONS.html
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
20 | P a g e
Description:
The audit_trail setting determines whether or not Oracle's basic audit features are
enabled. It can be set to "Operating System"(OS); DB; DB,EXTENDED; XML; or XML,EXTENDED.
The value should be set according to the needs of the organization.
Rationale:
Enabling the basic auditing features for the Oracle instance permits the collection of data to
troubleshoot problems, as well as provides valuable forensic logs in the case of a system
breach this value should be set according to the needs of the organization.
Audit:
SELECT UPPER(VALUE)
FROM V$SYSTEM_PARAMETER
WHERE UPPER(NAME)='AUDIT_TRAIL';
Remediation:
To remediate this setting, execute one of the following SQL statements and restart the
instance.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/refrn/AUDIT_TRAIL.html
21 | P a g e
CIS Controls:
Version 6
Version 7
22 | P a g e
Description:
The global_names setting requires that the name of a database link matches that of the
remote database it will connect to. This setting should have a value of TRUE.
Rationale:
Not requiring database connections to match the domain that is being called remotely
could allow unauthorized domain sources to potentially connect via brute-force tactics.
Audit:
SELECT UPPER(VALUE)
FROM V$SYSTEM_PARAMETER
WHERE UPPER(NAME)='GLOBAL_NAMES';
Remediation:
23 | P a g e
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/refrn/GLOBAL_NAMES.html
CIS Controls:
Version 6
Version 7
24 | P a g e
Description:
Rationale:
Allowing the OS to use external groups for database management could cause privilege
overlaps and generally weaken security.
Audit:
SELECT UPPER(VALUE)
FROM V$SYSTEM_PARAMETER
WHERE UPPER(NAME)='OS_ROLES';
Remediation:
25 | P a g e
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/refrn/OS_ROLES.html
CIS Controls:
Version 6
Version 7
26 | P a g e
Description:
The remote_listener setting determines whether or not a valid listener can be established
on a system separate from the database instance. This setting should be empty unless the
organization specifically needs a valid listener on a separate system or on nodes running
Oracle RAC instances.
Rationale:
Permitting a remote listener for connections to the database instance can allow for the
potential spoofing of connections and that could compromise data confidentiality and
integrity.
Audit:
SELECT UPPER(VALUE)
FROM V$SYSTEM_PARAMETER
WHERE UPPER(NAME)='REMOTE_LISTENER' AND VALUE IS NOT NULL;
27 | P a g e
Remediation:
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/refrn/REMOTE_LISTENER.html
Additional Information:
CIS Controls:
Version 6
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
28 | P a g e
Description:
Rationale:
The use of this sort of password login file could permit unsecured, privileged connections
to the database.
Audit:
SELECT UPPER(VALUE)
FROM V$SYSTEM_PARAMETER
WHERE UPPER(NAME)='REMOTE_LOGIN_PASSWORDFILE';
Ensure VALUE is set to NONE or in the event you are running DR/Data Guard, EXCLUSIVE is an
allowable VALUE.
Remediation:
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/refrn/REMOTE_LOGIN_PASSWORDFILE.html
29 | P a g e
CIS Controls:
Version 6
Version 7
30 | P a g e
Description:
The remote_os_authent setting determines whether or not OS 'roles' with the attendant
privileges are allowed for remote client connections. This setting should have a value of
FALSE.
Note: This parameter has been deprecated in 12.1 and higher versions.
Rationale:
Permitting OS roles for database connections can allow the spoofing of connections and
permit granting the privileges of an OS role to unauthorized users to make connections,
this value should be restricted according to the needs of the organization.
Audit:
SELECT UPPER(VALUE)
FROM V$SYSTEM_PARAMETER
WHERE UPPER(NAME)='REMOTE_OS_AUTHENT';
Remediation:
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/refrn/REMOTE_OS_AUTHENT.html
31 | P a g e
CIS Controls:
Version 6
Version 7
32 | P a g e
Description:
Rationale:
Allowing remote clients OS roles to have permissions for database management could
cause privilege overlaps and generally weaken security.
Audit:
SELECT UPPER(VALUE)
FROM V$SYSTEM_PARAMETER
WHERE UPPER(NAME)='REMOTE_OS_ROLES';
Remediation:
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/refrn/REMOTE_OS_ROLES.html
CIS Controls:
Version 6
33 | P a g e
Version 7
34 | P a g e
Description:
Note: This parameter has been deprecated in 12.1 and higher versions.
Rationale:
Oracle database password case-sensitivity increases the pool of characters that can be
chosen for the passwords, making brute-force password attacks quite difficult.
Audit:
SELECT UPPER(VALUE)
FROM V$SYSTEM_PARAMETER
WHERE UPPER(NAME)='SEC_CASE_SENSITIVE_LOGON';
Remediation:
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/refrn/SEC_CASE_SENSITIVE_LOGON.html
35 | P a g e
CIS Controls:
Version 6
Version 7
36 | P a g e
Description:
Rationale:
Allowing an unlimited number of login attempts for a user connection can facilitate both
brute-force login attacks and the occurrence of denial-of-service.
Audit:
SELECT UPPER(VALUE)
FROM V$SYSTEM_PARAMETER
WHERE UPPER(NAME)='SEC_MAX_FAILED_LOGIN_ATTEMPTS';
Remediation:
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/refrn/SEC_MAX_FAILED_LOGIN_ATTEMPTS.html
37 | P a g e
CIS Controls:
Version 6
Version 7
38 | P a g e
Description:
Rationale:
Bad packets received from the client can potentially indicate packet-based attacks on the
system, such as "TCP SYN Flood" or "Smurf" attacks, which could result in a denial-of-
service condition, this value should be set according to the needs of the organization.
Audit:
SELECT UPPER(VALUE)
FROM V$SYSTEM_PARAMETER
WHERE UPPER(NAME)='SEC_PROTOCOL_ERROR_FURTHER_ACTION';
Remediation:
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/refrn/SEC_PROTOCOL_ERROR_FURTHER_ACTION.html
39 | P a g e
CIS Controls:
Version 6
40 | P a g e
Description:
Rationale:
Bad packets received from the client can potentially indicate packet-based attacks on the
system, which could result in a denial-of-service condition.
Audit:
SELECT UPPER(VALUE)
FROM V$SYSTEM_PARAMETER
WHERE UPPER(NAME)='SEC_PROTOCOL_ERROR_TRACE_ACTION';
Remediation:
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/refrn/SEC_PROTOCOL_ERROR_TRACE_ACTION.html
41 | P a g e
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
42 | P a g e
Description:
The information about patch/update release number provides information about the exact
patch/update release that is currently running on the database. This is sensitive
information that should not be revealed to anyone who requests it.
Rationale:
Allowing the database to return information about the patch/update release number could
facilitate unauthorized users' attempts to gain access based upon known patch weaknesses.
Audit:
SELECT UPPER(VALUE)
FROM V$SYSTEM_PARAMETER
WHERE UPPER(NAME)='SEC_RETURN_SERVER_RELEASE_BANNER';
Remediation:
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/refrn/SEC_RETURN_SERVER_RELEASE_BANNER.html
43 | P a g e
CIS Controls:
Version 6
Version 7
44 | P a g e
Description:
The SQL92_SECURITY parameter setting TRUE requires that a user must also be granted the
SELECT object privilege before being able to perform UPDATE or DELETE operations on tables
that have WHERE or SET clauses. The setting should have a value of TRUE.
Rationale:
A user without SELECT privilege can still infer the value stored in a column by referring to
that column in a DELETE or UPDATE statement. This setting prevents inadvertent information
disclosure by ensuring that only users who already have SELECT privilege can execute the
statements that would allow them to infer the stored values.
Audit:
SELECT UPPER(VALUE)
FROM V$SYSTEM_PARAMETER
WHERE UPPER(NAME)='SQL92_SECURITY';
45 | P a g e
Remediation:
Default Value:
TRUE
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/refrn/SQL92_SECURITY.html
CIS Controls:
Version 6
Version 7
46 | P a g e
Description:
The _trace_files_public setting determines whether or not the system's trace file is
world readable. This setting should have a value of FALSE to restrict trace file access.
Rationale:
Making the file world readable means anyone can read the instance's trace file, which could
contain sensitive information about instance operations.
Audit:
SELECT VALUE
FROM V$SYSTEM_PARAMETER
WHERE NAME='_trace_files_public';
Remediation:
References:
1. http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:4295521
746131
47 | P a g e
CIS Controls:
Version 6
Version 7
48 | P a g e
Description:
Rationale:
If RESOURCE_LIMIT is set to FALSE, none of the system resource limits that are set in any
database profiles are enforced. If RESOURCE_LIMIT is set to TRUE, the limits set in database
profiles are enforced.
Audit:
SELECT UPPER(VALUE)
FROM V$SYSTEM_PARAMETER
WHERE UPPER(NAME)='RESOURCE_LIMIT';
Remediation:
49 | P a g e
Default Value:
FALSE
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/refrn/RESOURCE_LIMIT.html
CIS Controls:
Version 6
Version 7
50 | P a g e
Description:
The FAILED_LOGIN_ATTEMPTS setting determines how many failed login attempts are
permitted before the system locks the user's account. While different profiles can have
different and more restrictive settings, such as USERS and APPS, the minimum(s)
recommended here should be set on the DEFAULT profile.
Rationale:
Repeated failed login attempts can indicate the initiation of a brute-force login attack, this
value should be set according to the needs of the organization. (See the Notes for a warning
on a known bug that can make this security measure backfire.)
Impact:
One concern is the possibility of this setting being exploited to craft a DDoS attack by using
the row-locking delay between failed login attempts (see Oracle Bug 7715339 – Logon
failures causes “row cache lock” waits – Allow disable of logon delay [ID 7715339.8], so the
configuration of this setting depends on using the bug workaround).
51 | P a g e
Audit:
Remediation:
Remediate this setting by executing the following SQL statement for each PROFILE returned
by the audit procedure.
52 | P a g e
References:
1. https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/CREATE-
PROFILE.html#d346953e684
Additional Information:
Warning: While the setting for the FAILED_LOGIN_ATTEMPTS value can also be set in
sqlnet.ora, this only applies to listed users. The similar setting used to block a DDoS, the
SEC_MAX_FAILED_LOGIN_ATTEMPTS initialization parameter, can be used to protect
unauthorized intruders from attacking the server processes for applications, but this
setting does not protect against unauthorized attempts via valid usernames.
CIS Controls:
Version 6
Version 7
53 | P a g e
Description:
The PASSWORD_LOCK_TIME setting determines how many days must pass for the user's
account to be unlocked after the set number of failed login attempts has occurred. The
suggested value for this is one day or greater.
Rationale:
Locking the user account after repeated failed login attempts can block further brute-force
login attacks, but can create administrative headaches as this account unlocking process
always requires DBA intervention.
Audit:
54 | P a g e
Remediation:
Remediate this setting by executing the following SQL statement for each PROFILE returned
by the audit procedure.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/CREATE-
PROFILE.html#d346953e795
CIS Controls:
Version 6
Version 7
55 | P a g e
Description:
The PASSWORD_LIFE_TIME setting determines how long a password may be used before the
user is required to be change it. The suggested value for this is 90 days or less.
Rationale:
Allowing passwords to remain unchanged for long periods makes the success of brute-
force login attacks more likely.
Audit:
56 | P a g e
FROM CDB_PROFILES
WHERE PROFILE='DEFAULT'
AND RESOURCE_NAME='PASSWORD_LIFE_TIME'
AND CON_ID = P.CON_ID),
'UNLIMITED','9999',
P.LIMIT)) > 90
AND P.RESOURCE_NAME = 'PASSWORD_LIFE_TIME'
AND EXISTS ( SELECT 'X' FROM CDB_USERS U WHERE U.PROFILE = P.PROFILE )
ORDER BY CON_ID, PROFILE, RESOURCE_NAME;
Remediation:
Remediate this setting by executing the following SQL statement for each PROFILE
returned by the audit procedure.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/CREATE-
PROFILE.html#d346953e694
CIS Controls:
Version 6
57 | P a g e
Description:
The PASSWORD_REUSE_MAX setting determines how many different passwords must be used
before the user is allowed to reuse a prior password. The suggested value for this is 20
passwords or greater.
Rationale:
Allowing reuse of a password within a short period of time after the password's initial use
can make the success of both social-engineering and brute-force password-based attacks
more likely.
Audit:
58 | P a g e
FROM CDB_PROFILES P
WHERE TO_NUMBER(DECODE(P.LIMIT,
'DEFAULT',(SELECT DECODE(LIMIT,'UNLIMITED',9999,LIMIT)
FROM CDB_PROFILES
WHERE PROFILE='DEFAULT'
AND RESOURCE_NAME='PASSWORD_REUSE_MAX'
AND CON_ID = P.CON_ID),
'UNLIMITED','9999',P.LIMIT)) < 20
AND P.RESOURCE_NAME = 'PASSWORD_REUSE_MAX'
AND EXISTS ( SELECT 'X' FROM CDB_USERS U WHERE U.PROFILE = P.PROFILE )
ORDER BY CON_ID, PROFILE, RESOURCE_NAME;
Remediation:
Remediate this setting by executing the following SQL statement for each PROFILE returned
by the audit procedure.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/CREATE-
PROFILE.html#d346953e716
Additional Information:
The above restriction should be applied along with the PASSWORD_REUSE_TIME setting.
CIS Controls:
Version 6
Version 7
59 | P a g e
Description:
The PASSWORD_REUSE_TIME setting determines the amount of time in days that must pass
before the same password may be reused. The suggested value for this is 365 days or
greater.
Rationale:
Reusing the same password after only a short period of time has passed makes the success
of brute-force login attacks more likely.
Audit:
60 | P a g e
'DEFAULT',(SELECT DECODE(LIMIT,'UNLIMITED',9999,LIMIT)
FROM CDB_PROFILES
WHERE PROFILE='DEFAULT'
AND RESOURCE_NAME='PASSWORD_REUSE_TIME'
AND CON_ID = P.CON_ID),
'UNLIMITED','9999',P.LIMIT)) < 365
AND P.RESOURCE_NAME = 'PASSWORD_REUSE_TIME'
AND EXISTS ( SELECT 'X' FROM CDB_USERS U WHERE U.PROFILE = P.PROFILE )
ORDER BY CON_ID, PROFILE, RESOURCE_NAME;
Remediation:
Remediate this setting by executing the following SQL statement for each PROFILE returned
by the audit procedure.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/CREATE-
PROFILE.html#d346953e716
Additional Information:
The above restriction should be applied along with the PASSWORD_REUSE_MAX setting.
CIS Controls:
Version 6
Version 7
61 | P a g e
Description:
The PASSWORD_GRACE_TIME setting determines how many days can pass after the user's
password expires before the user's login capability is automatically locked out. The
suggested value for this is five days or less.
Rationale:
Locking the user account after the expiration of the password change requirement's grace
period can help prevent password-based attacks against any forgotten or disused accounts,
while still allowing the account and its information to be accessible by DBA intervention.
Audit:
62 | P a g e
FROM CDB_PROFILES P
WHERE TO_NUMBER(DECODE(P.LIMIT,
'DEFAULT',(SELECT DECODE(LIMIT,'UNLIMITED',9999,LIMIT)
FROM CDB_PROFILES
WHERE PROFILE='DEFAULT'
AND RESOURCE_NAME='PASSWORD_GRACE_TIME'
AND CON_ID = P.CON_ID),
'UNLIMITED','9999',P.LIMIT)) > 5
AND P.RESOURCE_NAME = 'PASSWORD_GRACE_TIME'
AND EXISTS ( SELECT 'X' FROM CDB_USERS U WHERE U.PROFILE = P.PROFILE )
ORDER BY CON_ID, PROFILE, RESOURCE_NAME;
Remediation:
Remediate this setting by executing the following SQL statement for each PROFILE returned
by the audit procedure.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/CREATE-
PROFILE.html#d346953e806
CIS Controls:
Version 6
Version 7
63 | P a g e
Description:
Rationale:
Through Oracle database profiles, password complexity rules (mixed cases with digits and
special characters), blocking of simple combinations, and enforcing change/history settings
can potentially thwart unauthorized logins by an unauthorized user.
Audit:
64 | P a g e
Remediation:
Create a custom password verification function which fulfills the password requirements of
the organization.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/CREATE-
PROFILE.html#d346953e824
CIS Controls:
Version 6
Version 7
65 | P a g e
Description:
The SESSIONS_PER_USER setting determines the maximum number of user sessions that are
allowed to be open concurrently. The suggested value for this is 10 or less.
Rationale:
Limiting the number of the SESSIONS_PER_USER can help prevent memory resource
exhaustion by poorly formed requests or intentional denial-of-service attacks.
Audit:
66 | P a g e
FROM CDB_PROFILES
WHERE PROFILE='DEFAULT'
AND RESOURCE_NAME='SESSIONS_PER_USER'
AND CON_ID = P.CON_ID),
'UNLIMITED','9999',P.LIMIT)) > 10
AND P.RESOURCE_NAME = 'SESSIONS_PER_USER'
AND EXISTS ( SELECT 'X' FROM CDB_USERS U WHERE U.PROFILE = P.PROFILE )
ORDER BY CON_ID, PROFILE, RESOURCE_NAME;
Remediation:
To remediate this setting, execute the following SQL statement for each PROFILE returned
by the audit procedure.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/CREATE-
PROFILE.html#GUID-ABC7AE4D-64A8-4EA9-857D-BEF7300B64C3__GUID-
E39008BB-092E-49B2-AAC2-3C4A98FC9A03
Additional Information:
CIS Controls:
Version 6
Version 7
67 | P a g e
Description:
Rationale:
Audit:
68 | P a g e
WHERE TO_NUMBER(DECODE(P.LIMIT,
'DEFAULT',(SELECT DISTINCT
DECODE(LIMIT,'UNLIMITED',9999,LIMIT)
FROM CDB_PROFILES
WHERE PROFILE='DEFAULT'
AND RESOURCE_NAME='INACTIVE_ACCOUNT_TIME'
AND CON_ID = P.CON_ID),
'UNLIMITED','9999',
P.LIMIT)) > 120
AND P.RESOURCE_NAME = 'INACTIVE_ACCOUNT_TIME'
AND EXISTS ( SELECT 'X' FROM CDB_USERS U WHERE U.PROFILE = P.PROFILE );
Remediation:
To remediate this setting, execute the following SQL statement for each PROFILE returned
by the audit procedure.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/CREATE-
PROFILE.html#GUID-ABC7AE4D-64A8-4EA9-857D-
BEF7300B64C3__INACTIVE_ACCOUNT_TIME-585837A4
Additional Information:
CIS Controls:
Version 6
Version 7
69 | P a g e
4 Users
4.1 Ensure All Default Passwords Are Changed (Automated)
Profile Applicability:
Description:
Rationale:
Audit:
70 | P a g e
and SYSTEM accounts [may be] listed in DBA_USERS_WITH_DEFPWD even though the accounts
were created with non-default passwords. Setting the same passwords again with ALTER
USER correctly recognizes that the accounts do not have default passwords."
Note: If you have set remote_password_file=NONE, then you won't be able to change SYS
password through ALTER USER. Since remote_password_file is set to NONE, SYS account is
effectively disabled. However, if you would like to change SYS password, then you will need
to change remote_password_file to exclusive and then change SYS password.
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
• Manually issue the following SQL statement for each USERNAME returned in the
Audit Procedure:
• Execute the following SQL script to assign a randomly generated password to each
account using a default password:
begin
for r_user in (select username
from dba_users_with_defpwd
where username not like '%XS$NULL%')
loop
DBMS_OUTPUT.PUT_LINE('Password for user '||r_user.username||'
will be changed.');
execute immediate 'alter user "'||r_user.username||'"
identified by "'||
DBMS_RANDOM.string('a',16)||'"account lock password expire';
end loop;
end;
References:
1. https://docs.oracle.com/en/database/oracle/oracle-database/19/dbseg/keeping-
your-oracle-database-secure.html
2. https://support.oracle.com/epmos/faces/DocumentDisplay?id=2173962.1
CIS Controls:
Version 6
71 | P a g e
Version 7
72 | P a g e
4.2 Ensure All Sample Data And Users Have Been Removed (Automated)
Profile Applicability:
Description:
Oracle sample schemas can be used to create sample users (BI,HR,IX,OE,PM,SCOTT,SH), with
well-known default passwords, particular views, and procedures/functions, in addition to
tables and fictitious data. The sample schemas should be removed.
Rationale:
The sample schemas are typically not required for production operations of the database.
The default users, views, and/or procedures/functions created by sample schemas could
be used to launch exploits against production environments.
Impact:
The Oracle sample usernames may be in use on a production basis. It is important that you
first verify that BI, HR, IX, OE, PM, SCOTT, and/or SH are not valid production usernames
before executing the dropping SQL scripts. This may be particularly true with the HR and BI
users. If any of these users are present, it is important to be cautious and confirm the
schemas present are, in fact, Oracle sample schemas and not production schemas
being relied upon by business operations.
Audit:
SELECT USERNAME
FROM DBA_USERS
WHERE USERNAME IN ('BI','HR','IX','OE','PM','SCOTT','SH');
73 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to run
the drop script.
$ORACLE_HOME/demo/schema/drop_sch.sql
Note: The recyclebin is not set to OFF within the default drop script, which means that the
data will still be present in your environment until the recyclebin is emptied.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-database/19/comsc/toc.htm
CIS Controls:
Version 6
Version 7
74 | P a g e
Description:
Rationale:
Allowing remote OS authentication of a user to the database can potentially allow supposed
"privileged users" to connect as "authenticated," even when the remote system is
compromised.
Audit:
SELECT A.USERNAME,
DECODE (A.CON_ID,0,(SELECT NAME FROM V$DATABASE),
1,(SELECT NAME FROM V$DATABASE),
(SELECT NAME FROM V$PDBS B
WHERE A.CON_ID = B.CON_ID))
FROM CDB_USERS A
WHERE AUTHENTICATION_TYPE = 'EXTERNAL';
75 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/refrn/DBA_USERS.html#d1365273e525
Additional Information:
The PASSWORD keyword (column) used in the SQL for prior Oracle versions has been
deprecated from version 11.2 onward in favor of the new AUTHENTICATION_TYPE keyword
(column) for the DBA_USERS table. However, the PASSWORD column has still been retained for
backward compatibility.
CIS Controls:
Version 6
Version 7
76 | P a g e
Description:
Upon creation database users are assigned to the DEFAULT profile unless otherwise
specified. No users should be assigned to that profile.
Rationale:
Users should be created with function-appropriate profiles. The DEFAULT profile, being
defined by Oracle, is subject to change at any time (e.g. by patch or version update). The
DEFAULT profile has unlimited settings that are often required by the SYS user when
patching; such unlimited settings should be tightly reserved and not applied to
unnecessary users.
Audit:
SELECT USERNAME
FROM DBA_USERS
WHERE PROFILE='DEFAULT'
AND ACCOUNT_STATUS='OPEN'
AND ORACLE_MAINTAINED = 'N';
SELECT A.USERNAME,
DECODE (A.CON_ID,0,(SELECT NAME FROM V$DATABASE),
1,(SELECT NAME FROM V$DATABASE),
(SELECT NAME FROM V$PDBS B WHERE A.CON_ID = B.CON_ID))
FROM CDB_USERS A
WHERE A.PROFILE='DEFAULT'
AND A.ACCOUNT_STATUS='OPEN'
AND A.ORACLE_MAINTAINED = 'N';
77 | P a g e
Remediation:
To remediate this recommendation, execute the following SQL statement for each user
returned by the audit query using a functional-appropriate profile, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
CIS Controls:
Version 6
Version 7
78 | P a g e
Description:
The table sys.user$mig is created during migration and contains the Oracle password
hashes before the migration starts. This table should be dropped.
Rationale:
The table sys.user$mig is not deleted after the migration. An attacker could access the
table containing the Oracle password hashes.
Audit:
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
79 | P a g e
CIS Controls:
Version 6
Version 7
80 | P a g e
Description:
Rationale:
Using public database links in the database can allow anyone with a connection to the
database to query, update, insert, delete data on a remote database depending on the
userid that is part of the link.
Audit:
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
81 | P a g e
CIS Controls:
Version 7
82 | P a g e
IMPORTANT: Use caution when revoking privileges from PUBLIC. Oracle and third-party
products explicitly require default grants to PUBLIC for commonly used functions, objects,
and in view definitions. After revoking any privilege from PUBLIC, verify that applications
keep running properly and recompile invalid database objects. Specific grants to users and
roles may be needed to make all objects valid. Please see the following Oracle support
document which provides further information and SQL statements that can be used to
determine dependencies that require explicit grants: Be Cautious When Revoking
Privileges Granted to PUBLIC (Doc ID 247093.1) Always test database changes in
development and test environments before making changes to production databases.
83 | P a g e
Description:
• The Oracle database DBMS_LDAP package contains functions and procedures that
enable programmers to access data from LDAP servers.
• The Oracle database UTL_INADDR package provides an API to retrieve host names
and IP addresses of local and remote hosts.
• The Oracle database UTL_TCP package can be used to read/write file to TCP sockets
on the server where the Oracle instance is installed.
• The Oracle database UTL_MAIL package can be used to send email from the server
where the Oracle instance is installed.
• The Oracle database UTL_SMTP package can be used to send email from the server
where the Oracle instance is installed. The user PUBLIC should not be able to execute
UTL_SMTP.
• The Oracle database UTL_DBWS package can be used to read/write file to web-based
applications on the server where the Oracle instance is installed. This package is not
automatically installed for security reasons.
• The Oracle database UTL_ORAMTS package can be used to perform HTTP requests.
This could be used to send information to the outside.
84 | P a g e
• The Oracle database UTL_HTTP package can be used to perform HTTP requests. This
could be used to send information to the outside.
• The Oracle database HTTPURITYPE object type can be used to perform HTTP
requests.
Rationale:
• The use of the DBMS_LDAP package can be used to create specially crafted error
messages or send information via DNS to the outside.
• The UTL_INADDR package can be used to create specially crafted error messages or
send information via DNS to the outside.
• The UTL_TCP package could allow an unauthorized user to corrupt the TCP stream
used to carry the protocols that communicate with the instance's external
communications.
• The UTL_MAIL package could allow an unauthorized user to corrupt the SMTP
function to accept or generate junk mail that can result in a denial-of-service
condition due to network saturation.
• The UTL_SMTP package could allow an unauthorized user to corrupt the SMTP
function to accept or generate junk mail that can result in a denial-of-service
condition due to network saturation.
• The UTL_DBWS package could allow an unauthorized user to corrupt the HTTP
stream used to carry the protocols that communicate for the instance's web-based
external communications.
• The UTL_ORAMTS package could be used to send (sensitive) information to external
websites. The use of this package should be restricted according to the needs of the
organization.
• The UTL_HTTP package could be used to send (sensitive) information to external
websites.
• The use of this package should be restricted according to the needs of the
organization.
• The ability to perform HTTP requests could be used to leak information from the
database to an external destination.
Audit:
85 | P a g e
WHERE GRANTEE='PUBLIC'
AND PRIVILEGE='EXECUTE'
AND TABLE_NAME IN
('DBMS_LDAP','UTL_INADDR','UTL_TCP','UTL_MAIL','UTL_SMTP','UTL_DBWS','UTL_ORA
MTS','UTL_HTTP','HTTPURITYPE');
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
CIS Controls:
Version 6
86 | P a g e
Version 7
87 | P a g e
Description:
• The Oracle database DBMS_ADVISOR package can be used to write files located on the
server where the Oracle instance is installed. The user PUBLIC should not be able to
execute DBMS_ADVISOR.
• The Oracle database DBMS_LOB package provides subprograms that can manipulate
and read/write on BLOB's, CLOB's, NCLOB's, BFILE's, and temporary LOB's. The user
PUBLIC should not be able to execute DBMS_LOB.
• The Oracle database UTL_FILE package can be used to read/write files located on
the server where the Oracle instance is installed. The user PUBLIC should not be able
to execute UTL_FILE.
Rationale:
88 | P a g e
Audit:
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
CIS Controls:
Version 6
89 | P a g e
Version 7
90 | P a g e
Description:
• The DBMS_CRYPTO settings provide a toolset that determines the strength of the
encryption algorithm used to encrypt application data and is part of the SYS schema.
The DES (56-bit key), 3DES (168-bit key), 3DES-2KEY (112-bit key), AES
(128/192/256-bit keys), and RC4 are available.
• The DBMS_OBFUSCATION_TOOLKIT provides one of the tools that determine the
strength of the encryption algorithm used to encrypt application data and is part of
the SYS schema. The DES (56-bit key) and 3DES (168-bit key) are the only two types
available.
• The Oracle database DBMS_RANDOM package is used for generating random numbers
but should not be used for cryptographic purposes.
Rationale:
91 | P a g e
Audit:
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
CIS Controls:
Version 6
92 | P a g e
Version 7
93 | P a g e
Description:
• The Oracle database DBMS_JAVA package can run Java classes (e.g. OS commands) or
grant Java privileges. The user PUBLIC should not be able to execute DBMS_JAVA.
• The Oracle database DBMS_JAVA_TEST package can run Java classes (e.g. OS
commands) or grant Java privileges. The user PUBLIC should not be able to execute
DBMS_JAVA_TEST.
Rationale:
• The DBMS_JAVA package could allow an attacker to run OS commands from the
database.
• The DBMS_JAVA_TEST package could allow an attacker to run operating system
commands from the database.
Audit:
94 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
CIS Controls:
Version 6
Version 7
95 | P a g e
Description:
• The Oracle database DBMS_SCHEDULER package schedules and manages the database
and operating system jobs. The user PUBLIC should not be able to execute
DBMS_SCHEDULER.
• The Oracle database DBMS_JOB package schedules and manages the jobs sent to the
job queue and has been superseded by the DBMS_SCHEDULER package, even though
DBMS_JOB has been retained for backwards compatibility. The user PUBLIC should
not be able to execute DBMS_JOB.
Rationale:
Audit:
96 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
CIS Controls:
Version 6
Version 7
97 | P a g e
Description:
As described below, Oracle Database PL/SQL "SQL Injection Helper Packages" packages -
DBMS_SQL, DBMS_XMLGEN, DBMS_XMLQUERY, DBMS_XLMSTORE, DBMS_XLMSAVE and DBMS_REDACT –
provide APIs to schedule jobs. The user PUBLIC should not be able to execute these
packages.
• The Oracle database DBMS_SQL package is used for running dynamic SQL statements.
• The DBMS_XMLGEN package takes an arbitrary SQL query as input, converts it to XML
format, and returns the result as a CLOB.
• The Oracle package DBMS_XMLQUERY takes an arbitrary SQL query, converts it to XML
format, and returns the result. This package is similar to DBMS_XMLGEN.
• The DBMS_XLMSTORE package provides XML functionality. It accepts a table name and
XML as input to perform DML operations against the table.
• The DBMS_XLMSAVE package provides XML functionality. It accepts a table name and
XML as input and then inserts into or updates that table.
• The DBMS_REDACT package provides an interface to Oracle Data Redaction, which
enables you to mask (redact) data that is returned from queries issued by low-
privileged users or an application.
Rationale:
As described below, Oracle Database PL/SQL "SQL Injection Helper Packages" packages -
DBMS_SQL, DBMS_XMLGEN, DBMS_XMLQUERY, DBMS_XLMSTORE, DBMS_XLMSAVE and
'DBMS_REDACT' – should not be granted to PUBLIC.
• The DBMS_SQL package could allow privilege escalation if input validation is not done
properly.
• The package DBMS_XMLGEN can be used to search the entire database for sensitive
information like credit card numbers
• The package DBMS_XMLQUERY can be used to search the entire database for sensitive
information like credit card numbers. Malicious users may be able to exploit this
package as an auxiliary inject function in a SQL injection attack.
• Malicious users may be able to exploit the DBMS_XLMSTORE package as an auxiliary
inject function in a SQL injection attack.
98 | P a g e
Audit:
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
99 | P a g e
CIS Controls:
Version 6
Version 7
100 | P a g e
Description:
The packages described in this control are not granted to PUBLIC by default ("Non-default"
packages). These packages should not be granted to PUBLIC.
Rationale:
As described below, these "non-default" group of PL/SQL packages, which are not granted
to PUBLIC by default, packages should not be granted to PUBLIC.
101 | P a g e
Audit:
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
102 | P a g e
CIS Controls:
Version 6
Version 7
103 | P a g e
Description:
The Oracle database SYS.AUD$ table contains all the audit records for the database of the
non-Data Manipulation Language (DML) events, such as ALTER, DROP, and CREATE, and so
forth. (DML changes need trigger-based audit events to record data alterations.)
Unauthorized grantees should not have full access to that table.
Rationale:
Permitting non-privileged users the authorization to manipulate the SYS.AUD$ table can
allow distortion of the audit records, hiding unauthorized activities.
Audit:
104 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/dbseg/administering-the-audit-trail.html
CIS Controls:
Version 6
Version 7
105 | P a g e
Description:
The Oracle database DBA_ views show all information which is relevant to administrative
accounts. Unauthorized grantees should not have full access to those views.
Rationale:
Permitting users the authorization to manipulate the DBA_ views can expose sensitive data.
Audit:
SELECT GRANTEE,TABLE_NAME
FROM DBA_TAB_PRIVS
WHERE TABLE_NAME LIKE 'DBA_%'
AND OWNER = 'SYS'
AND GRANTEE NOT IN (SELECT USERNAME FROM DBA_USERS WHERE
ORACLE_MAINTAINED='Y')
AND GRANTEE NOT IN (SELECT ROLE FROM DBA_ROLES WHERE ORACLE_MAINTAINED='Y');
SELECT GRANTEE,TABLE_NAME,
DECODE (A.CON_ID,0,(SELECT NAME FROM V$DATABASE),
1,(SELECT NAME FROM V$DATABASE),
(SELECT NAME FROM V$PDBS B WHERE A.CON_ID = B.CON_ID))
FROM CDB_TAB_PRIVS A
WHERE TABLE_NAME LIKE 'DBA_%'
AND OWNER = 'SYS'
AND GRANTEE NOT IN (SELECT USERNAME FROM CDB_USERS WHERE
ORACLE_MAINTAINED='Y')
AND GRANTEE NOT IN (SELECT ROLE FROM CDB_ROLES WHERE ORACLE_MAINTAINED='Y');
106 | P a g e
Remediation:
Replace <Non-DBA/SYS grantee> in the query below, with the Oracle login(s) or role(s)
returned from the associated audit procedure and execute, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke:
References:
1. https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/static-
data-dictionary-views.html
CIS Controls:
Version 6
Version 7
107 | P a g e
Description:
The Oracle database tables listed below may contain sensitive information, and should not
be accessible to unauthorized users.
Rationale:
Access to sensitive information such as hashed passwords may allow unauthorized users to
decrypt the passwords hashes which could potentially result in complete compromise of
the database.
Audit:
108 | P a g e
Remediation:
CIS Controls:
Version 6
Version 7
109 | P a g e
Description:
The Oracle database ANY keyword provides the user the capability to alter any item in the
catalog of the database. Unauthorized grantees should not have that keyword assigned to
them.
Rationale:
Authorization to use the ANY expansion of a privilege can allow an unauthorized user to
potentially change confidential data or damage the data catalog.
Audit:
110 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/dbseg/configuring-privilege-and-role-authorization.html
CIS Controls:
Version 6
Version 7
111 | P a g e
Description:
The Oracle database WITH_ADMIN privilege allows the designated user to grant another user
the same privileges. Unauthorized grantees should not have that privilege.
Rationale:
Assignment of the WITH_ADMIN privilege can allow the granting of a restricted privilege to
an unauthorized user.
Audit:
112 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
CIS Controls:
Version 6
Version 7
113 | P a g e
Description:
Rationale:
Audit:
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
114 | P a g e
CIS Controls:
Version 6
Version 7
115 | P a g e
Description:
Rationale:
Audit:
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
116 | P a g e
CIS Controls:
Version 6
Version 7
117 | P a g e
Description:
The Oracle database SELECT ANY DICTIONARY privilege allows the designated user to access
SYS schema objects. Unauthorized grantees should not have that privilege.
Rationale:
Audit:
118 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/dbseg/configuring-privilege-and-role-authorization.html
2. http://arup.blogspot.de/2011/07/difference-between-select-any.html
CIS Controls:
Version 6
Version 7
119 | P a g e
Description:
The Oracle database SELECT ANY TABLE privilege allows the designated user to open any
table, except SYS, to view it. Unauthorized grantees should not have that privilege.
Rationale:
Assignment of the SELECT ANY TABLE privilege can allow the unauthorized viewing of
sensitive data.
Audit:
120 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/dbseg/configuring-privilege-and-role-authorization.html
Additional Information:
CIS Controls:
Version 6
Version 7
121 | P a g e
Description:
The Oracle database AUDIT SYSTEM privilege allows changes to auditing activities on the
system. Unauthorized grantees should not have that privilege.
Rationale:
The AUDIT SYSTEM privilege can allow the unauthorized alteration of system audit
activities, such as disabling the creation of audit trails.
Audit:
122 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/AUDIT-
Traditional-Auditing.html
CIS Controls:
Version 6
Version 7
123 | P a g e
Description:
The Oracle database EXEMPT ACCESS POLICY keyword provides the user the capability to
access all the table rows regardless of row-level security lockouts. Unauthorized grantees
should not have that keyword assigned to them.
Rationale:
The EXEMPT ACCESS POLICY privilege can allow an unauthorized user to potentially access
and change data.
Audit:
124 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/dbseg/configuring-audit-policies.html
CIS Controls:
Version 6
Version 7
125 | P a g e
Description:
The Oracle database BECOME USER privilege allows the designated user to inherit the rights
of another user. Unauthorized grantees should not have that privilege.
Rationale:
The BECOME USER privilege can allow the unauthorized use of another user's privileges, this
capability should be restricted according to the needs of the organization.
Audit:
126 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/dbseg/configuring-audit-policies.html
CIS Controls:
Version 6
Version 7
127 | P a g e
Description:
The Oracle database CREATE PROCEDURE privilege allows the designated user to create a
stored procedure that will fire when given the correct command sequence. Unauthorized
grantees should not have that privilege.
Rationale:
The CREATE PROCEDURE privilege can lead to severe problems in unauthorized hands, such
as rogue procedures facilitating data theft or denial-of-service by corrupting data tables.
Audit:
128 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/dbseg/configuring-audit-policies.html
CIS Controls:
Version 6
Version 7
129 | P a g e
Description:
The Oracle database ALTER SYSTEM privilege allows the designated user to dynamically
alter the instance's running operations. Unauthorized grantees should not have that
privilege.
Rationale:
The ALTER SYSTEM privilege can lead to severe problems, such as the instance's session
being killed or the stopping of redo log recording, which would make transactions
unrecoverable.
Audit:
130 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/dbseg/configuring-audit-policies.html
CIS Controls:
Version 6
Version 7
131 | P a g e
Description:
The Oracle database CREATE ANY LIBRARY privilege allows the designated user to create
objects that are associated to the shared libraries. Unauthorized grantees should not have
that privilege.
Rationale:
The CREATE ANY LIBRARY privilege can allow the creation of numerous library-associated
objects and potentially corrupt the libraries' integrity.
Audit:
132 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/dbseg/configuring-audit-policies.html
Additional Information:
Oracle has two identical privileges: CREATE LIBRARY and CREATE ANY LIBRARY.
CIS Controls:
Version 6
Version 7
133 | P a g e
Description:
The Oracle database CREATE LIBRARY privilege allows the designated user to create objects
that are associated to the shared libraries. Unauthorized grantees should not have that
privilege.
Rationale:
The CREATE LIBRARY privilege can allow the creation of numerous library-associated
objects and potentially corrupt the libraries' integrity.
Audit:
134 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/dbseg/configuring-audit-policies.html
Additional Information:
Oracle has two identical privileges: CREATE LIBRARY and CREATE ANY LIBRARY.
CIS Controls:
Version 6
Version 7
135 | P a g e
Description:
The Oracle database GRANT ANY OBJECT PRIVILEGE keyword provides the grantee the
capability to grant access to any single or multiple combinations of objects to any grantee
in the catalog of the database. Unauthorized grantees should not have that keyword
assigned to them.
Rationale:
The GRANT ANY OBJECT PRIVILEGE capability can allow an unauthorized user to potentially
access or change confidential data, or damage the data catalog due to potential complete
instance access.
Audit:
136 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/dbseg/configuring-privilege-and-role-authorization.html
CIS Controls:
Version 6
Version 7
137 | P a g e
Description:
The Oracle database GRANT ANY ROLE keyword provides the grantee the capability to grant
any single role to any grantee in the catalog of the database. Unauthorized grantees should
not have that keyword assigned to them.
Rationale:
The GRANT ANY ROLE capability can allow an unauthorized user to potentially access or
change confidential data or damage the data catalog due to potential complete instance
access.
Audit:
138 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/dbseg/configuring-privilege-and-role-authorization.html
CIS Controls:
Version 6
Version 7
139 | P a g e
Description:
The Oracle database GRANT ANY PRIVILEGE keyword provides the grantee the capability to
grant any single privilege to any item in the catalog of the database. Unauthorized grantees
should not have that privilege.
Rationale:
The GRANT ANY PRIVILEGE capability can allow an unauthorized user to potentially access
or change confidential data or damage the data catalog due to potential complete instance
access.
Audit:
140 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/dbseg/configuring-privilege-and-role-authorization.html
CIS Controls:
Version 6
Version 7
141 | P a g e
Description:
Rationale:
Permitting unauthorized access to the SELECT_CATALOG_ROLE can allow the disclosure of all
dictionary data.
Audit:
142 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/dbseg/configuring-privilege-and-role-authorization.html
CIS Controls:
Version 6
Version 7
143 | P a g e
Description:
Rationale:
Audit:
144 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/dbseg/configuring-privilege-and-role-authorization.html
CIS Controls:
Version 6
Version 7
145 | P a g e
Description:
The Oracle database DBA role is the default database administrator role provided for the
allocation of administrative privileges. Unauthorized grantees should not have that role.
Rationale:
Assignment of the DBA role to an ordinary user can provide a great number of unnecessary
privileges to that user and open the door to data breaches, integrity violations, and denial-
of-service conditions.
Audit:
146 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this is
granted in both container and pluggable database, you must connect to both places to
revoke.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/dbseg/configuring-privilege-and-role-authorization.html
CIS Controls:
Version 6
Version 7
147 | P a g e
Measures must be taken to protect the audit trail itself, for it may be targeted for alteration
or destruction to hide unauthorized activity. For an audit destination outside the database,
the recommendations are elsewhere in this document. Auditing recommendations for
potential database audit destinations are below.
Auditing "by session" typically creates fewer (until 11g) and slightly smaller audit records,
but is discouraged in most situations since there is some loss of fidelity (e.g. object privilege
GRANTEE). More detailed auditing creates larger audit records. The AUDIT_TRAIL
initialization parameter (for DB|XML, extended - or not) is the main determining factor for
the size of a given audit record - and a notable factor in the performance cost, although the
largest of the latter is DB versus OS or XML.
This section deals with standard Oracle auditing since auditing of privileged connections
(as sysdba or sysoper) is configured via the AUDIT_SYS_OPERATIONS initialization
parameter and is otherwise not configurable. The basic types of standard auditing are
object, statement and privilege auditing, and each behaves differently.
Object auditing applies to specific objects for which it is invoked and always applies to all
users. This type of auditing is usually employed to audit application-specific sensitive
objects, but can also be used to protect the audit trail in the database.
Privilege auditing audits the use of specific system privileges, but typically only if the user
actually possesses the audited privilege. Attempts that fail for lack of the audited privilege
are typically not audited. This is the main weakness of privilege auditing and why
statement auditing is usually preferred, if the option exists.
Statement auditing audits the issuance of certain types of statements, usually without
regard to privilege or lack thereof. Both privilege and statement audits may be specified for
specific users or all users (the default).
148 | P a g e
Description:
The USER object allows for creating accounts that can interact with the database according
to the roles and privileges allotted to the account. It may also own database objects.
Enabling the audit option causes auditing of all activities and requests to create, drop or
alter a user, including a user changing their own password. (The latter is not audited by
audit ALTER USER.)
Rationale:
Any unauthorized attempts to create, drop or alter a user should cause concern, whether
successful or not. Auditing can also be useful in forensics if an account is compromised, and
auditing is mandated by many common security initiatives. An abnormally high number of
these activities in a given period might be worth investigation. Any failed attempt to drop a
user or create a user may be worth further review.
Audit:
SELECT AUDIT_OPTION,SUCCESS,FAILURE
FROM DBA_STMT_AUDIT_OPTS
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
AND FAILURE = 'BY ACCESS'
AND AUDIT_OPTION='USER';
149 | P a g e
SELECT AUDIT_OPTION,SUCCESS,FAILURE,
DECODE (A.CON_ID,
0,(SELECT NAME FROM V$DATABASE),
1,(SELECT NAME FROM V$DATABASE),
(SELECT NAME FROM V$PDBS B WHERE A.CON_ID = B.CON_ID))
FROM CDB_STMT_AUDIT_OPTS A
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
AND FAILURE = 'BY ACCESS'
AND AUDIT_OPTION='USER';
Remediation:
To remediate this setting, execute the following SQL statement in either the non multi-
tenant or container database, it does NOT need run in the pluggable.
AUDIT USER;
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
150 | P a g e
Description:
The ROLE object allows for the creation of a set of privileges that can be granted to users or
other roles. Enabling the audit option causes auditing of all attempts, successful or not, to
create, drop, alter or set roles.
Rationale:
Roles are a key database security infrastructure component. Any attempt to create, drop or
alter a role should be audited. This statement auditing option also audits attempts,
successful or not, to set a role in a session. Any unauthorized attempts to create, drop or
alter a role may be worthy of investigation. Attempts to set a role by users without the role
privilege may warrant investigation.
Audit:
SELECT AUDIT_OPTION,SUCCESS,FAILURE
FROM DBA_STMT_AUDIT_OPTS
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
AND FAILURE = 'BY ACCESS'
AND AUDIT_OPTION='ROLE';
SELECT AUDIT_OPTION,SUCCESS,FAILURE,
DECODE (A.CON_ID,
0,(SELECT NAME FROM V$DATABASE),
1,(SELECT NAME FROM V$DATABASE),
(SELECT NAME FROM V$PDBS B WHERE A.CON_ID = B.CON_ID))
FROM CDB_STMT_AUDIT_OPTS A
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
151 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement in either the non multi-
tenant or container database, it does NOT need run in the pluggable.
AUDIT ROLE;
Additional Information:
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
152 | P a g e
Description:
Enabling the audit option for the SYSTEM GRANT object causes auditing of any attempt,
successful or not, to grant or revoke any system privilege or role, regardless of privilege
held by the user attempting the operation.
Rationale:
Logging of all grant and revokes (roles and system privileges) can provide forensic
evidence about a pattern of suspect/unauthorized activities. Any unauthorized attempt
may be cause for further investigation.
Audit:
SELECT AUDIT_OPTION,SUCCESS,FAILURE
FROM DBA_STMT_AUDIT_OPTS
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
AND FAILURE = 'BY ACCESS'
AND AUDIT_OPTION='SYSTEM GRANT';
SELECT AUDIT_OPTION,SUCCESS,FAILURE,
DECODE (A.CON_ID,
0,(SELECT NAME FROM V$DATABASE),
1,(SELECT NAME FROM V$DATABASE),
(SELECT NAME FROM V$PDBS B WHERE A.CON_ID = B.CON_ID))
FROM CDB_STMT_AUDIT_OPTS A
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
AND FAILURE = 'BY ACCESS'
AND AUDIT_OPTION='SYSTEM GRANT';
153 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement in either the non multi-
tenant or container database, it does NOT need run in the pluggable.
CIS Controls:
Version 6
Version 7
154 | P a g e
Description:
The PROFILE object allows for the creation of a set of database resource limits that can be
assigned to a user, so that that user cannot exceed those resource limitations. Enabling the
audit option causes auditing of all attempts, successful or not, to create, drop or alter any
profile.
Rationale:
As profiles are part of the database security infrastructure, auditing the creation,
modification, and deletion of profiles is recommended.
Audit:
SELECT AUDIT_OPTION,SUCCESS,FAILURE
FROM DBA_STMT_AUDIT_OPTS
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
AND FAILURE = 'BY ACCESS'
AND AUDIT_OPTION='PROFILE';
SELECT AUDIT_OPTION,SUCCESS,FAILURE,
DECODE (A.CON_ID,
0,(SELECT NAME FROM V$DATABASE),
1,(SELECT NAME FROM V$DATABASE),
(SELECT NAME FROM V$PDBS B WHERE A.CON_ID = B.CON_ID))
FROM CDB_STMT_AUDIT_OPTS A
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
AND FAILURE = 'BY ACCESS'
AND AUDIT_OPTION='PROFILE';
155 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement in either the non multi-
tenant or container database, it does NOT need run in the pluggable.
AUDIT PROFILE;
Additional Information:
The statement auditing option audit PROFILE audits everything that the three privilege
audits audit CREATE PROFILE, audit DROP PROFILE and audit ALTER PROFILE do, but also
audits:
1. Attempts to create a profile by a user without the CREATE PROFILE system privilege.
2. Attempts to drop a profile by a user without the DROP PROFILE system privilege
3. Attempts to alter a profile by a user without the ALTER PROFILE system privilege.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
156 | P a g e
Description:
Enabling the audit option for the DATABASE LINK object causes all activities on database
links to be audited.
Rationale:
As the logging of user activities involving the creation or dropping of a DATABASE LINK can
provide forensic evidence about a pattern of unauthorized activities, the audit capability
should be enabled.
Audit:
SELECT AUDIT_OPTION,SUCCESS,FAILURE
FROM DBA_STMT_AUDIT_OPTS
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
AND FAILURE = 'BY ACCESS'
AND AUDIT_OPTION='DATABASE LINK';
SELECT AUDIT_OPTION,SUCCESS,FAILURE,
DECODE (A.CON_ID,
0,(SELECT NAME FROM V$DATABASE),
1,(SELECT NAME FROM V$DATABASE),
(SELECT NAME FROM V$PDBS B WHERE A.CON_ID = B.CON_ID))
FROM CDB_STMT_AUDIT_OPTS A
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
AND FAILURE = 'BY ACCESS'
AND AUDIT_OPTION='DATABASE LINK';
157 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement in either the non multi-
tenant or container database, it does NOT need run in the pluggable.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/dbseg/configuring-audit-policies.html
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
158 | P a g e
Description:
The PUBLIC DATABASE LINK object allows for the creation of a public link for an
application-based "user" to access the database for connections/session creation. Enabling
the audit option causes all user activities involving the creation, alteration, or dropping of
public links to be audited.
Rationale:
As the logging of user activities involving the creation, alteration, or dropping of a PUBLIC
DATABASE LINK can provide forensic evidence about a pattern of unauthorized activities,
the audit capability should be enabled.
Audit:
SELECT AUDIT_OPTION,SUCCESS,FAILURE
FROM DBA_STMT_AUDIT_OPTS
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
AND FAILURE = 'BY ACCESS'
AND AUDIT_OPTION='PUBLIC DATABASE LINK';
SELECT AUDIT_OPTION,SUCCESS,FAILURE,
DECODE (A.CON_ID,
0,(SELECT NAME FROM V$DATABASE),
1,(SELECT NAME FROM V$DATABASE),
(SELECT NAME FROM V$PDBS B WHERE A.CON_ID = B.CON_ID))
FROM CDB_STMT_AUDIT_OPTS A
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
159 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement in either the non multi-
tenant or container database, it does NOT need run in the pluggable.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
160 | P a g e
Description:
The PUBLIC SYNONYM object allows for the creation of an alternate description of an object.
Public synonyms are accessible by all users that have the appropriate privileges to the
underlying object. Enabling the audit option causes all user activities involving the creation
or dropping of public synonyms to be audited.
Rationale:
As the logging of user activities involving the creation or dropping of a PUBLIC SYNONYM can
provide forensic evidence about a pattern of unauthorized activities, the audit capability
should be enabled.
Audit:
SELECT AUDIT_OPTION,SUCCESS,FAILURE
FROM DBA_STMT_AUDIT_OPTS
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
AND FAILURE = 'BY ACCESS'
AND AUDIT_OPTION='PUBLIC SYNONYM';
SELECT AUDIT_OPTION,SUCCESS,FAILURE,
DECODE (A.CON_ID,
0,(SELECT NAME FROM V$DATABASE),
1,(SELECT NAME FROM V$DATABASE),
(SELECT NAME FROM V$PDBS B WHERE A.CON_ID = B.CON_ID))
FROM CDB_STMT_AUDIT_OPTS A
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
161 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement in either the non multi-
tenant or container database, it does NOT need run in the pluggable.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
162 | P a g e
Description:
The SYNONYM operation allows for the creation of an alternative name for a database object
such as a Java class schema object, materialized view, operator, package, procedure,
sequence, stored function, table, view, user-defined object type, or even another synonym.
This synonym puts a dependency on its target and is rendered invalid if the target object is
changed/dropped. Enabling the audit option causes all user activities involving the creation
or dropping of synonyms to be audited.
Rationale:
As the logging of user activities involving the creation or dropping of a SYNONYM can provide
forensic evidence about a pattern of suspect/unauthorized activities, the audit capability
should be enabled.
Audit:
SELECT AUDIT_OPTION,SUCCESS,FAILURE
FROM DBA_STMT_AUDIT_OPTS
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
AND FAILURE = 'BY ACCESS'
AND AUDIT_OPTION='SYNONYM';
SELECT AUDIT_OPTION,SUCCESS,FAILURE,
DECODE (A.CON_ID,
0,(SELECT NAME FROM V$DATABASE),
1,(SELECT NAME FROM V$DATABASE),
(SELECT NAME FROM V$PDBS B WHERE A.CON_ID = B.CON_ID))
FROM CDB_STMT_AUDIT_OPTS A
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
163 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement in either the non multi-
tenant or container database, it does NOT need run in the pluggable.
AUDIT SYNONYM;
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/dbseg/configuring-audit-policies.html
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
164 | P a g e
Description:
The DIRECTORY object allows for the creation of a directory object that specifies an alias for
a directory on the server file system, where the external binary file LOBs (BFILEs)/ table
data are located. Enabling this audit option causes all user activities involving the creation
or dropping of a directory alias to be audited.
Rationale:
As the logging of user activities involving the creation or dropping of a DIRECTORY can
provide forensic evidence about a pattern of unauthorized activities, the audit capability
should be enabled.
Audit:
SELECT AUDIT_OPTION,SUCCESS,FAILURE
FROM DBA_STMT_AUDIT_OPTS
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
AND FAILURE = 'BY ACCESS'
AND AUDIT_OPTION='DIRECTORY';
SELECT AUDIT_OPTION,SUCCESS,FAILURE,
DECODE (A.CON_ID,
0,(SELECT NAME FROM V$DATABASE),
1,(SELECT NAME FROM V$DATABASE),
(SELECT NAME FROM V$PDBS B WHERE A.CON_ID = B.CON_ID))
FROM CDB_STMT_AUDIT_OPTS A
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
AND FAILURE = 'BY ACCESS'
AND AUDIT_OPTION='DIRECTORY';
165 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement in either the non multi-
tenant or container database, it does NOT need run in the pluggable.
AUDIT DIRECTORY;
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/dbseg/configuring-audit-policies.html
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
166 | P a g e
Description:
The SELECT ANY DICTIONARY capability allows the user to view the definitions of all schema
objects in the database. Enabling the audit option causes all user activities involving this
capability to be audited.
Rationale:
As the logging of user activities involving the capability to access the description of all
schema objects in the database can provide forensic evidence about a pattern of
unauthorized activities, the audit capability should be enabled.
Audit:
SELECT AUDIT_OPTION,SUCCESS,FAILURE
FROM DBA_STMT_AUDIT_OPTS
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
AND FAILURE = 'BY ACCESS'
AND AUDIT_OPTION='SELECT ANY DICTIONARY';
SELECT AUDIT_OPTION,SUCCESS,FAILURE,
DECODE (A.CON_ID,
0,(SELECT NAME FROM V$DATABASE),
1,(SELECT NAME FROM V$DATABASE),
(SELECT NAME FROM V$PDBS B WHERE A.CON_ID = B.CON_ID))
FROM CDB_STMT_AUDIT_OPTS A
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
AND FAILURE = 'BY ACCESS'
AND AUDIT_OPTION='SELECT ANY DICTIONARY';
167 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement in either the non multi-
tenant or container database, it does NOT need run in the pluggable.
References:
1. https://docs.oracle.com/en/database/oracle/oracle-
database/19/dbseg/configuring-audit-policies.html
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
168 | P a g e
Description:
GRANT ANY OBJECT PRIVILEGE allows the user to grant or revoke any object privilege,
which includes privileges on tables, directories, mining models, etc. Enabling this audit
option causes auditing of all uses of that privilege.
Rationale:
Logging of privilege grants that can lead to the creation, alteration, or deletion of critical
data, the modification of objects, object privilege propagation and other such activities can
be critical to forensic investigations.
Audit:
SELECT AUDIT_OPTION,SUCCESS,FAILURE
FROM DBA_STMT_AUDIT_OPTS
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
AND FAILURE = 'BY ACCESS'
AND AUDIT_OPTION='GRANT ANY OBJECT PRIVILEGE';
SELECT AUDIT_OPTION,SUCCESS,FAILURE,
DECODE (A.CON_ID,
0,(SELECT NAME FROM V$DATABASE),
1,(SELECT NAME FROM V$DATABASE),
(SELECT NAME FROM V$PDBS B WHERE A.CON_ID = B.CON_ID))
FROM CDB_STMT_AUDIT_OPTS A
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
AND FAILURE = 'BY ACCESS'
AND AUDIT_OPTION='GRANT ANY OBJECT PRIVILEGE';
169 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement, keeping in mind if this
needs to be done in both container and pluggable database, you must connect to both
places to do the audit statement.
Additional Information:
This does NOT audit all attempts to grant or revoke object privileges since this can also be
done by anyone who was granted an object privilege with the grant option. Also, this never
creates an audit record for anyone who does not hold the GRANT ANY OBJECT PRIVILEGE
system privilege. Therefore, many attempts, successful or not, to grant and revoke object
privileges are not audited by this.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
170 | P a g e
Description:
GRANT ANY PRIVILEGE allows a user to grant any system privilege, including the most
powerful privileges typically available only to administrators - to change the security
infrastructure, to drop/add/modify users and more.
Rationale:
Auditing the use of this privilege is part of a comprehensive auditing policy that can help in
detecting issues and can be useful in forensics.
Audit:
SELECT AUDIT_OPTION,SUCCESS,FAILURE
FROM DBA_STMT_AUDIT_OPTS
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
AND FAILURE = 'BY ACCESS'
AND AUDIT_OPTION='GRANT ANY PRIVILEGE';
SELECT AUDIT_OPTION,SUCCESS,FAILURE,
DECODE (A.CON_ID,
0,(SELECT NAME FROM V$DATABASE),
1,(SELECT NAME FROM V$DATABASE),
(SELECT NAME FROM V$PDBS B WHERE A.CON_ID = B.CON_ID))
FROM CDB_STMT_AUDIT_OPTS A
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
AND FAILURE = 'BY ACCESS'
AND AUDIT_OPTION='GRANT ANY PRIVILEGE';
171 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement in either the non multi-
tenant or container database, it does NOT need run in the pluggable.
Additional Information:
This does NOT audit all attempts to grant or revoke system privileges since this can also be
done by anyone who was granted a system privilege with the admin option. Also, this never
creates an audit record for anyone who does not hold the GRANT ANY PRIVILEGE system
privilege. Thus, many attempts, successful or not, to grant and revoke system privileges are
not audited by this.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
172 | P a g e
173 | P a g e
Description:
The AUDIT DROP ANY PROCEDURE command is auditing the dropping of procedures.
Enabling the option causes auditing of all such activities.
Rationale:
Dropping procedures of another user could be part of a privilege escalation exploit and
should be audited.
Audit:
SELECT AUDIT_OPTION,SUCCESS,FAILURE
FROM DBA_STMT_AUDIT_OPTS
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
AND FAILURE = 'BY ACCESS'
AND AUDIT_OPTION='DROP ANY PROCEDURE';
SELECT AUDIT_OPTION,SUCCESS,FAILURE,
DECODE (A.CON_ID,
0,(SELECT NAME FROM V$DATABASE),
1,(SELECT NAME FROM V$DATABASE),
(SELECT NAME FROM V$PDBS B WHERE A.CON_ID = B.CON_ID))
FROM CDB_STMT_AUDIT_OPTS A
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
AND FAILURE = 'BY ACCESS'
AND AUDIT_OPTION='DROP ANY PROCEDURE';
174 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement in either the non multi-
tenant or container database, it does NOT need run in the pluggable.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
175 | P a g e
Description:
The logging of attempts to alter the audit trail in the SYS.AUD$ table (open for
read/update/delete/view) will provide a record of any activities that may indicate
unauthorized attempts to access the audit trail. Enabling the audit option will cause these
activities to be audited.
Rationale:
As the logging of attempts to alter the SYS.AUD$ table can provide forensic evidence of the
initiation of a pattern of unauthorized activities, this logging capability should be enabled.
Audit:
SELECT *
FROM CDB_OBJ_AUDIT_OPTS
WHERE OBJECT_NAME='AUD$'
AND ALT='A/A'
AND AUD='A/A'
AND COM='A/A'
AND DEL='A/A'
AND GRA='A/A'
AND IND='A/A'
AND INS='A/A'
AND LOC='A/A'
AND REN='A/A'
AND SEL='A/A'
AND UPD='A/A'
AND FBK='A/A';
Remediation:
To remediate this setting, execute the following SQL statement in either the non multi-
tenant or container database, it does NOT need run in the pluggable.
176 | P a g e
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
177 | P a g e
Description:
In this statement audit, PROCEDURE means any procedure, function, package or library.
Enabling this audit option causes any attempt, successful or not, to create or drop any of
these types of objects to be audited, regardless of privilege or lack thereof. Java schema
objects (sources, classes, and resources) are considered the same as procedures for the
purposes of auditing SQL statements.
Rationale:
Any unauthorized attempts to create or drop a procedure in another's schema should cause
concern, whether successful or not. Changes to critical stored code can dramatically change
the behavior of the application and produce serious security consequences, including
enabling privilege escalation and introducing SQL injection vulnerabilities. Audit records of
such changes can be helpful in forensics.
Audit:
SELECT AUDIT_OPTION,SUCCESS,FAILURE
FROM DBA_STMT_AUDIT_OPTS
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
AND FAILURE = 'BY ACCESS'
AND AUDIT_OPTION='PROCEDURE';
SELECT AUDIT_OPTION,SUCCESS,FAILURE,
DECODE (A.CON_ID,
0,(SELECT NAME FROM V$DATABASE),
1,(SELECT NAME FROM V$DATABASE),
(SELECT NAME FROM V$PDBS B WHERE A.CON_ID = B.CON_ID))
FROM CDB_STMT_AUDIT_OPTS A
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
178 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement in either the non multi-
tenant or container database, it does NOT need run in the pluggable.
AUDIT PROCEDURE;
Additional Information:
Not all auditing options work alike. In particular, the statement auditing option audit
PROCEDURE does indeed audit create and drop library as well as all types of procedures and
java schema objects. However, privilege audits do not work this way. So, for example, none
of audit CREATE ANY PROCEDURE, audit DROP ANY PROCEDURE, or audit CREATE
PROCEDURE will audit create or drop library activities. In statement auditing, PROCEDURE has
a larger scope than in privilege auditing, where it is specific to functions, packages and
procedures, but excludes libraries and perhaps other object types.
Audit PROCEDURE does not audit altering procedures, either in your own schema or in
another via the ALTER ANY PROCEDURE system privilege. There seems to be no statement
audit that is a better replacement for Audit ALTER ANY PROCEDURE, but beware that will
not create any audit records for users that do not have the privilege. Thus, attempts to alter
procedures in one's own schema are never audited, and attempts to alter procedures in
another's schema that fail for lack of the ALTER ANY PROCEDURE privilege are not audited.
This is simply a weakness in the current state of Oracle auditing. Fortunately, though, all
that the ALTER command can be used for regarding procedures, functions, packages and
libraries is compile options, so the inability to comprehensively audit alter procedure
activities and requests is not as bad as it would be for other object types (USER, PROFILE,
etc.)
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
179 | P a g e
Version 7
180 | P a g e
Description:
ALTER SYSTEM allows one to change instance settings, including security settings and
auditing options. Additionally, ALTER SYSTEM can be used to run operating system
commands using undocumented Oracle functionality. Enabling the audit option will audit
all attempts to perform ALTER SYSTEM, whether successful or not and regardless of whether
or not the ALTER SYSTEM privilege is held by the user attempting the action.
Rationale:
Any unauthorized attempt to alter the system should be cause for concern. Alterations
outside of some specified maintenance window may be of concern. In forensics, these audit
records could be quite useful.
Audit:
SELECT AUDIT_OPTION,SUCCESS,FAILURE
FROM DBA_STMT_AUDIT_OPTS
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
AND FAILURE = 'BY ACCESS'
AND AUDIT_OPTION='ALTER SYSTEM';
SELECT AUDIT_OPTION,SUCCESS,FAILURE,
DECODE (A.CON_ID,
0,(SELECT NAME FROM V$DATABASE),
1,(SELECT NAME FROM V$DATABASE),
(SELECT NAME FROM V$PDBS B WHERE A.CON_ID = B.CON_ID))
FROM CDB_STMT_AUDIT_OPTS A
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
181 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement in either the non multi-
tenant or container database, it does NOT need run in the pluggable.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
182 | P a g e
Description:
A TRIGGER may be used to modify DML actions or invoke other (recursive) actions when
some types of user-initiated actions occur. Enabling this audit option will cause auditing of
any attempt, successful or not, to create, drop, enable or disable any schema trigger in any
schema regardless of privilege or lack thereof. For enabling and disabling a trigger, it
covers both ALTER TRIGGER and ALTER TABLE.
Rationale:
Triggers are often part of schema security, data validation and other critical constraints
upon actions and data. A trigger in another schema may be used to escalate privileges,
redirect operations, transform data and perform other sorts of perhaps undesired actions.
Any unauthorized attempt to create, drop or alter a trigger in another schema may be cause
for investigation.
Audit:
SELECT AUDIT_OPTION,SUCCESS,FAILURE
FROM DBA_STMT_AUDIT_OPTS
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
AND FAILURE = 'BY ACCESS'
AND AUDIT_OPTION='TRIGGER';
SELECT AUDIT_OPTION,SUCCESS,FAILURE,
DECODE (A.CON_ID,
0,(SELECT NAME FROM V$DATABASE),
1,(SELECT NAME FROM V$DATABASE),
(SELECT NAME FROM V$PDBS B WHERE A.CON_ID = B.CON_ID))
FROM CDB_STMT_AUDIT_OPTS A
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
183 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement in either the non multi-
tenant or container database, it does NOT need run in the pluggable.
AUDIT TRIGGER;
Additional Information:
There is no current CIS recommendation to audit the use of the system privilege CREATE
TRIGGER, as there is for CREATE SYNONYM, CREATE PROCEDURE and some other types of
objects, so this is actually a scope escalation also - to audit such actions in one's own
schema. However, this is the only way to comprehensively audit things like attempts to
create, drop or alter triggers in another's schema if the user attempting to operation does
not hold the required ANY privilege - and these are exactly the sorts of things that should
raise a large red flag.
The statement auditing option audit TRIGGER audits almost everything that the three
privilege audits audit CREATE ANY TRIGGER, audit ALTER ANY TRIGGER and audit DROP
ANY TRIGGER do, but also audits:
1. Statements to create, drop, enable or disable a trigger in the user's own schema.
2. Attempts to create a trigger by a user without the CREATE TRIGGER system privilege.
3. Attempts to create a trigger in another schema by users without the CREATE ANY
TRIGGER privilege.
4. Attempts to drop a trigger in another schema by users without the DROP ANY
TRIGGER privilege.
5. Attempts to disable or enable a trigger in another schema by users without the
ALTER ANY TRIGGER privilege.
The one thing is audited by any of the three privilege audits that is not audited by this is
ALTER TRIGGER ...COMPILE if the trigger is in another's schema, which is audited by audit
ALTER ANY TRIGGER, but only if the user attempting the alteration actually holds the ALTER
ANY TRIGGER system privilege. Audit TRIGGER only audits ALTER TABLE or ALTER TRIGGER
statements used to enable or disable triggers. It does not audit ALTER TRIGGER or ALTER
TABLE statements used only with compile options.
CIS Controls:
184 | P a g e
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
185 | P a g e
Description:
Enabling this audit option will cause auditing of all attempts to connect to the database,
whether successful or not, as well as audit session disconnects/logoffs. The commands to
audit SESSION, CONNECT or CREATE SESSION all accomplish the same thing - they initiate
statement auditing of the connect statement used to create a database session.
Rationale:
Auditing attempts to connect to the database is basic and mandated by most security
initiatives. Any attempt to logon to a locked account, failed attempts to logon to default
accounts or an unusually high number of failed logon attempts of any sort, for any user, in a
particular time period may indicate an intrusion attempt. In forensics, the logon record
may be first in a chain of evidence and contain information found in no other type of audit
record for the session. Logon and logoff in the audit trail define the period and duration of
the session.
Audit:
SELECT AUDIT_OPTION,SUCCESS,FAILURE
FROM DBA_STMT_AUDIT_OPTS
WHERE USER_NAME IS NULL
AND PROXY_NAME IS NULL
AND SUCCESS = 'BY ACCESS'
AND FAILURE = 'BY ACCESS'
AND AUDIT_OPTION='CREATE SESSION';
SELECT AUDIT_OPTION,SUCCESS,FAILURE,
DECODE (A.CON_ID,
0,(SELECT NAME FROM V$DATABASE),
1,(SELECT NAME FROM V$DATABASE),
186 | P a g e
Remediation:
To remediate this setting, execute the following SQL statement in either the non multi-
tenant or container database, it does NOT need run in the pluggable.
AUDIT SESSION;
Additional Information:
Although listed in the documentation as a privilege audit, audit CREATE SESSION actually
audits the CONNECT statement. This is evidenced by the undocumented audit CONNECT
which has the same result as audit SESSION or audit CREATE SESSION. There is no system
privilege named either SESSION or CONNECT (CONNECT is a role, not a system privilege). Also,
it behaves as statement auditing rather than privilege auditing in that it audits all attempts
to create a session, even if the user does not hold the CREATE SESSION system privilege.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
187 | P a g e
Description:
The CREATE USER statement is used to create Oracle database accounts and assign database
properties to them. Enabling this unified action audit causes logging of all CREATE USER
statements, whether successful or unsuccessful, issued by the users regardless of the
privileges held by the users to issue such statements.
Rationale:
Logging and monitoring of all attempts to create user accounts, whether successful or
unsuccessful, may provide clues and forensic evidences about potential
suspicious/unauthorized activities. Any such activities may be a cause for further
investigation. In addition, organization security policies and industry/government
regulations may require logging of all activities involving CREATE USER.
Audit:
WITH
CIS_AUDIT(AUDIT_OPTION) AS
(
SELECT * FROM TABLE( DBMSOUTPUT_LINESARRAY('CREATE USER' ) )
),
AUDIT_ENABLED AS
( SELECT DISTINCT AUDIT_OPTION
FROM AUDIT_UNIFIED_POLICIES AUD
WHERE AUD.AUDIT_OPTION IN ('CREATE USER' )
AND AUD.AUDIT_OPTION_TYPE = 'STANDARD ACTION'
AND EXISTS (SELECT *
FROM AUDIT_UNIFIED_ENABLED_POLICIES ENABLED
WHERE ENABLED.SUCCESS = 'YES'
AND ENABLED.FAILURE = 'YES'
AND ENABLED.ENABLED_OPTION = 'BY USER'
AND ENABLED.ENTITY_NAME = 'ALL USERS'
AND ENABLED.POLICY_NAME = AUD.POLICY_NAME)
)
SELECT C.AUDIT_OPTION
188 | P a g e
FROM CIS_AUDIT C
LEFT JOIN AUDIT_ENABLED E
ON C.AUDIT_OPTION = E.AUDIT_OPTION
WHERE E.AUDIT_OPTION IS NULL ;
Remediation:
Note: If you do not have CIS_UNIFIED_AUDIT_POLICY, please create one using the CREATE
AUDIT POLICY statement.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
189 | P a g e
Description:
The ALTER USER statement is used to change database users’ password, lock accounts, and
expire passwords. In addition, this statement is used to change database properties of user
accounts such as database profiles, default and temporary tablespaces, and tablespace
quotas. This unified audit action enables logging of all ALTER USER statements, whether
successful or unsuccessful, issued by the users regardless of the privileges held by the users
to issue such statements.
Rationale:
Logging and monitoring of all attempts to alter user accounts, whether successful or
unsuccessful, may provide clues and forensic evidences about potential
suspicious/unauthorized activities. Any such activities may be a cause for further
investigation. In addition, organization security policies and industry/government
regulations may require logging of all activities involving ALTER USER.
Audit:
WITH
CIS_AUDIT(AUDIT_OPTION) AS
(
SELECT * FROM TABLE( DBMSOUTPUT_LINESARRAY('ALTER USER' ) )
),
AUDIT_ENABLED AS
( SELECT DISTINCT AUDIT_OPTION
FROM AUDIT_UNIFIED_POLICIES AUD
WHERE AUD.AUDIT_OPTION IN ('ALTER USER' )
AND AUD.AUDIT_OPTION_TYPE = 'STANDARD ACTION'
AND EXISTS (SELECT *
FROM AUDIT_UNIFIED_ENABLED_POLICIES ENABLED
WHERE ENABLED.SUCCESS = 'YES'
AND ENABLED.FAILURE = 'YES'
AND ENABLED.ENABLED_OPTION = 'BY USER'
AND ENABLED.ENTITY_NAME = 'ALL USERS'
AND ENABLED.POLICY_NAME = AUD.POLICY_NAME)
)
SELECT C.AUDIT_OPTION
FROM CIS_AUDIT C
LEFT JOIN AUDIT_ENABLED E
190 | P a g e
ON C.AUDIT_OPTION = E.AUDIT_OPTION
WHERE E.AUDIT_OPTION IS NULL;
Remediation:
Note: If you do not have CIS_UNIFIED_AUDIT_POLICY, please create one using the CREATE
AUDIT POLICY statement.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
191 | P a g e
Description:
The DROP USER statement is used to drop Oracle database accounts and schemas associated
with them. Enabling this unified action audit enables logging of all DROP USER statements,
whether successful or unsuccessful, issued by the users regardless of the privileges held by
the users to issue such statements.
Rationale:
Logging and monitoring of all attempts to drop user, whether successful or unsuccessful,
may provide clues and forensic evidence about potential suspicious/unauthorized
activities. Any such activities may be a cause for further investigation. In addition,
organization security policies and industry/government regulations may require logging of
all activities involving DROP USER.
Audit:
WITH
CIS_AUDIT(AUDIT_OPTION) AS
(
SELECT * FROM TABLE( DBMSOUTPUT_LINESARRAY('DROP USER' ) )
),
AUDIT_ENABLED AS
( SELECT DISTINCT AUDIT_OPTION
FROM AUDIT_UNIFIED_POLICIES AUD
WHERE AUD.AUDIT_OPTION IN ('DROP USER' )
AND AUD.AUDIT_OPTION_TYPE = 'STANDARD ACTION'
AND EXISTS (SELECT *
FROM AUDIT_UNIFIED_ENABLED_POLICIES ENABLED
WHERE ENABLED.SUCCESS = 'YES'
AND ENABLED.FAILURE = 'YES'
AND ENABLED.ENABLED_OPTION = 'BY USER'
AND ENABLED.ENTITY_NAME = 'ALL USERS'
AND ENABLED.POLICY_NAME = AUD.POLICY_NAME)
)
SELECT C.AUDIT_OPTION
FROM CIS_AUDIT C
LEFT JOIN AUDIT_ENABLED E
ON C.AUDIT_OPTION = E.AUDIT_OPTION
WHERE E.AUDIT_OPTION IS NULL;
192 | P a g e
Remediation:
Note: If you do not have CIS_UNIFIED_AUDIT_POLICY, please create one using the CREATE
AUDIT POLICY statement.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
193 | P a g e
Description:
An Oracle database role is a collection or set of privileges that can be granted to users or
other roles. Roles may include system privileges, object privileges or other roles. Enabling
this unified audit action enables logging of all CREATE ROLE statements, whether successful
or unsuccessful, issued by the users regardless of the privileges held by the users to issue
such statements.
Rationale:
Logging and monitoring of all attempts to create roles, whether successful or unsuccessful,
may provide clues and forensic evidence about potential suspicious/unauthorized
activities. Any such activities may be a cause for further investigation. In addition,
organization security policies and industry/government regulations may require logging of
all user activities involving CREATE ROLE.
Audit:
WITH
CIS_AUDIT(AUDIT_OPTION) AS
(
SELECT * FROM TABLE( DBMSOUTPUT_LINESARRAY('CREATE ROLE' ) )
),
AUDIT_ENABLED AS
( SELECT DISTINCT AUDIT_OPTION
FROM AUDIT_UNIFIED_POLICIES AUD
WHERE AUD.AUDIT_OPTION IN ('CREATE ROLE' )
AND AUD.AUDIT_OPTION_TYPE = 'STANDARD ACTION'
AND EXISTS (SELECT *
FROM AUDIT_UNIFIED_ENABLED_POLICIES ENABLED
WHERE ENABLED.SUCCESS = 'YES'
AND ENABLED.FAILURE = 'YES'
AND ENABLED.ENABLED_OPTION = 'BY USER'
AND ENABLED.ENTITY_NAME = 'ALL USERS'
AND ENABLED.POLICY_NAME = AUD.POLICY_NAME)
)
SELECT C.AUDIT_OPTION
FROM CIS_AUDIT C
LEFT JOIN AUDIT_ENABLED E
ON C.AUDIT_OPTION = E.AUDIT_OPTION
WHERE E.AUDIT_OPTION IS NULL;
194 | P a g e
Remediation:
Note: If you do not have CIS_UNIFIED_AUDIT_POLICY, please create one using the CREATE
AUDIT POLICY statement.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
195 | P a g e
Description:
An Oracle database role is a collection or set of privileges that can be granted to users or
other roles. Roles may include system privileges, object privileges or other roles. The ALTER
ROLE statement is used to change the authorization needed to enable a role. Enabling this
unified action audit causes logging of all ALTER ROLE statements, whether successful or
unsuccessful, issued by the users regardless of the privileges held by the users to issue such
statements.
Rationale:
Logging and monitoring of all attempts to alter roles, whether successful or unsuccessful,
may provide clues and forensic evidence about potential suspicious/unauthorized
activities. Any such activities may be a cause for further investigation. In addition,
organization security policies and industry/government regulations may require logging of
all user activities involving alteration of roles.
Audit:
WITH
CIS_AUDIT(AUDIT_OPTION) AS
(
SELECT * FROM TABLE( DBMSOUTPUT_LINESARRAY('ALTER ROLE' ) )
),
AUDIT_ENABLED AS
( SELECT DISTINCT AUDIT_OPTION
FROM AUDIT_UNIFIED_POLICIES AUD
WHERE AUD.AUDIT_OPTION IN ('ALTER ROLE' )
AND AUD.AUDIT_OPTION_TYPE = 'STANDARD ACTION'
AND EXISTS (SELECT *
FROM AUDIT_UNIFIED_ENABLED_POLICIES ENABLED
WHERE ENABLED.SUCCESS = 'YES'
AND ENABLED.FAILURE = 'YES'
AND ENABLED.ENABLED_OPTION = 'BY USER'
AND ENABLED.ENTITY_NAME = 'ALL USERS'
AND ENABLED.POLICY_NAME = AUD.POLICY_NAME)
)
SELECT C.AUDIT_OPTION
FROM CIS_AUDIT C
LEFT JOIN AUDIT_ENABLED E
196 | P a g e
ON C.AUDIT_OPTION = E.AUDIT_OPTION
WHERE E.AUDIT_OPTION IS NULL;
Remediation:
Note: If you do not have CIS_UNIFIED_AUDIT_POLICY, please create one using the CREATE
AUDIT POLICY statement.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
197 | P a g e
Description:
An Oracle database role is a collection or set of privileges that can be granted to users or
other roles. Roles may include system privileges, object privileges or other roles. Enabling
this unified audit action enables logging of all DROP ROLE statements, successful or
unsuccessful, issued by the users regardless of the privileges held by the users to issue such
statements.
Rationale:
Logging and monitoring of all attempts to drop roles, whether successful or unsuccessful,
may provide clues and forensic evidence about potential suspicious/unauthorized
activities. Any such activities may be a cause for further investigation. In addition,
organization security policies and industry/government regulations may require logging of
all user activities involving DROP ROLE.
Audit:
WITH
CIS_AUDIT(AUDIT_OPTION) AS
(
SELECT * FROM TABLE( DBMSOUTPUT_LINESARRAY('DROP ROLE' ) )
),
AUDIT_ENABLED AS
( SELECT DISTINCT AUDIT_OPTION
FROM AUDIT_UNIFIED_POLICIES AUD
WHERE AUD.AUDIT_OPTION IN ('DROP ROLE' )
AND AUD.AUDIT_OPTION_TYPE = 'STANDARD ACTION'
AND EXISTS (SELECT *
FROM AUDIT_UNIFIED_ENABLED_POLICIES ENABLED
WHERE ENABLED.SUCCESS = 'YES'
AND ENABLED.FAILURE = 'YES'
AND ENABLED.ENABLED_OPTION = 'BY USER'
AND ENABLED.ENTITY_NAME = 'ALL USERS'
AND ENABLED.POLICY_NAME = AUD.POLICY_NAME)
)
SELECT C.AUDIT_OPTION
FROM CIS_AUDIT C
LEFT JOIN AUDIT_ENABLED E
ON C.AUDIT_OPTION = E.AUDIT_OPTION
WHERE E.AUDIT_OPTION IS NULL;
198 | P a g e
Remediation:
Note: If you do not have CIS_UNIFIED_AUDIT_POLICY, please create one using the CREATE
AUDIT POLICY statement.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
199 | P a g e
Description:
GRANT statements are used to grant privileges to Oracle database users and roles, including
the most powerful privileges and roles typically available to the database administrators.
Enabling this unified action audit enables logging of all GRANT statements, whether
successful or unsuccessful, issued by the users regardless of the privileges held by the users
to issue such statements.
Rationale:
With unauthorized grants and permissions, a malicious user may be able to change the
security of the database, access/update confidential data, or compromise the integrity of
the database. Logging and monitoring of all attempts to grant system privileges, object
privileges or roles, whether successful or unsuccessful, may provide forensic evidence
about potential suspicious/unauthorized activities as well as privilege escalation activities.
Any such activities may be a cause for further investigation. In addition, organization
security policies and industry/government regulations may require logging of all user
activities involving GRANT.
Audit:
WITH
CIS_AUDIT(AUDIT_OPTION) AS
(
SELECT * FROM TABLE( DBMSOUTPUT_LINESARRAY('GRANT' ) )
),
AUDIT_ENABLED AS
( SELECT DISTINCT AUDIT_OPTION
FROM AUDIT_UNIFIED_POLICIES AUD
WHERE AUD.AUDIT_OPTION IN ('GRANT' )
AND AUD.AUDIT_OPTION_TYPE = 'STANDARD ACTION'
AND EXISTS (SELECT *
FROM AUDIT_UNIFIED_ENABLED_POLICIES ENABLED
WHERE ENABLED.SUCCESS = 'YES'
AND ENABLED.FAILURE = 'YES'
AND ENABLED.ENABLED_OPTION = 'BY USER'
AND ENABLED.ENTITY_NAME = 'ALL USERS'
AND ENABLED.POLICY_NAME = AUD.POLICY_NAME)
)
SELECT C.AUDIT_OPTION
200 | P a g e
FROM CIS_AUDIT C
LEFT JOIN AUDIT_ENABLED E
ON C.AUDIT_OPTION = E.AUDIT_OPTION
WHERE E.AUDIT_OPTION IS NULL;
Remediation:
Note: If you do not have CIS_UNIFIED_AUDIT_POLICY, please create one using the CREATE
AUDIT POLICY statement.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
201 | P a g e
Description:
REVOKE statements are used to revoke privileges from Oracle database users and roles.
Enabling this unified action audit enables logging of all REVOKE statements, successful or
unsuccessful, issued by the users regardless of the privileges held by the users to issue such
statements.
Rationale:
Logging and monitoring of all attempts to revoke system privileges, object privileges or
roles, whether successful or unsuccessful, may provide clues and forensic evidence about
potential suspicious/unauthorized activities. Any such activities may be a cause for further
investigation. In addition, organization security policies and industry/government
regulations may require logging of all user activities involving REVOKE.
Audit:
WITH
CIS_AUDIT(AUDIT_OPTION) AS
(
SELECT * FROM TABLE( DBMSOUTPUT_LINESARRAY('REVOKE' ) )
),
AUDIT_ENABLED AS
( SELECT DISTINCT AUDIT_OPTION
FROM AUDIT_UNIFIED_POLICIES AUD
WHERE AUD.AUDIT_OPTION IN ('REVOKE' )
AND AUD.AUDIT_OPTION_TYPE = 'STANDARD ACTION'
AND EXISTS (SELECT *
FROM AUDIT_UNIFIED_ENABLED_POLICIES ENABLED
WHERE ENABLED.SUCCESS = 'YES'
AND ENABLED.FAILURE = 'YES'
AND ENABLED.ENABLED_OPTION = 'BY USER'
AND ENABLED.ENTITY_NAME = 'ALL USERS'
AND ENABLED.POLICY_NAME = AUD.POLICY_NAME)
)
SELECT C.AUDIT_OPTION
FROM CIS_AUDIT C
LEFT JOIN AUDIT_ENABLED E
ON C.AUDIT_OPTION = E.AUDIT_OPTION
WHERE E.AUDIT_OPTION IS NULL;
202 | P a g e
Remediation:
Note: If you do not have CIS_UNIFIED_AUDIT_POLICY, please create one using the CREATE
AUDIT POLICY statement.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
203 | P a g e
Description:
Oracle database profiles are used to enforce resource usage limits and implement
password policies such as password complexity rules and reuse restrictions. Enabling this
unified action audit enables logging of all CREATE PROFILE statements, whether successful
or unsuccessful, issued by the users regardless of the privileges held by the users to issue
such statements.
Rationale:
Audit:
WITH
CIS_AUDIT(AUDIT_OPTION) AS
(
SELECT * FROM TABLE( DBMSOUTPUT_LINESARRAY('CREATE PROFILE' ) )
),
AUDIT_ENABLED AS
( SELECT DISTINCT AUDIT_OPTION
FROM AUDIT_UNIFIED_POLICIES AUD
WHERE AUD.AUDIT_OPTION IN ('CREATE PROFILE')
AND AUD.AUDIT_OPTION_TYPE = 'STANDARD ACTION'
AND EXISTS (SELECT *
FROM AUDIT_UNIFIED_ENABLED_POLICIES ENABLED
WHERE ENABLED.SUCCESS = 'YES'
AND ENABLED.FAILURE = 'YES'
AND ENABLED.ENABLED_OPTION = 'BY USER'
AND ENABLED.ENTITY_NAME = 'ALL USERS'
AND ENABLED.POLICY_NAME = AUD.POLICY_NAME)
)
SELECT C.AUDIT_OPTION
FROM CIS_AUDIT C
LEFT JOIN AUDIT_ENABLED E
ON C.AUDIT_OPTION = E.AUDIT_OPTION
WHERE E.AUDIT_OPTION IS NULL;
204 | P a g e
Remediation:
Note: If you do not have CIS_UNIFIED_AUDIT_POLICY, please create one using the CREATE
AUDIT POLICY statement.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
205 | P a g e
Description:
Oracle database profiles are used to enforce resource usage limits and implement
password policies such as password complexity rules and reuse restrictions. Enabling this
unified action audit enables logging of all ALTER PROFILE statements, whether successful or
unsuccessful, issued by the users regardless of the privileges held by the users to issue such
statements.
Rationale:
Logging and monitoring of all attempts to alter profiles, whether successful or unsuccessful,
may provide forensic evidence about potential suspicious/unauthorized activities. Any
such activities may be a cause for further investigation. In addition, organization security
policies and industry/government regulations may require logging of all user activities
involving alteration of database profiles.
Audit:
WITH
CIS_AUDIT(AUDIT_OPTION) AS
(
SELECT * FROM TABLE( DBMSOUTPUT_LINESARRAY('ALTER PROFILE' ) )
),
AUDIT_ENABLED AS
( SELECT DISTINCT AUDIT_OPTION
FROM AUDIT_UNIFIED_POLICIES AUD
WHERE AUD.AUDIT_OPTION IN ('ALTER PROFILE' )
AND AUD.AUDIT_OPTION_TYPE = 'STANDARD ACTION'
AND EXISTS (SELECT *
FROM AUDIT_UNIFIED_ENABLED_POLICIES ENABLED
WHERE ENABLED.SUCCESS = 'YES'
AND ENABLED.FAILURE = 'YES'
AND ENABLED.ENABLED_OPTION = 'BY USER'
AND ENABLED.ENTITY_NAME = 'ALL USERS'
AND ENABLED.POLICY_NAME = AUD.POLICY_NAME)
)
SELECT C.AUDIT_OPTION
FROM CIS_AUDIT C
LEFT JOIN AUDIT_ENABLED E
ON C.AUDIT_OPTION = E.AUDIT_OPTION
WHERE E.AUDIT_OPTION IS NULL;
206 | P a g e
Remediation:
Note: If you do not have CIS_UNIFIED_AUDIT_POLICY, please create one using the CREATE
AUDIT POLICY statement.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
207 | P a g e
Description:
Oracle database profiles are used to enforce resource usage limits and implement
password policies such as password complexity rules and reuse restrictions. Enabling this
unified action audit enables logging of all DROP PROFILE statements, whether successful or
unsuccessful, issued by the users regardless of the privileges held by the users to issue such
statements.
Rationale:
Audit:
WITH
CIS_AUDIT(AUDIT_OPTION) AS
(
SELECT * FROM TABLE( DBMSOUTPUT_LINESARRAY('DROP PROFILE' ) )
),
AUDIT_ENABLED AS
( SELECT DISTINCT AUDIT_OPTION
FROM AUDIT_UNIFIED_POLICIES AUD
WHERE AUD.AUDIT_OPTION IN ('DROP PROFILE' )
AND AUD.AUDIT_OPTION_TYPE = 'STANDARD ACTION'
AND EXISTS (SELECT *
FROM AUDIT_UNIFIED_ENABLED_POLICIES ENABLED
WHERE ENABLED.SUCCESS = 'YES'
AND ENABLED.FAILURE = 'YES'
AND ENABLED.ENABLED_OPTION = 'BY USER'
AND ENABLED.ENTITY_NAME = 'ALL USERS'
AND ENABLED.POLICY_NAME = AUD.POLICY_NAME)
)
SELECT C.AUDIT_OPTION
FROM CIS_AUDIT C
LEFT JOIN AUDIT_ENABLED E
ON C.AUDIT_OPTION = E.AUDIT_OPTION
WHERE E.AUDIT_OPTION IS NULL;
208 | P a g e
Remediation:
Note: If you do not have CIS_UNIFIED_AUDIT_POLICY, please create one using the CREATE
AUDIT POLICY statement.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
209 | P a g e
Description:
Rationale:
Logging and monitoring of all attempts to create database links, whether successful or
unsuccessful, may provide forensic evidence about potential suspicious/unauthorized
activities. Any such activities may be a cause for further investigation. In addition,
organization security policies and industry/government regulations may require logging of
all user activities involving creation of database links.
Audit:
WITH
CIS_AUDIT(AUDIT_OPTION) AS
(
SELECT * FROM TABLE( DBMSOUTPUT_LINESARRAY('CREATE DATABASE LINK' ) )
),
AUDIT_ENABLED AS
( SELECT DISTINCT AUDIT_OPTION
FROM AUDIT_UNIFIED_POLICIES AUD
WHERE AUD.AUDIT_OPTION IN ('CREATE DATABASE LINK' )
AND AUD.AUDIT_OPTION_TYPE = 'STANDARD ACTION'
AND EXISTS (SELECT *
FROM AUDIT_UNIFIED_ENABLED_POLICIES ENABLED
WHERE ENABLED.SUCCESS = 'YES'
AND ENABLED.FAILURE = 'YES'
AND ENABLED.ENABLED_OPTION = 'BY USER'
AND ENABLED.ENTITY_NAME = 'ALL USERS'
AND ENABLED.POLICY_NAME = AUD.POLICY_NAME)
)
SELECT C.AUDIT_OPTION
FROM CIS_AUDIT C
LEFT JOIN AUDIT_ENABLED E
210 | P a g e
ON C.AUDIT_OPTION = E.AUDIT_OPTION
WHERE E.AUDIT_OPTION IS NULL;
Remediation:
Note: If you do not have CIS_UNIFIED_AUDIT_POLICY, please create one using the CREATE
AUDIT POLICY statement.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
211 | P a g e
Description:
Rationale:
Logging and monitoring of all attempts to alter database links, whether successful or
unsuccessful, may provide forensic evidence about potential suspicious/unauthorized
activities. Any such activities may be a cause for further investigation. In addition,
organization security policies and industry/government regulations may require logging of
all user activities involving alteration of database links.
Audit:
WITH
CIS_AUDIT(AUDIT_OPTION) AS
(
SELECT * FROM TABLE( DBMSOUTPUT_LINESARRAY('ALTER DATABASE LINK' ) )
),
AUDIT_ENABLED AS
( SELECT DISTINCT AUDIT_OPTION
FROM AUDIT_UNIFIED_POLICIES AUD
WHERE AUD.AUDIT_OPTION IN ('ALTER DATABASE LINK' )
AND AUD.AUDIT_OPTION_TYPE = 'STANDARD ACTION'
AND EXISTS (SELECT *
FROM AUDIT_UNIFIED_ENABLED_POLICIES ENABLED
WHERE ENABLED.SUCCESS = 'YES'
AND ENABLED.FAILURE = 'YES'
AND ENABLED.ENABLED_OPTION = 'BY USER'
AND ENABLED.ENTITY_NAME = 'ALL USERS'
AND ENABLED.POLICY_NAME = AUD.POLICY_NAME)
)
SELECT C.AUDIT_OPTION
FROM CIS_AUDIT C
LEFT JOIN AUDIT_ENABLED E
212 | P a g e
ON C.AUDIT_OPTION = E.AUDIT_OPTION
WHERE E.AUDIT_OPTION IS NULL;
Remediation:
Note: If you do not have CIS_UNIFIED_AUDIT_POLICY, please create one using the CREATE
AUDIT POLICY statement.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
213 | P a g e
Description:
Rationale:
Logging and monitoring of all attempts to drop database links, whether successful or
unsuccessful, may provide forensic evidence about potential suspicious/unauthorized
activities. Any such activities may be a cause for further investigation. In addition,
organization security policies and industry/government regulations may require logging of
all user activities involving dropping database links.
Audit:
WITH
CIS_AUDIT(AUDIT_OPTION) AS
(
SELECT * FROM TABLE( DBMSOUTPUT_LINESARRAY('DROP DATABASE LINK' ) )
),
AUDIT_ENABLED AS
( SELECT DISTINCT AUDIT_OPTION
FROM AUDIT_UNIFIED_POLICIES AUD
WHERE AUD.AUDIT_OPTION IN ('DROP DATABASE LINK' )
AND AUD.AUDIT_OPTION_TYPE = 'STANDARD ACTION'
AND EXISTS (SELECT *
FROM AUDIT_UNIFIED_ENABLED_POLICIES ENABLED
WHERE ENABLED.SUCCESS = 'YES'
AND ENABLED.FAILURE = 'YES'
AND ENABLED.ENABLED_OPTION = 'BY USER'
AND ENABLED.ENTITY_NAME = 'ALL USERS'
AND ENABLED.POLICY_NAME = AUD.POLICY_NAME)
)
SELECT C.AUDIT_OPTION
FROM CIS_AUDIT C
LEFT JOIN AUDIT_ENABLED E
214 | P a g e
ON C.AUDIT_OPTION = E.AUDIT_OPTION
WHERE E.AUDIT_OPTION IS NULL;
Remediation:
Note: If you do not have CIS_UNIFIED_AUDIT_POLICY, please create one using the CREATE
AUDIT POLICY statement.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
215 | P a g e
Description:
An Oracle database synonym is used to create an alternative name for a database object
such as table, view, procedure, java object or even another synonym, etc. Enabling this
unified action audit causes logging of all CREATE SYNONYM and CREATE PUBLIC SYNONYM
statements, whether successful or unsuccessful, issued by the users regardless of the
privileges held by the users to issue such statements.
Rationale:
Audit:
WITH
CIS_AUDIT(AUDIT_OPTION) AS
(
SELECT * FROM TABLE( DBMSOUTPUT_LINESARRAY( 'CREATE SYNONYM' ) )
),
AUDIT_ENABLED AS
( SELECT DISTINCT AUDIT_OPTION
FROM AUDIT_UNIFIED_POLICIES AUD
WHERE AUD.AUDIT_OPTION IN ('CREATE SYNONYM' )
AND AUD.AUDIT_OPTION_TYPE = 'STANDARD ACTION'
AND EXISTS (SELECT *
FROM AUDIT_UNIFIED_ENABLED_POLICIES ENABLED
WHERE ENABLED.SUCCESS = 'YES'
AND ENABLED.FAILURE = 'YES'
AND ENABLED.ENABLED_OPTION = 'BY USER'
AND ENABLED.ENTITY_NAME = 'ALL USERS'
AND ENABLED.POLICY_NAME = AUD.POLICY_NAME)
)
SELECT C.AUDIT_OPTION
216 | P a g e
FROM CIS_AUDIT C
LEFT JOIN AUDIT_ENABLED E
ON C.AUDIT_OPTION = E.AUDIT_OPTION
WHERE E.AUDIT_OPTION IS NULL;
Remediation:
Note: If you do not have CIS_UNIFIED_AUDIT_POLICY, please create one using the CREATE
AUDIT POLICY statement.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
217 | P a g e
Description:
An Oracle database synonym is used to create an alternative name for a database object
such as table, view, procedure, or java object, or even another synonym. Enabling this
unified action audit causes logging of all ALTER SYNONYM and ALTER PUBLIC SYNONYM
statements, whether successful or unsuccessful, issued by the users regardless of the
privileges held by the users to issue such statements.
Rationale:
Audit:
WITH
CIS_AUDIT(AUDIT_OPTION) AS
(
SELECT * FROM TABLE( DBMSOUTPUT_LINESARRAY('ALTER SYNONYM' ) )
),
AUDIT_ENABLED AS
( SELECT DISTINCT AUDIT_OPTION
FROM AUDIT_UNIFIED_POLICIES AUD
WHERE AUD.AUDIT_OPTION IN ('ALTER SYNONYM' )
AND AUD.AUDIT_OPTION_TYPE = 'STANDARD ACTION'
AND EXISTS (SELECT *
FROM AUDIT_UNIFIED_ENABLED_POLICIES ENABLED
WHERE ENABLED.SUCCESS = 'YES'
AND ENABLED.FAILURE = 'YES'
AND ENABLED.ENABLED_OPTION = 'BY USER'
AND ENABLED.ENTITY_NAME = 'ALL USERS'
AND ENABLED.POLICY_NAME = AUD.POLICY_NAME)
)
SELECT C.AUDIT_OPTION
218 | P a g e
FROM CIS_AUDIT C
LEFT JOIN AUDIT_ENABLED E
ON C.AUDIT_OPTION = E.AUDIT_OPTION
WHERE E.AUDIT_OPTION IS NULL;
Remediation:
Note: If you do not have CIS_UNIFIED_AUDIT_POLICY, please create one using the CREATE
AUDIT POLICY statement.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
219 | P a g e
Description:
An Oracle database synonym is used to create an alternative name for a database object
such as table, view, procedure, or java object, or even another synonym. Enabling his
unified action audit causes logging of all DROP SYNONYM and DROP PUBLIC SYNONYM
statements, whether successful or unsuccessful, issued by the users regardless of the
privileges held by the users to issue such statements.
Rationale:
Audit:
WITH
CIS_AUDIT(AUDIT_OPTION) AS
(
SELECT * FROM TABLE( DBMSOUTPUT_LINESARRAY( 'DROP SYNONYM' ) )
),
AUDIT_ENABLED AS
( SELECT DISTINCT AUDIT_OPTION
FROM AUDIT_UNIFIED_POLICIES AUD
WHERE AUD.AUDIT_OPTION IN ('DROP SYNONYM' )
AND AUD.AUDIT_OPTION_TYPE = 'STANDARD ACTION'
AND EXISTS (SELECT *
FROM AUDIT_UNIFIED_ENABLED_POLICIES ENABLED
WHERE ENABLED.SUCCESS = 'YES'
AND ENABLED.FAILURE = 'YES'
AND ENABLED.ENABLED_OPTION = 'BY USER'
AND ENABLED.ENTITY_NAME = 'ALL USERS'
AND ENABLED.POLICY_NAME = AUD.POLICY_NAME)
)
SELECT C.AUDIT_OPTION
FROM CIS_AUDIT C
LEFT JOIN AUDIT_ENABLED E
220 | P a g e
ON C.AUDIT_OPTION = E.AUDIT_OPTION
WHERE E.AUDIT_OPTION IS NULL;
Remediation:
Note: If you do not have CIS_UNIFIED_AUDIT_POLICY, please create one using the CREATE
AUDIT POLICY statement.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
221 | P a g e
Description:
The SELECT ANY DICTIONARY system privilege allows the user to view the definition of all
schema objects in the database. It grants SELECT privileges on the data dictionary objects to
the grantees, including SELECT on DBA_ views, V$ views, X$ views and underlying SYS tables
such as TAB$ and OBJ$. This privilege also allows grantees to create stored objects such as
procedures, packages and views on the underlying data dictionary objects. Please note that
this privilege does not grant SELECT on tables with password hashes such as USER$,
DEFAULT_PWD$, LINK$, and USER_HISTORY$. Enabling this audit causes logging of activities
that exercise this privilege.
Rationale:
Logging and monitoring of all attempts to access a data dictionary, whether successful or
unsuccessful, may provide clues and forensic evidence about potential
suspicious/unauthorized activities. Any such activities may be a cause for further
investigation. In addition, organization security policies and industry/government
regulations may require logging of all user activities involving access to the database.
Audit:
WITH
CIS_AUDIT(AUDIT_OPTION) AS
(
SELECT * FROM TABLE( DBMSOUTPUT_LINESARRAY( 'SELECT ANY DICTIONARY' ) )
),
AUDIT_ENABLED AS
( SELECT DISTINCT AUDIT_OPTION
FROM AUDIT_UNIFIED_POLICIES AUD
WHERE AUD.AUDIT_OPTION IN ('SELECT ANY DICTIONARY' )
AND AUD.AUDIT_OPTION_TYPE = 'SYSTEM PRIVILEGE'
AND EXISTS (SELECT *
FROM AUDIT_UNIFIED_ENABLED_POLICIES ENABLED
WHERE ENABLED.SUCCESS = 'YES'
AND ENABLED.FAILURE = 'YES'
AND ENABLED.ENABLED_OPTION = 'BY USER'
AND ENABLED.ENTITY_NAME = 'ALL USERS'
222 | P a g e
Remediation:
Note: If you do not have CIS_UNIFIED_AUDIT_POLICY, please create one using the CREATE
AUDIT POLICY statement.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
223 | P a g e
Description:
The AUDSYS.AUD$UNIFIED holds audit trail records generated by the database. Enabling this
audit action causes logging of all access attempts to the AUDSYS.AUD$UNIFIED, whether
successful or unsuccessful, regardless of the privileges held by the users to issue such
statements.
Rationale:
Audit:
WITH
CIS_AUDIT(AUDIT_OPTION) AS
(
SELECT * FROM TABLE( DBMSOUTPUT_LINESARRAY( 'AUD$UNIFIED' ) )
),
AUDIT_ENABLED AS
( SELECT DISTINCT OBJECT_NAME
FROM AUDIT_UNIFIED_POLICIES AUD
WHERE AUD.AUDIT_OPTION IN ('ALL' )
AND AUD.AUDIT_OPTION_TYPE = 'OBJECT ACTION'
AND AUD.OBJECT_SCHEMA = 'AUDSYS'
AND AUD.OBJECT_NAME = 'AUD$UNIFIED'
AND EXISTS (SELECT *
FROM AUDIT_UNIFIED_ENABLED_POLICIES ENABLED
WHERE ENABLED.SUCCESS = 'YES'
AND ENABLED.FAILURE = 'YES'
AND ENABLED.ENABLED_OPTION = 'BY USER'
AND ENABLED.ENTITY_NAME = 'ALL USERS'
AND ENABLED.POLICY_NAME = AUD.POLICY_NAME)
)
SELECT C.AUDIT_OPTION
FROM CIS_AUDIT C
224 | P a g e
Remediation:
For Oracle 12.2 and above, execute the following SQL statement to remediate this setting.
Note: If you do not have CIS_UNIFIED_AUDIT_POLICY, please create one using the CREATE
AUDIT POLICY statement.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
225 | P a g e
Description:
Oracle database procedures, function, packages, and package bodies, which are stored
within the database, are created to perform business functions and access database as
defined by PL/SQL code and SQL statements contained within these objects. Enabling this
unified action audit causes logging of all CREATE PROCEDURE, CREATE FUNCTION, CREATE
PACKAGE and CREATE PACKAGE BODY statements, successful or unsuccessful, statements
issued by the users regardless of the privileges held by the users to issue such statements.
Rationale:
Audit:
WITH
CIS_AUDIT(AUDIT_OPTION) AS
(
SELECT * FROM TABLE( DBMSOUTPUT_LINESARRAY(
'CREATE PROCEDURE','CREATE FUNCTION','CREATE PACKAGE','CREATE PACKAGE BODY'
) )
),
AUDIT_ENABLED AS
( SELECT DISTINCT AUDIT_OPTION
FROM AUDIT_UNIFIED_POLICIES AUD
WHERE AUD.AUDIT_OPTION IN ('CREATE PROCEDURE','CREATE FUNCTION','CREATE
PACKAGE','CREATE PACKAGE BODY' )
AND AUD.AUDIT_OPTION_TYPE = 'STANDARD ACTION'
AND EXISTS (SELECT *
FROM AUDIT_UNIFIED_ENABLED_POLICIES ENABLED
WHERE ENABLED.SUCCESS = 'YES'
AND ENABLED.FAILURE = 'YES'
AND ENABLED.ENABLED_OPTION = 'BY USER'
226 | P a g e
Remediation:
Note: If you do not have CIS_UNIFIED_AUDIT_POLICY, please create one using the CREATE
AUDIT POLICY statement.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
227 | P a g e
Description:
Oracle database procedures, functions, packages, and package bodies, which are stored
within the database, are created to carry out business functions and access database as
defined by PL/SQL code and SQL statements contained within these objects. Enabling this
unified action audit causes logging of all ALTER PROCEDURE, ALTER FUNCTION, ALTER
PACKAGE and ALTER PACKAGE BODY statements, successful or unsuccessful, issued by the
users regardless of the privileges held by the users to issue such statements.
Rationale:
Audit:
WITH
CIS_AUDIT(AUDIT_OPTION) AS
(
SELECT * FROM TABLE( DBMSOUTPUT_LINESARRAY(
'ALTER PROCEDURE','ALTER FUNCTION','ALTER PACKAGE','ALTER PACKAGE BODY' ) )
),
AUDIT_ENABLED AS
( SELECT DISTINCT AUDIT_OPTION
FROM AUDIT_UNIFIED_POLICIES AUD
WHERE AUD.AUDIT_OPTION IN ('ALTER PROCEDURE','ALTER FUNCTION','ALTER
PACKAGE','ALTER PACKAGE BODY' )
AND AUD.AUDIT_OPTION_TYPE = 'STANDARD ACTION'
AND EXISTS (SELECT *
FROM AUDIT_UNIFIED_ENABLED_POLICIES ENABLED
WHERE ENABLED.SUCCESS = 'YES'
228 | P a g e
Remediation:
Note: If you do not have CIS_UNIFIED_AUDIT_POLICY, please create one using the CREATE
AUDIT POLICY statement.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
229 | P a g e
Description:
Oracle database procedures, functions, packages, and package bodies, which are stored
within the database, are created to carry out business functions and access database as
defined by PL/SQL code and SQL statements contained within these objects. Enabling this
unified action audit causes logging of all DROP PROCEDURE, DROP FUNCTION, DROP PACKAGE or
DROP PACKAGE BODY statements, successful or unsuccessful, issued by the users regardless
of the privileges held by the users to issue such statements.
Rationale:
Audit:
WITH
CIS_AUDIT(AUDIT_OPTION) AS
(
SELECT * FROM TABLE( DBMSOUTPUT_LINESARRAY(
'DROP PROCEDURE','DROP FUNCTION','DROP PACKAGE','DROP PACKAGE BODY' ) )
),
AUDIT_ENABLED AS
( SELECT DISTINCT AUDIT_OPTION
FROM AUDIT_UNIFIED_POLICIES AUD
WHERE AUD.AUDIT_OPTION IN ('DROP PROCEDURE','DROP FUNCTION','DROP
PACKAGE','DROP PACKAGE BODY' )
AND AUD.AUDIT_OPTION_TYPE = 'STANDARD ACTION'
AND EXISTS (SELECT *
FROM AUDIT_UNIFIED_ENABLED_POLICIES ENABLED
WHERE ENABLED.SUCCESS = 'YES'
AND ENABLED.FAILURE = 'YES'
AND ENABLED.ENABLED_OPTION = 'BY USER'
AND ENABLED.ENTITY_NAME = 'ALL USERS'
230 | P a g e
Remediation:
Note: If you do not have CIS_UNIFIED_AUDIT_POLICY, please create one using the CREATE
AUDIT POLICY statement.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
231 | P a g e
Description:
The ALTER SYSTEM privilege allows the user to change instance settings which could impact
security posture, performance or normal operation of the database. Additionally, the ALTER
SYSTEM privilege may be used to run operating system commands using undocumented
Oracle functionality. Enabling this unified audit causes logging of activities that involve
exercise of this privilege, whether successful or unsuccessful, issued by the users
regardless of the privileges held by the users to issue such statements.
Rationale:
Logging and monitoring of all attempts to execute ALTER SYSTEM statements, whether
successful or unsuccessful, may provide forensic evidence about potential
suspicious/unauthorized activities. Any such activities may be a cause for further
investigation. In addition, organization security policies and industry/government
regulations may require logging of all user activities that involve ALTER SYSTEM statements.
Audit:
WITH
CIS_AUDIT(AUDIT_OPTION) AS
(
SELECT * FROM TABLE( DBMSOUTPUT_LINESARRAY( 'ALTER SYSTEM' ) )
),
AUDIT_ENABLED AS
( SELECT DISTINCT AUDIT_OPTION
FROM AUDIT_UNIFIED_POLICIES AUD
WHERE AUD.AUDIT_OPTION IN ('ALTER SYSTEM' )
AND AUD.AUDIT_OPTION_TYPE = 'SYSTEM PRIVILEGE'
AND EXISTS (SELECT *
FROM AUDIT_UNIFIED_ENABLED_POLICIES ENABLED
WHERE ENABLED.SUCCESS = 'YES'
AND ENABLED.FAILURE = 'YES'
AND ENABLED.ENABLED_OPTION = 'BY USER'
AND ENABLED.ENTITY_NAME = 'ALL USERS'
AND ENABLED.POLICY_NAME = AUD.POLICY_NAME)
)
SELECT C.AUDIT_OPTION
232 | P a g e
FROM CIS_AUDIT C
LEFT JOIN AUDIT_ENABLED E
ON C.AUDIT_OPTION = E.AUDIT_OPTION
WHERE E.AUDIT_OPTION IS NULL;
Remediation:
Note: If you do not have CIS_UNIFIED_AUDIT_POLICY, please create one using the CREATE
AUDIT POLICY statement.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
233 | P a g e
Description:
Oracle database triggers are executed automatically when specified conditions on the
underlying objects occur. Trigger bodies contain the code, quite often to perform data
validation, ensure data integrity/security or enforce critical constraints on allowable
actions on data. Enabling this unified audit causes logging of all CREATE TRIGGER
statements, whether successful or unsuccessful, issued by the users regardless of the
privileges held by the users to issue such statements.
Rationale:
Audit:
WITH
CIS_AUDIT(AUDIT_OPTION) AS
(
SELECT * FROM TABLE( DBMSOUTPUT_LINESARRAY( 'CREATE TRIGGER' ) )
),
AUDIT_ENABLED AS
( SELECT DISTINCT AUDIT_OPTION
FROM AUDIT_UNIFIED_POLICIES AUD
WHERE AUD.AUDIT_OPTION IN ('CREATE TRIGGER' )
AND AUD.AUDIT_OPTION_TYPE = 'STANDARD ACTION'
AND EXISTS (SELECT *
FROM AUDIT_UNIFIED_ENABLED_POLICIES ENABLED
WHERE ENABLED.SUCCESS = 'YES'
AND ENABLED.FAILURE = 'YES'
AND ENABLED.ENABLED_OPTION = 'BY USER'
AND ENABLED.ENTITY_NAME = 'ALL USERS'
AND ENABLED.POLICY_NAME = AUD.POLICY_NAME)
)
SELECT C.AUDIT_OPTION
234 | P a g e
FROM CIS_AUDIT C
LEFT JOIN AUDIT_ENABLED E
ON C.AUDIT_OPTION = E.AUDIT_OPTION
WHERE E.AUDIT_OPTION IS NULL;
Remediation:
Note: If you do not have CIS_UNIFIED_AUDIT_POLICY, please create one using the CREATE
AUDIT POLICY statement.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
235 | P a g e
Description:
Oracle database triggers are executed automatically when specified conditions on the
underlying objects occur. Trigger bodies contain the code, quite often to perform data
validation, ensure data integrity/security or enforce critical constraints on allowable
actions on data. Enabling this unified audit causes logging of all ALTER TRIGGER statements,
whether successful or unsuccessful, issued by the users regardless of the privileges held by
the users to issue such statements.
Rationale:
Audit:
WITH
CIS_AUDIT(AUDIT_OPTION) AS
(
SELECT * FROM TABLE( DBMSOUTPUT_LINESARRAY( 'ALTER TRIGGER' ) )
),
AUDIT_ENABLED AS
( SELECT DISTINCT AUDIT_OPTION
FROM AUDIT_UNIFIED_POLICIES AUD
WHERE AUD.AUDIT_OPTION IN ('ALTER TRIGGER' )
AND AUD.AUDIT_OPTION_TYPE = 'STANDARD ACTION'
AND EXISTS (SELECT *
FROM AUDIT_UNIFIED_ENABLED_POLICIES ENABLED
WHERE ENABLED.SUCCESS = 'YES'
AND ENABLED.FAILURE = 'YES'
AND ENABLED.ENABLED_OPTION = 'BY USER'
AND ENABLED.ENTITY_NAME = 'ALL USERS'
AND ENABLED.POLICY_NAME = AUD.POLICY_NAME)
)
SELECT C.AUDIT_OPTION
FROM CIS_AUDIT C
236 | P a g e
Remediation:
Note: If you do not have CIS_UNIFIED_AUDIT_POLICY, please create one using the CREATE
AUDIT POLICY statement.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
237 | P a g e
Description:
Oracle database triggers are executed automatically when specified conditions on the
underlying objects occur. Trigger bodies contain the code, quite often to perform data
validation, ensure data integrity/security or enforce critical constraints on allowable
actions on data. Enabling this unified audit causes logging of all DROP TRIGGER statements,
whether successful or unsuccessful, issued by the users regardless of the privileges held by
the users to issue such statements.
Rationale:
Audit:
WITH
CIS_AUDIT(AUDIT_OPTION) AS
(
SELECT * FROM TABLE( DBMSOUTPUT_LINESARRAY( 'DROP TRIGGER' ) )
),
AUDIT_ENABLED AS
( SELECT DISTINCT AUDIT_OPTION
FROM AUDIT_UNIFIED_POLICIES AUD
WHERE AUD.AUDIT_OPTION IN ('DROP TRIGGER' )
AND AUD.AUDIT_OPTION_TYPE = 'STANDARD ACTION'
AND EXISTS (SELECT *
FROM AUDIT_UNIFIED_ENABLED_POLICIES ENABLED
WHERE ENABLED.SUCCESS = 'YES'
AND ENABLED.FAILURE = 'YES'
AND ENABLED.ENABLED_OPTION = 'BY USER'
AND ENABLED.ENTITY_NAME = 'ALL USERS'
AND ENABLED.POLICY_NAME = AUD.POLICY_NAME)
)
SELECT C.AUDIT_OPTION
FROM CIS_AUDIT C
LEFT JOIN AUDIT_ENABLED E
238 | P a g e
ON C.AUDIT_OPTION = E.AUDIT_OPTION
WHERE E.AUDIT_OPTION IS NULL;
Remediation:
Note: If you do not have CIS_UNIFIED_AUDIT_POLICY, please create one using the CREATE
AUDIT POLICY statement.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
239 | P a g e
Description:
Oracle database users log on to the database to perform their work. Enabling this unified
audit causes logging of all LOGON actions, whether successful or unsuccessful, issued by the
users regardless of the privileges held by the users to log into the database. In addition,
LOGOFF action audit captures logoff activities. This audit action also captures logon/logoff to
the open database by SYSDBA and SYSOPER.
Rationale:
Logging and monitoring of all attempts to logon to the database, whether successful or
unsuccessful, may provide forensic evidence about potential suspicious/unauthorized
activities. Any such activities may be a cause for further investigation. In addition,
organization security policies and industry/government regulations may require logging of
all user activities involving LOGON and LOGOFF.
Audit:
WITH
CIS_AUDIT(AUDIT_OPTION) AS
(
SELECT * FROM TABLE( DBMSOUTPUT_LINESARRAY( 'LOGON','LOGOFF' ) )
),
AUDIT_ENABLED AS
( SELECT DISTINCT AUDIT_OPTION
FROM AUDIT_UNIFIED_POLICIES AUD
WHERE AUD.AUDIT_OPTION IN ('LOGON','LOGOFF' )
AND AUD.AUDIT_OPTION_TYPE = 'STANDARD ACTION'
AND EXISTS (SELECT *
FROM AUDIT_UNIFIED_ENABLED_POLICIES ENABLED
WHERE ENABLED.SUCCESS = 'YES'
AND ENABLED.FAILURE = 'YES'
AND ENABLED.ENABLED_OPTION = 'BY USER'
AND ENABLED.ENTITY_NAME = 'ALL USERS'
AND ENABLED.POLICY_NAME = AUD.POLICY_NAME)
)
SELECT C.AUDIT_OPTION
FROM CIS_AUDIT C
LEFT JOIN AUDIT_ENABLED E
240 | P a g e
ON C.AUDIT_OPTION = E.AUDIT_OPTION
WHERE E.AUDIT_OPTION IS NULL;
Remediation:
Note: If you do not have CIS_UNIFIED_AUDIT_POLICY, please create one using the CREATE
AUDIT POLICY statement.
CIS Controls:
Version 6
6.2 Ensure Audit Log Settings Support Appropriate Log Entry Formatting
Validate audit log settings for each hardware device and the software installed on it,
ensuring that logs include a date, timestamp, source addresses, destination addresses, and
various other useful elements of each packet and/or transaction. Systems should record
logs in a standardized format such as syslog entries or those outlined by the Common Event
Expression initiative. If systems cannot generate logs in a standardized format, log
normalization tools can be deployed to convert logs into such a format.
Version 7
241 | P a g e
The recommendations expressed in this document assume the presence of a role named
CISSCANROLE and a user named CISSCAN. This role and user should be created by executing
the following SQL statements, being careful to substitute an appropriate password for
<password>.
242 | P a g e
The recommendations expressed in this document assume the presence of a common role
named C##CISSCANROLE and a common user named C##CISSCAN. This common role and
common user should be created by executing the following SQL statements, being careful to
substitute an appropriate password for <password>.
If you rely on similar roles and/or users, but they are not named C##CISSCANROLE or
C##CISSCAN, or if you have roles or users named C##CISSCANROLE or C##CISSCAN intended
to be used for different purposes, be aware that some recommendations herein explicitly
name C##CISSCANROLE and C##CISSCAN.
243 | P a g e
These are:
Note: Different organizations may wish to follow the instructions in this appendix in
different ways. For more permanent or regular assessment scans, it may be acceptable to
retain the CISSCANROLE and CISSCAN user indefinitely. However, in a consultative context
where an assessment is perhaps run at the outset of the consulting engagement and again
closer to the end, after any remediation has been performed, the CISSCANROLE role and
CISSCAN user may be dropped. Such a decision is ultimately left up to the implementing
organization.
244 | P a g e
All of the rest of the commands can be run in either container or pluggable databases.
245 | P a g e
Note: Different organizations may wish to follow the instructions in this appendix in
different ways. Such a decision is ultimately left up to the implementing organization for
example, you may wish to have different unified auditing policies.
246 | P a g e
247 | P a g e
248 | P a g e
249 | P a g e
250 | P a g e
251 | P a g e
252 | P a g e
253 | P a g e