Posted by Grégory Guillou on Dec 13, 2007
Disclaimer: In most countries, looking at user passwords is illegal. Never try what is written below on a system that somebody other than you can access.
Oracle Grid Control documentation warns against leaving the emkey in the Grid Control repository. It says here:
After the emkey has been copied, you must remove it from the Management Repository as it is not considered secure. If it is not removed, data such as database passwords, server passwords and other sensitive information can be easily decrypted.
You may wonder: how easily?
A Bit of Background
When you deal with management tools, you want to collect metrics and run various tasks on different targets. Unless you evolve in an very advanced security infrastructure such as a PKI or another “real” Single Sign-On solution, it’s likely that you’ll need a username/password to connect to a remote server, a remote database, or a remote application server. Because Grid Control enables you to automate a great number of tasks, it has to be able to connect without prompting the users for credentials. In order to do that, it has to know the real passwords because it will itself authenticate on the targets. Because there no magic in there, it has to store these informations in its repository!
As a consequence, if the password you type to connect to the Grid Control is stored in a HASH form only, the one you store in Grid Control to run a task, collect data, or simply avoid typing it when you drill down to a target, has to be reversible. But I guess it’s the same for all management solution.
Let’s Be More Specific
Oracle Management Service 10.2 uses several ways to protect these sensitive data, including Virtual Private Database and Password Encryption.
- To overcome the first one, you have to be able to connect to the database as the
SYS user.
- To overcome the second one, you have to know the encrypted password form, the key, and the associated algorithm.
Obviously, the key used to cipher the password is the emkey. It is located in $OMS_HOME/sysman/config/emkey.ora by default, and it can be generated/configured with "emctl xxx emkey". So the next question is, “Where are stored the ciphered passwords?”.
Read the rest of this entry . . .