by skeeks · 4y ago · 0 comments
After initially setting a password, the database/server should only store a salted hash.
No exceptions.
Are you actually doing client-side hashing in addition to hashing on the server side? Otherwise, yes, the server does see the password. In most applications, a compromised server could just serve a login page that doesn't do the client-side hashing anymore if the malicious actor wanted to collect credentials, so I don't see how this added complexity is really adding any security.
The real way to add more security is to minimize dependence on passwords by implementing a better, second factor of authentication, such as TOTP, WebAuthn, SSO, or even SMS or email tokens. Unless a person is using a password manager to generate their passwords, then passwords are almost always terrible and weak, and usually reused across sites. More of my opinion is shared over here[0].
That takes much more time and requires the attacker to be able to, unnoticed, change the served data.
Usually it is stored in memory only long enough to compare it to the hashed version from the persistence layer but... that's in theory.
I can selectively deauth a user to make them login again in short order and take his password.
It depends on the level of compromise, of course.
Strong hashes are the way to go.