http://www.perlmonks.org?node_id=306612


in reply to Re: Re: Securing Web Apps.
in thread Securing Web Apps.

if your challenge of the day is only changed once per day, once an attacker has sniffed the username and hash, those are all they need to get in for the rest of the day. you can improve it somewhat by including the client's IP address in the hash, but this will cause problems if they're behind a proxy, etc. and it still isn't 100% solid because IP addresses can be spoofed.

the only truly secure way to authenticate over an insecure channel without using encryption is with a zero knowledge proof, but implementing a ZKP is a complex undertaking since it is necessarily interactive and would require sophisticated client-side action. the chances of screwing something up in the implementation and wrecking the security are probably high enough that it's not worth even considering.

if i were you and i were really concerned about security, i would run everything over https and use basic HTTP authentication. it's simple and about as secure and reliable as you're going to get.

also, it sounds like you're storing passwords on the server in some unencrypted form. this is almost always a bad idea.

there's no such thing as perfect security. the best you can do is to make it hard enough to crack that the expense of cracking it would be more than any possible reward that the attacker would get.