Information
The packages described in this control are not granted to PUBLIC by default ('Non-default' packages). These packages should not be granted to PUBLIC.
The Oracle database DBMS_BACKUP_RESTORE package is used for applying PL/SQL commands to the native RMAN sequences.
The Oracle database DBMS_FILE_TRANSFER package allows a user to transfer files from one database server to another.
The Oracle database DBMS_SYS_SQL, DBMS_AQADM_SYSCALLS, DBMS_REPCAT_SQL_UTL, INITJVMAUX, DBMS_STREAMS_ADM_UTL, DBMS_AQADM_SYS, DBMS_STREAMS_RPC, DBMS_PRVTAQIM, LTADM, WWV_DBMS_SQL, WWV_EXECUTE_IMMEDIATE and DBMS_IJOB packages are shipped as undocumented.
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.
The DBMS_BACKUP_RESTORE package can allow access to OS files.
The DBMS_FILE_TRANSFER package could allow to transfer files from one database server to another without authorization to do so.
The DBMS_SYS_SQL package could allow a user to run code as a different user without entering valid credentials.
The DBMS_AQADM_SYSCALLS package could allow an unauthorized user to run SQL commands as user SYS.
The DBMS_REPCAT_SQL_UTL package could allow an unauthorized user to run SQL commands as user SYS.
The INITJVMAUX package could allow an unauthorized user to run SQL commands as user SYS.
The DBMS_STREAMS_ADM_UTL package could allow an unauthorized user to run SQL commands as user SYS.
The DBMS_AQADM_SYS package could allow an unauthorized user to run SQL commands as user SYS.
The DBMS_STREAMS_RPC package could allow an unauthorized user to run SQL commands as user SYS.
The DBMS_PRVTAQIM package could allow an unauthorized user to escalate privileges because any SQL statements could be executed as user SYS.
The LTADM package could allow an unauthorized user to run any SQL command as user SYS. It allows privilege escalation if granted to unprivileged users.
The WWV_DBMS_SQL package could allow an unauthorized user to run SQL statements as the Application Express (APEX) user. The user PUBLIC should not be able to execute WWV_DBMS_SQL.
The WWV_EXECUTE_IMMEDIATE package could allow an unauthorized user to run SQL statements as the Application Express (APEX) user.
The DBMS_IJOB package could allow an attacker to change identities by using a different username to execute a database job. It allows a user to run database jobs in the context of another user.
Solution
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.
REVOKE EXECUTE ON DBMS_BACKUP_RESTORE FROM PUBLIC;
REVOKE EXECUTE ON DBMS_FILE_TRANSFER FROM PUBLIC;
REVOKE EXECUTE ON DBMS_SYS_SQL FROM PUBLIC;
REVOKE EXECUTE ON DBMS_AQADM_SYSCALLS FROM PUBLIC;
REVOKE EXECUTE ON DBMS_REPCAT_SQL_UTL FROM PUBLIC;
REVOKE EXECUTE ON INITJVMAUX FROM PUBLIC;
REVOKE EXECUTE ON DBMS_STREAMS_ADM_UTL FROM PUBLIC;
REVOKE EXECUTE ON DBMS_AQADM_SYS FROM PUBLIC;
REVOKE EXECUTE ON DBMS_STREAMS_RPC FROM PUBLIC;
REVOKE EXECUTE ON DBMS_PRVTAQIM FROM PUBLIC;
REVOKE EXECUTE ON LTADM FROM PUBLIC;
REVOKE EXECUTE ON WWV_DBMS_SQL FROM PUBLIC;
REVOKE EXECUTE ON WWV_EXECUTE_IMMEDIATE FROM PUBLIC;
REVOKE EXECUTE ON DBMS_IJOB FROM PUBLIC;
REVOKE EXECUTE ON DBMS_PDB_EXEC_SQL FROM PUBLIC;