Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • How to check current redo log progress redo_progress.sql Oracle
  • How To Transfer Passwords Between Databases (ref note: 199582.1) Oracle
  • ORA-1841 Error Connecting to Upgraded Database After Set PASSWORD_LIFE_TIME Oracle
  • Windows based Command line mailing program like mailx (Sednmail for windows) PHP/MYSQL/Wordpress
  • lck.sql Oracle
  • How to Decide upto what level you can decrement your datafile size. ( Shrink Datafile) Oracle
  • Btee and Bitmap Plans in Oracle 9i and higher Oracle
  • Find Command Linux/Unix
  • EXTPROC Oracle
  • scripts to take listener.log backup Linux/Unix
  • plan10g.sql Oracle
  • SCRIPT TO LIST RECURSIVE DEPENDENCY BETWEEN OBJECTS UTLDTREE.sql Oracle
  • Oracle Data Direct to TAPE Oracle
  • create user with unlimited quota Oracle
  • Load SPM baseline from AWR Oracle

Database link password in user_db_links

Posted on 09-Dec-2009 By Admin No Comments on Database link password in user_db_links

Problem Description:

~~~~~~~~~~~~~~~~~~~~

Database link passwords are stored as plaintext. A database link is a mechanism

used to provide a method of transparently accessing one server from another.

When creating a database link, a user name and password of the account on the remote

server can be specified. Creating the database link without credentials works

only if the user exists on both databases and has the same password.

Once this is done, all queries using the link have the privilege of the

indicated account on the remote server. By omitting an account and password when

creating a database link, the account and password of the user connecting

through the link is used. Indicating the username and password of an account to

use for all connections through a link can lead to passwords being exposed.

Database link passwords until recently (version 10gR1) were stored unencrypted in

the database. Users with SELECT privilege on the SYS.LINK$ table could view the

passwords in plain text. Setting up links to authenticate as the current user

prevents unencrypted passwords from being exposed, prevents linked servers from

being compromised, and provides increased accountability.

Oracle accounts were found with permission to view the table SYS.LINK$. Access

to view the table SYS.LINK$ should be restricted because database link passwords

are stored unencrypted in this table.

Possible Symptoms:

~~~~~~~~~~~~~~~~~~

If you have SELECT ANY TABLE privilege on a database, you can see the password

of the user that can belong to a remote or local database(s) in the SYS.LINK$ table

and using this password, you can connect these remote or local databases at will.

We rely on sys to protect link$. If customers don’t trust a DBA, there are many

things the DBA can do that make any encryption attempt useless.

Important change in the SELECT ANY DICTIONARY system privilege

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In Oracle release 10gR1, the access to SYS.LINK$ was removed from the

SELECT ANY DICTIONARY system privilege (hence the ORA-1031 error), while this

still doesn’t solve the general problem: tools such as Oracle Enterprise Manager

that depend on SELECT ANY DICTIONARY to be available can be deployed without

access to SYS.LINK$.

Workarounds:

~~~~~~~~~~~~

There are no workarounds to protect against this potential vulnerability but

it is possible to use this:

-> Drop the database link and create a link without specifying an account and

passwords.

To drop a database link, execute the command:

SQL> drop database link ;

To re-create a link without hard coding the password, execute the command:

SQL> create database link using ;

-> To revoke permissions from the account or role, execute the following

command:

SQL> revoke select on SYS.LINK$ from ;

Patches:

~~~~~~~~

Currently there is not a patched Installer available to deal with this problem.

One of the workarounds listed above must be used.

It is no more the case under version 10g Release 2 (10.2.0.x), the LINK$ table

now contains a new column PASSWORDX that contains the encrypted database link

password. Details of the encryption scheme will not be disclosed for obvious reasons.

Oracle, SQL scripts

Post navigation

Previous Post: find_err.sql for finding errors from dba_errors.
Next Post: Find_table_size.sql

Related Posts

  • How to see which patches are applied. Oracle
  • Changing Instance Name ( No DB_NAME) Oracle
  • Drop database in Oracle 10g Oracle
  • SCRIPT TO LIST RECURSIVE DEPENDENCY BETWEEN OBJECTS UTLDTREE.sql Oracle
  • Oracle 10g Installation/Applying Patches Tips Oracle
  • My Test Case On 21-OCT-2005 Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (393)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (0)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (342)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • Trace a SQL session from another session using ORADEBUG30-Sep-2025
  • SQL Server Vs Oracle Architecture difference25-Jul-2025
  • SQL Server: How to see historical transactions25-Jul-2025
  • SQL Server: How to see current transactions or requests25-Jul-2025
  • T-SQL Vs PL/SQL Syntax25-Jul-2025
  • Check SQL Server edition25-Jul-2025
  • Checking SQL Server Version25-Jul-2025
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025
  • V$INSTANCE of Oracle in MYSQL24-Jul-2025
  • Day to day MYSQL DBA operations (Compared with Oracle DBA)24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • How to Use DBMS_STATS to Move Statistics to a Different Database Oracle
  • moving lob object to other tablespace lob_mvmt.sql Oracle
  • changing kernel parameter in Oracle Enterpise Linux Linux/Unix
  • Drop tempfiles from database Oracle
  • get_vmstat.ksh Linux/Unix
  • PLSQL Table Syntax 2 Oracle
  • ipcs -l Linux/Unix
  • TNSNAMES entries details Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme