Oracle Database Security Assessment Report - Privileges and Roles

The Oracle Database Security Assessment Report - Privileges and Roles section displays the following information:

NameFinding IDDescriptionLink(s)
Access to Password Verifier TablesPRIV.ACCESSVERIFIERS

Displays access to password verifier tables granted to users.

Users with these privileges can access objects that contain user password verifiers. The verifiers can be used in offline attacks to discover user passwords.

Users with Administrative Privileges SYS* PrivilegesPRIV.SYSADMIN

Displays the administrative privileges granted to user accounts.

Administrative privileges allow a user to perform maintenance operations, including some that may occur while the database is not open. The SYSDBA privilege allows the user to run as SYS and perform virtually all privileged operations. Starting with Oracle Database 12c Release 1 (12.1), less powerful administrative privileges were introduced to allow users to perform common administrative tasks with less than full SYSDBA privileges. To achieve the benefit of this separation of duty, each of these administrative privileges should be granted to at least one user account.

Users with DBA RolePRIV.DBA

Displays the user accounts that have been granted the DBA or PDB_DBA role.

The DBA and PDB_DBA roles can bypass many security controls. Therefore, you must limit DBA and PDB_DBA roles to a small number of trusted administrators or avoid granting the roles to users, unless absolutely necessary.

As an alternative, create custom DBA roles with the minimum required privileges for each user’s tasks. Use Privilege Analysis to identify used and unused privileges and roles, and assign different minimum-privilege roles based on administrators’ operations.

Users with Powerful RolesPRIV.BIGROLES

Displays the user accounts that have been granted roles with maximum data access privileges.

Like the DBA role, the powerful roles AQ_ADMINISTRATOR_ROLE, AUDIT_VIEWER, DBA, EM_EXPRESS_ALL, EXECUTE_CATALOG_ROLE, EXP_FULL_DATABASE, IMP_FULL_DATABASE, MAINTPLAN_APP, OEM_MONITOR, OLAP_DBA, and SELECT_CATALOG_ROLE contain privileges that attackers could use to bypass security controls. Limit them to a small number of trusted administrators, and revoke their WITH ADMIN OPTION grants from unauthorized grantees.

Audit users with these roles to detect unauthorized activity.

Use Privilege Analysis to determine whether users have used the privileges and consider revoking unused ones.

System Privilege GrantsPRIV.SYSTEM

Displays the system privileges granted to users.

System privileges provide the ability to access data or perform administrative operations for the entire database. Consistent with the principle of least privilege, these privileges should be granted sparingly. System privileges should be granted with admin option only when the recipient needs the ability to grant the privilege to others.

-g option reports all grants including common grants in a PDB. The report displays (*) for privileges being granted with admin option, (D) for privileges being granted directly, and (C) for privileges being granted commonly.

Schema Privilege GrantsPRIV.SCHEMA

Displays information about user accounts with ANY system privileges and schema-level grants.

This will allow reviewing cases where SELECT ANY TABLE system privilege was granted to simplify management and replace them with schema-level grants instead.

System Privileges Granted to PUBLICPRIV.SYSPUBLIC

Displays the system privileges granted to PUBLIC.

Privileges granted to PUBLIC are available to all users. This generally should include few, if any, system privileges since these will not be needed by ordinary users who are not administrators.

Roles Granted to PUBLICPRIV.ROLEPUBLIC

Displays the roles granted to PUBLIC.

Roles granted to PUBLIC are available to all users. Most roles contain privileges that are not appropriate for all users.

Column Privileges Granted to PUBLICPRIV.COLPUBLIC

Displays the column access privileges granted to PUBLIC.

Privileges granted to PUBLIC are available to all users. This should include column privileges only for data that is intended to be accessible to everyone.

Objects Accessible by PUBLICPRIV.OBJPUBLICDisplays objects that are accessible by PUBLIC.
Encryption Packages Granted to PUBLICPRIV.ENCRYPTPACKAGEPUBLICDisplays DBMS_CRYPTO, DBMS_OBFUSCATION_TOOLKIT, and DBMS_RANDOM grants to PUBLIC.
Scheduler Job Packages Granted to PUBLICPRIV.JOBSCHPACKAGEPUBLICDisplay DBMS_SCHEDULER and DBMS_JOB EXECUTE grants to PUBLIC and Scheduler/Job system privileges (CREATE JOB, MANAGE SCHEDULER, CREATE EXTERNAL JOB, CREATE ANY JOB) grants to PUBLIC.
Credential Package Granted to PUBLICPRIV.CREDPACKAGEPUBLICDisplays EXECUTE grant on DBMS_CREDENTIAL package to PUBLIC. Also checks for privilege grants of CREATE CREDENTIAL and CREATE ANY CREDENTIAL to users.
File System Packages Granted to PUBLICPRIV.FILESYSTEMPACKAGEPUBLICDisplays EXECUTE grant on DBMS_LOB, UTL_FILE, and DBMS_ADVISOR packages to PUBLIC. Also checks for system privilege grants of CREATE ANY DIRECTORY and DROP ANY DIRECTORY to users.
Network Packages Granted to PUBLICPRIV.NETPACKAGEPUBLICDisplays EXECUTE grant on DBMS_LDAP, UTL_HTTP, UTL_INADDR, UTL_SMTP, and UTL_TCP packages to PUBLIC. Also checks for users that are authorized to execute packages via ACLs.
SQL Packages Granted to PUBLICPRIV.QUERYPACKAGEPUBLICDisplays EXECUTE grant on DBMS_XMLQUERY, DBMS_XMLSAVE, DBMS_XMLSTORE, DBMS_REDACT, DBMS_XMLGEN, and DBMS_SQL packages to PUBLIC.
Oracle JAVA Permissions Granted to PUBLICPRIV.JAVAPACKAGEPUBLICDisplays EXECUTE grant on DBMS_JAVA and DBMS_JAVA_TEST packages to PUBLIC. Also checks for grants of JAVA_ADMIN role to users.
Broad Data Access PrivilegesPRIV.ANYSYSTEMDisplays information about user accounts that have been granted system privileges (ANY).No documentation links
Access Privilege GrantsPRIV.CONTAINERACCESSDisplays information about common users with set container privilege grants. This check is only for CDB$ROOT.
All RolesPRIV.ALLROLES

