News for hackers. Stuff that matters.
Re:Show HN: Passpwn – check passwords in pass against haveib... by jstanley on Saturday February 24, 2018 @06:37AM (#16452846)
This is cool, but doesn't seem to work properly.

I tried it with the passwords "password", "test", "123", "12345" and it didn't report any of them as compromised, which they surely are.

EDIT: It's because it's including a trailing endline before hashing every password. This is a serious bug.

EDIT2: Latest version in the repo does work.

Re:Show HN: Passpwn – check passwords in pass against haveib... by aant on Saturday February 24, 2018 @06:46AM (#16452874)
Oh wow. Can't believe I missed that. Thank you so much! Will fix right away.
Re:Show HN: Passpwn – check passwords in pass against haveib... by jstanley on Saturday February 24, 2018 @06:49AM (#16452880)
I've sent a pull request.

EDIT: Which you've now merged :)

Re:Show HN: Passpwn – check passwords in pass against haveib... by endymi0n on Saturday February 24, 2018 @09:25AM (#16453336)
Quick note that gopass (which is 98% drop-in API compatible with pass) does this out of the box:

https://github.com/justwatchcom/gopass/blob/master/docs/feat...

Re:Show HN: Passpwn – check passwords in pass against haveib... by tex0 on Saturday February 24, 2018 @11:25AM (#16453910)
And it supports checking passwords against the offline dumps as well as the online API. So you can choose convenience or security.
Re:Show HN: Passpwn – check passwords in pass against haveib... by harryf on Saturday February 24, 2018 @11:17AM (#16453877)
So I should check my passwords against some remote API I have no idea who controls to see if they've been compromised? Does this API always return true?
Re:Show HN: Passpwn – check passwords in pass against haveib... by p49k on Saturday February 24, 2018 @11:37AM (#16453974)
It sends the first 5 characters of the SHA-1 hash to the API, which seems reasonable. To be safe, you could check after rotating all your passwords, or I suppose you could download the raw data yourself to check directly.

And the API is controlled by Troy Hunt, not some rando.

Re:Show HN: Passpwn – check passwords in pass against haveib... by ChrisSD on Saturday February 24, 2018 @01:34PM (#16454564)
Troy Hunt and people who work at Cloudflare. But yeah it depends on your threat model. If it's just a random website password than it's probably fine to check. If you're trying to keep secrets from the state then maybe not.
Re:Show HN: Passpwn – check passwords in pass against haveib... by jstanley on Saturday February 24, 2018 @08:45PM (#16456648)
Regardless of your threat model, you can read the code and see how it works. It's short and easy to understand. It doesn't send anything more than the first 5 characters of the SHA1 hash.
Re:Show HN: Passpwn – check passwords in pass against haveib... by ChrisSD on Sunday February 25, 2018 @05:13AM (#16458199)
Sure but that leaks some information about your password. SHA-1 hashes are significantly quicker to compute than a password hash (and rainbow tables exist making it even faster). So the first five characters can be used to narrow the search space.

This is however not likely a real problem unless your threat model includes targeted attacks.

Re:Show HN: Passpwn – check passwords in pass against haveib... by kevlar1818 on Saturday February 24, 2018 @10:34AM (#16453641)
I was also inspired to write one of these:

https://github.com/kevlar1818/is_my_password_pwned

I tried to incorporate Troy Hunt's advice based on the frequency of occurrences in the database.

Re:Show HN: Passpwn – check passwords in pass against haveib... by mbid on Saturday February 24, 2018 @09:28AM (#16453348)
If you're already using a password manager, shouldn't you be using different (random) passwords for every service anyway? What's the point then?

I guess it makes sense to use this if you've begun using a password manager without changing your old passwords. But if possible you should really be doing that instead.

Also, I still don't understand why Troy doesn't use a cryptographically secure hash function instead of SHA1. Say I send the (truncated) hash of one of my passwords to his service and it returns no match in his database. I then consider it secure because it's supposedly not leaked. But shouldn't I really do consider it leaked because I've revealed an insecure hash of it to a third party? What's there to lose with using a secure hash function over SHA1? Surely the one-time cost of hashing the database of passwords is negligible?

Re:Show HN: Passpwn – check passwords in pass against haveib... by jstanley on Saturday February 24, 2018 @10:25AM (#16453589)
Just because you're using a password manager doesn't mean none of the services you have a password on has had a leak. In such case, you'd still want to change your password on that service.
Re:Show HN: Passpwn – check passwords in pass against haveib... by esnard on Saturday February 24, 2018 @09:36AM (#16453379)
Thanks to k-anonimity, you never send the full hash, only the first 20 bits.
Re:Show HN: Passpwn – check passwords in pass against haveib... by mbid on Saturday February 24, 2018 @09:41AM (#16453395)
Yes, I know. It's certainly better to leak only the first eigth of your password than all of it, but it's still not something you should do.
Re:Show HN: Passpwn – check passwords in pass against haveib... by dom96 on Saturday February 24, 2018 @05:46AM (#16452690)
I've done a livestream recently showing the implementation of a similar program in Nim. It's a pretty good first-time project for anyone to try in a programming language they are learning.

Here is the video: https://youtu.be/Di2O_lIPxb4

Re:Show HN: Passpwn – check passwords in pass against haveib... by aant on Saturday February 24, 2018 @05:49AM (#16452698)
That's cool! Thanks for sharing!
Re:Show HN: Passpwn – check passwords in pass against haveib... by bertman on Saturday February 24, 2018 @07:46AM (#16453032)
There's also an implementation as a pass extension: https://github.com/benburwell/pass-audit (I'm not the author)
Re:Show HN: Passpwn – check passwords in pass against haveib... by blakesterz on Saturday February 24, 2018 @07:49AM (#16453044)
Thanks for this!

In case anyone else likes ruby, someone posted a link to a ruby script that does similar checks the other day on HN.

https://gist.github.com/schmich/aeaffac922271a11b70e9a79a5fe...

Re:Show HN: Passpwn – check passwords in pass against haveib... by asdojasdosadsa on Saturday February 24, 2018 @08:18AM (#16453140)
Good work on this, finally a simple way to check if some of my passwords have been compromised ! :) Thanks!
Re:Show HN: Passpwn – check passwords in pass against haveib... by virtuowl on Saturday February 24, 2018 @05:33AM (#16452659)
So i guess this does not work with any salted hashes
Re:Show HN: Passpwn – check passwords in pass against haveib... by aant on Saturday February 24, 2018 @05:48AM (#16452695)
You're right, it doesn't work with salted hashes.