Given the circumstance that your server is compromised and the hacker has gained root access (otherwise they could not use the mail_auth_view utility anyway), what is stopping them from executing
and/or
Code:
plesk db "select password from accounts"
to see the hashed password of all users and accounts on your system? (including the encryption algorithm)
As for the bcrypt hash itself - it's considered a very safe algorithm and it's also quite slow, thus making it somewhat hard to brute force.
I also don't get what "generated with PHP" has
anything to do with security or would pose a problem...
@ChristophRo,
First of all, if a server is
fully compromised, then a server is compromised - no need to obfuscate passwords (or not) in that specific scenario.
However, when a server is
not fully compromised, parts of the server can be accessible and that can be enough to reverse engineer hashes.
In fact, bcrypt is not safe at all - takes 2 hours or less to crack a password hash with the right tools, servers and software.
This simple fact, being the
lack of safety, is widely understood and also acknowledged.
Even in PHP, one is advocating and allowing implementation of stronger "hashes".
If you do no grasp the concept of "what PHP has to do with it", then - simply - think of the verify_password function in PHP.
In essence, the verify_password function uses the simple facts that both the prefix and the salt are sufficient to verify the password.
In fact, the whole hash contains the prefix, the salt and the hashed password.
Stated differently, one is simply "safeguarding a password" with the method "I will not tell anybody, I write it down on a sticky note and put that on the PC".
That is not the best method, right?
All of the above is a very very very simple explanation that is really not exhaustive.
Kind regards....
PS1 The prefix $2y$12$ signals hashing with "only" 4096 rounds - this will not scare any attacker. That "cost" of 12 (i.e. 4096 rounds) is also equivalent to the signal that reverse engineering is not impossible within a reasonable time frame.
PS2 Any prefix containing $5$ or $6$ would be a solid signal that it does not make sense to attempt password cracking - if one needs to provide any signal, then it should be a signal of "do not try, do not waste your time" ....... and hence my question (not request!) to obscure the $2y$12$ prefix.