How are passwords stored in Oracle?
In Oracle Database, passwords are never stored as plain text. Instead, Oracle uses a one-way hashing process to convert your password into a fixed-length string of gibberish that can't be reversed.
When you log in, Oracle hashes the password you just typed and compares it to the hash stored in the system.
The hashes are stored in the data dictionary, specifically in a "base table" called SYS.USER$.
PASSWORD column: Stores the old, legacy 10g hashes.
SPARE4 column: Stores the modern, secure 11g and 12c hashes (this column is a "secret" hiding spot for the more complex data).
You can see which versions your users have by querying the public view:
SELECT username, password_versions FROM dba_users;
Oracle has updated its hashing algorithms over the years to keep up with faster computers and more advanced hackers.
Algorithm: DES (Data Encryption Standard).
Flaw: It converted everything to uppercase before hashing.
Status: Deprecated. Modern Oracle databases (19c, 21c, 23c) run in "Exclusive Mode" by default, which blocks these old hashes entirely.
Algorithm: SHA-1 (Secure Hash Algorithm 1).
Improvement: Introduced Case Sensitivity and Salting.
What is Salt? A "salt" is a random string added to your password before hashing.
Algorithm: SHA-512.
Why it's better: It creates a much longer, 512-bit hash.
Oracle calls these stored hashes Verifiers. In the SPARE4 column, a 12c verifier looks like a long string starting with S: and T:.
S: Represents the SHA-1 hash.
T: Represents the SHA-512 hash.
People often use these terms interchangeably, but they are very different:
Encryption is a two-way street.
Hashing is a one-way street.
Kill the 10G Hashes: Ensure your SQLNET.ORA has SQLNET.ALLOWED_LOGON_VERSION_SERVER=12. This forces the database to use only the most secure SHA-512 hashes.
Password Profiles: Use Oracle Profiles to enforce complexity (e.g., must contain a symbol, a number, and be at least 12 characters).
Rotate Passwords: Periodic changes ensure that even if a hash is being cracked in the background, it becomes useless once the user changes their password.
Oracle stores passwords as salted hashes in the SYS.USER$ table. Over time, these have evolved from simple DES hashes to highly secure SHA-512 verifiers.