Displays all roles granted to users.

Roles are a convenient way to manage groups of related privileges, especially when the privileges are required for a particular task or job function. Beware of broadly defined roles, which may confer more privileges than an individual recipient requires. Roles should be granted with admin option only when the recipient needs the ability to modify the role or grant it to others.

Account Management PrivilegesPRIV.ACCOUNTMGMT

Displays account management privileges granted to users.

User management privileges (ALTER USER, CREATE USER, DROP USER) can be used to create and modify other user accounts, including changing passwords. This power can be abused to gain access to another user's account, which may have greater privileges.

Role and Privilege Management PrivilegesPRIV.ROLEPRIVMGMT

Displays privilege management privileges granted to users.

Users with privilege management privileges (ALTER ANY ROLE, CREATE ROLE, DROP ANY ROLE, GRANT ANY OBJECT PRIVILEGE, GRANT ANY PRIVILEGE, GRANT ANY ROLE) can change the set of privileges granted to themselves and other users. This ability should be granted sparingly, since it can be used to circumvent many security controls in the database.

Database Management PrivilegesPRIV.DBMGMT

Displays database management privileges granted to users.

Database management privileges (ALTER DATABASE, ALTER SYSTEM, CREATE ANY LIBRARY, CREATE LIBRARY) can be used to change the operation of the database and potentially bypass security protections. This ability should be granted only to trusted administrators.

Audit Management PackagePRIV.AUDITMGMTPKG

Displays audit management tool access granted to users.

The DBMS_AUDIT_MGMT package allow for execution of Audit management tools. Access should be strictly limited and granted only to users with a legitimate need for this functionality.

Audit Management PrivilegesPRIV.AUDITMGMT

Displays audit management privileges granted to users.

Audit management privileges (AUDIT ANY, AUDIT SYSTEM) can be used to change the audit policies for the database. This ability should be granted sparingly, since it may be used to hide malicious activity.

Access to Audit ObjectsPRIV.ACCESSAUDITOBJ

Displays access to audit objects granted to users.

Users with these privileges can directly access and modify objects containing audit information. Access to these objects may allow a malicious user deduce privilege settings for other users and to manipulate the audit information by replacing or deleting audit records.

Use Privilege Analysis to identify used and unused access. Grant task-specific custom roles with only the required system and object privileges instead of broad roles such as DBA or SELECT_CATALOG_ROLE. Ensure that only authorized grantees have AUDIT_ADMIN or AUDIT_VIEWER privileges, which allows users to create, update, and view audit configurations and data.

Access Control Exemption PrivilegesPRIV.ACCESSEXEMPT

Displays access control exemption privileges that are enforced.

Users with exemption privileges (EXEMPT ACCESS POLICY, EXEMPT REDACTION POLICY) can bypass the row and column access control policies enforced by Virtual Private Database and Data Redaction. Most administrative tasks do not require access to the data itself, so these privileges should be granted rarely even to administrators.

Write Access to Restricted ObjectsPRIV.RESTRICTEDOBJ

Displays access to restricted objects granted to users.

Users with these privileges can directly modify objects in the SYS, DVSYS, AUDSYS or LBACSYS schemas. Manipulating these system objects may allow security protections to be circumvented or otherwise interfere with normal operation of the database. Object permissions granted to PUBLIC must be restricted for objects in the SYS, DVSYS, AUDSYS or LBACSYS schemas.

Users Who Can Impersonate Other UsersPRIV.IMPERSONATEUSER

Displays the user accounts that have been granted rights to impersonate other users.

The BECOME USER privilege and these PL/SQL packages (DBMS_AQADM_SYS, DBMS_AQADM_SYSCALLS, DBMS_IJOB, DBMS_PRVTAQIM, DBMS_REPCAT_SQL_UTL, DBMS_SCHEDULER, DBMS_STREAMS_ADM_UTL, DBMS_STREAMS_RPC, DBMS_SYS_SQL, INITJVMAUX, LTADM, WWV_DBMS_SQL, WWV_EXECUTE_IMMEDIATE) allow for execution of SQL code or external jobs using the identity of a different user. Access should be strictly limited and granted only to users with a legitimate need for this functionality.

