19 points · by bdfh42 · 17y ago · 13 comments
It's important not to create new attack vectors that don't already exist when implementing security features.
If you don't throttle accounts that don't exist then a brute force attempt can be used to determine which logins are valid for a given service. This information can then be combined with targeted phishing attacks, etc.
Script for new passwords follows, for the fun of it. I have stuff added afterwards to save the username, website, and password to encrypted files.
#!/usr/bin/env python
import string
from random import Random
okchars = string.letters + string.digits + "!@%^_&*+-"
print ''.join( Random().sample(okchars, 40) )I assume you'd have to just sleep before sending the response. But this could tie up all available threads for processing requests and bring down the site under heavy attack.
i.e., if me simply knowing someone's account name lets me disable their account for the next day or longer, that's a big problem.
The key to preventing DoS attacks is that the throttling is specific to a given host so that when the genuine user attempts to log on (presumably from a different host than the attacker) they can do so without any throttling.
If you are throttling number of login attempts per account then it doesn't matter what the IP address being used is.
Margo: Precisely what you're paid to prevent.
The Plague: Someone didn't bother reading my carefully prepared memo on commonly-used passwords. Now, then, as I so meticulously pointed out, the four most-used passwords are: love, sex, secret, and...
Margo: [glares at The Plague]
The Plague: God. So, would your holiness care to change her password?