Auditing UTL_FILE_DIR parameter file entry
Security Concerns
The UTL_FILE database package is used to read from and write to operating system directories and files. By default, PUBLIC is granted execute permission on UTL_FILE. Therefore, any database account may read from and write to files in the directories specified in the UTL_FILE_DIR database initialization parameter.
When UTL_FILE_DIR is set to “*”, all directories accessible to the Oracle database process, typically the Oracle installation account, are accessible via the UTL_FILE package. This setting effectively disables directory access checking, and makes any directory accessible to the UTL_FILE functions. The UTL_FILE_DIR list should specify only authorized and protected directories and should include only fully specified path names.
Note that the UTL_FILE.FOPEN procedure is used to access the directories in the oracle database. This since EXECUTE on this procedure is granted to PUBLIC, every user on the database has permission to execute it also.
Audit Point
1. Identify where UTIL_FILE is used by running the command below:
SELECT distinct(name),type,owner FROM dba_source
WHERE upper(text) like '%FOPEN%'
2. Confirm that the owners are authorised to create such packages or procedure
3. Confirm the setting in the initialisation parameter by running the following script:
select value from v$parameter where lower(name)='utl_file_dir';
If the returned value contains '*', this is an exception and should be discussed with your DBA.
4. It is recommended that the UTL_FILE_DIR list should specify only authorized and protected directories and should include only fully specified path names.
Click here to access my post on Hardening the Oracle database through secured database Initialization parameters

Comments
Post a Comment