Privilege for Data Exfiltration in BulkPRIV.EXFILTRATION

Displays the user accounts that have been granted rights to access or copy any data from a client or server.

The packages DBMS_BACKUP_RESTORE, DBMS_FILE_TRANSFER, UTL_DBWS, and UTL_ORAMTS can transfer data over the network or through the file system. Grant access only to users with a legitimate need, use Privilege Analysis to check whether the privileges are used, and consider revoking unused privileges.

Code Based Access ControlPRIV.CBAC

Displays all program units granted CBAC roles.

Code Based Access Control(CBAC) can be used to grant additional privileges on program units. CBAC allows you to attach database roles to a PL/SQL function, procedure, or package. These database roles are enabled at run time, enabling the program unit to execute with the required privileges in the calling user's environment.

Oracle Java PermissionsPRIV.JAVAPERMISSIONS

Displays the user accounts that have been granted privileges to run Oracle Java classes within the database.

Java permission grants govern the user's ability to execute Java classes in the database server.

Running the Java classes requires both Java security permissions and database privileges to access resources, including tables and PL/SQL packages, operating system files, and sockets, Oracle JVM classes, and user-loaded classes.

Grant only the minimum permissions that each user needs.

Use Privilege Analysis to identify unused permissions and consider revoking them.

None
Text Datastore Access PrivilegePRIV.INDEXFILE

Ensure TEXT DATASTORE ACCESS is granted to only authorized users

The TEXT DATASTORE ACCESS system privilege allows a database user to create Oracle Text indexes on data stored outside the database. The index could be on an arbitrary file in the file system in the case of FILE datastore and an arbitrary URL in the case of URL datastore. Granting this system privilege broadly allows any database user to browse or read files accessible to the OS account running the database and should be restricted due to the potential security risks.

Restrict this system privilege to authorized users. EXECUTE on CTXSYS.CTX_DDL can be used to create the Oracle Text preference that identifies the file-system or URL data store. Review the listed grants before revoking them.

-
Access to redo log contents through LogMinerPRIV.ACCESSREDO

Restrict users granted LOGMINING system privilege

The LOGMINING system privilege in Oracle Database allows users to query online and archived redo logs through a SQL interface. Because redo logs record database activity, they may contain sensitive information such as credit card numbers, passwords, and other confidential data. Unauthorized access to log-mining capabilities could therefore expose sensitive information and create security and privacy risks.

Review all LOGMINING grants and revoke access from unauthorized grantees. Review grants of EXECUTE on SYS.DBMS_LOGMNR and SELECT on SYS.V_$LOGMNR_CONTENTS and SYS.V_$LOGMNR_LOGS, as these privileges may provide access to parsed redo information. Review EXECUTE_CATALOG_ROLE, along with grants of EXECUTE on SYS.DBMS_LOGMNR, because it provides the package-execution capability that complements the LOGMINING privilege. Before revoking access, confirm legitimate replication, CDC, monitoring, and troubleshooting requirements. Then remove unnecessary direct LOGMINING grants or revoke the role that provides effective access.

Logical standby administration accessPRIV.LOGSTDBYADMIN

Ensure logical standby administration access is granted only to authorized users

The LOGSTDBY_ADMINISTRATOR role provides privileges to administer logical standby databases. Unauthorized grantees may perform operations that disrupt logical standby processing, affect database replication, and lead to data inconsistency. Grant this role only to authorized logical-standby administrators.

To remediate an unauthorized direct grant, revoke the role from the grantee; for an inherited grant, revoke the intervening role grant after impact analysis. The EXECUTE privilege on SYS.DBMS_LOGSTDBY can also enable logical-standby administration. Review Data Guard operational requirements before revoking either access path.

-
Access to database maintenance plansPRIV.MAINTPLAN

Ensure access to database maintenance plans is granted only to authorized users

The MAINTPLAN_APP role grants access to database maintenance plans. Unauthorized use can lead to disruptions in Oracle database operation and service.

Grant this role only to authorized database administrators. Users and roles with effective DBA or PDB_DBA role access are excluded from this finding.

-
Access to metadata of column level privilege grantsPRIV.ACCESSCOL

Review DBA access to the data dictionary view containing column-level privilege grants

The DBA_COL_PRIVS view provides DBAs with visibility into column-level privileges granted to users and roles. Unauthorized access to this view can expose privilege assignments and increase the risk of data breaches, unauthorized modifications, and privilege-escalation attacks. Access should therefore be restricted to authorized DBAs.

Column privileges on application objects may be required for application functionality and should be evaluated before removal. Grants to PUBLIC expose application columns to all users, while access to Oracle-maintained columns should be limited to authorized users and roles. Review direct and inherited grants and revoke unauthorized access after assessing potential application impact.

-

The following figure displays an example of the Oracle Database Security Assessment Report - Privileges and Roles section:

Database Configuration - PRIV.SYSTEM Finding

Description of the illustration Database Configuration - PRIV.SYSTEM Finding