A common way to prevent replay attacks when logging in is for the server to present a challenge (
chall) and request a response in the form
hash(chall+secret) where the secret is already known by the server, and can be determined from the user's password (e.g. password hash).
However, as far as I understand, that means that in the event of a server data breach, the data stored on the server (hashed password) is enough to complete the challenge, nullifying the reason why passwords are stored hashed in the first place.
How can this problem be solved?