On my RHEL6 linux is configured to use MD5 password hashing is the linux usage of MD5 for password hashing considered secure?
1 Answer
While MD5 still maintains its preimage resistance for practical purposes (given the hash, it is difficult to obtain the message), it has a big flaw when used for authentication: its quickness.
Short passwords can be easily discovered, using either a rainbow table (a list containing many common passwords and their respective hashes) or simply a brute-force attack (trying all possible passwords). Modern desktop computers are very good at this. Commercial programs that use your GPU to try multiple passwords in parallel can try billions of passwords per second.
This problem can be solved easily by choosing a password that is long and/or complex enough. Slower algorithms could achieve the same security level with weaker passwords.
Also, an attacker needs either shadow privileges or physical access to the hard drive in order to read the contents of /etc/shadow
(where the hash is stored). This means that anyone who can read the hash doesn't need to crack your password to gain access to your computer. So, if you use your password only on that computer, you have nothing to worry about.
/etc/shadow
file, one has most probably gottenroot
privileges, and then all is lost anyway. One could then e.g. just blank out the password in the file, or use e.g.passwd
to change it to whatever, replace thelogin
binary to log when the user enters the password, just read all users files without restrictions directly, etc. A rooted box is doomed in all security contexts, if the "rooter" is malicious. Not storing it in plaintext at least hinders "accidental" rooters, or something.