7 ms·
What I do: 1. Check the password against the haveibeenpwned.com database. 2. Check the password with the zxcvbn password strength library. If it passes both
by LeoPanthera 7y ago
What I do:
1. Check the password against the haveibeenpwned.com database.
2. Check the password with the zxcvbn password strength library.
If it passes both they can use it. It's not perfect, but it's a lot better than nothing.
- omh 7y agoHow are you implementing these checks? I'm using Active Directory and options for extra password checks are somewhat limited.
- LeoPanthera 7y agoOh sorry I'm not using AD, it's just a web service.
- technion 7y agoMicrosoft has a pwnedpasswords-like service you can use: https://docs.microsoft.com/en-us/azure/active-directory/authentication/concept-password-ban-bad-on-premises https://docs.microsoft.com/en-us/azure/active-directory/auth...
- discreditable 7y ago* If you use Azure Active Directory
- funnybeam 7y agoOn-premises AD has the same functionality but it is a pain to set up and so limited as to be not worth the effort
- omh 7y agoI don't think this (Azure AD Password Protection) actually implements a pwnedpasswords-style check. It lets you upload your own custom list of banned passwords but it's limited to 1000 words. My impression is that this is intended to blacklist common words and things like your company name. I see that Troy Hunt is now working for Microsoft so perhaps there's something in the works related to this. It seems like linking this Azure AD service to the haveibeenpwned API would be pretty straightforward.
- asimops 7y agoYou can use a dll to do additional security checks on a domain controller base. Check this https://github.com/JacksonVD/PwnedPasswordsDLL-API https://github.com/JacksonVD/PwnedPasswordsDLL-API
- discreditable 7y agoThe problem is the password change UI on Windows systems is terrible. It does not give users any clue why their password was not accepted other than "Unable to update the password. The value provided does not meet the length, complexity, or history requirements of the domain."
- shakna 7y agoIf you have the DS-Replication-Get-Changes permission, you can exploit dc-sync through something like mimikatz [0] to grab the password hashes out of Active Directory, so you can run your checks. [0] https://github.com/gentilkiwi/mimikatz https://github.com/gentilkiwi/mimikatz
- tomglynch 7y agoI don't think checking against haveibeenpwned is a good idea. They recommend against checking your current password, and you're automatically checking every users current password?
- bscphil 7y agoYou can download a database from haveibeenpwned of SHA-1s of all the passwords, which is the only way you should be checking user passwords against an external database. It's also a good way!
- fwip 7y agoDownloading the database is best, but you can also safely use their range API [1]. This can be run either client-side or server-side. I built a toy webpage using the API [2], and you can see how straightforward the API is to use by checking the script [3]. [1] https://haveibeenpwned.com/API/v2#SearchingPwnedPasswordsByRange https://haveibeenpwned.com/API/v2#SearchingPwnedPasswordsByR... [2] https://safepasswordchecker.hashbase.io/ https://safepasswordchecker.hashbase.io/ [3] https://safepasswordchecker.hashbase.io/script.js https://safepasswordchecker.hashbase.io/script.js
- LeoPanthera 7y agoThe check is done locally against a hash. There's no risk of leaking the password.
- tomglynch 7y agoOk, that is fair. I thought you were skipping this rule from Troy Hunt (HIBP creator): "Do not send any password you actively use to a third-party service - even this one!"
- lysp 7y agoFrom memory their system works by a using a partial-hash, minimising the leak of the password. So for: * Password: trustno1 * Hash: 1234567890abcdefghij You send to the api: * Hash: 12345 And it returns all hashes it knows of that start with 12345 along with a count of how many times each hashed password has been breached. You then compare that list to see if your full hash exists in there. If it exists - it's been breached. If not - you're clear.