Hi folks,
since a commit some months ago, we actually don't need sha_pass_hash anymore. v and s, which are stored since that commit persistently, are sufficient to authenticate a user.
To explain this issue, I refer to the SRP6 specifications. s is basicly some random number to prevent precalculated attacks and v is something(for detailed information have a look at the specs; it's not really important to understand the math behind it to get my point) to check whether a given password is correct.
It boils down to the following: Everytime a useraccount is created or updates his password, s and v are calculated and stored in the database.
But what about sha_pass_hash? The stanford document doesn't mention it (l is the username=login):
Furthermore, it doesn't mention anything like SHA(UPPER(username):UPPER(password)), which is how sha_pass_hash is calculated. The alarming truth is that MaNGOS' sha_pass_hash is actually SRP's Cleartext Password.
That means, that anybody who has gained reading access to mangos.realmd can authenticate himself using a modified or non-standard client.
The obvious solution is to drop sha_pass_hash and thus enhance security. However, there are two problems which prevented this step:
* Many 3rd party applications use sha_pass_hash to verifiy user passwords. All of them would have to be adapted to use only s and v. I already wrote a php class which handles the cryptography, but it requires the GMP extension.
* There might be accounts which haven't logged in since that commit, thus s and v are null. Because it's impossible to generate them from sha_pass_hash using pure SQL, there would be the need for executing a script before applying the SQL update which drops the column. This would be either a php script or a c++ application.
So what's your opinion? security > usability?