News for hackers. Stuff that matters.
Re:Passwords for 32M Twitter accounts may have been hacked a... by andrewmunsell on Thursday June 09, 2016 @02:52AM (#11867957)
It would allow you to bruteforce the passwords without any sort of rate limiting. So, if you used a dictionary, you probably could get quite a few weak passwords in a short amount of time relative to a system that had proper rate limiting to prevent these kinds of attacks.
Re:Passwords for 32M Twitter accounts may have been hacked a... by cm2187 on Thursday June 09, 2016 @04:17AM (#11868177)
Depends what you mean by short amount of time. Depending on the strength selected with bcrypt, it can easily take a second to check a hash. On a 30m password database, this will take a year on one machine to check just who is using "monkey" as a password.
Re:Passwords for 32M Twitter accounts may have been hacked a... by jfindley on Thursday June 09, 2016 @07:38AM (#11868709)
You're massively overestimating the strength of bcrypt here. olcHashcat on a single modern GPU will do several thousand hashes per second, depending on work factor and GPU speed.
Re:Passwords for 32M Twitter accounts may have been hacked a... by lkbm on Thursday June 09, 2016 @09:28AM (#11869204)
> depending on work factor

Right, but therein lies the strength of bcrypt. You can set it so it will be several thousand per second, or several seconds per thousand. This comment seems a little like saying "I can run faster than a car, depending on how hard you press the accellertor."

Re:Passwords for 32M Twitter accounts may have been hacked a... by jfindley on Thursday June 09, 2016 @09:57AM (#11869383)
The work factor also increases the work the server has to do to handle users logging on, which is a big cost both in UX and hosting fees. In practice, reasonable work factors for bcrypt are between 10 and 12. What application could tolerate a full second of delay (and 100% usage of a server core) just to hash the users password?

Also, a few thousand hashes per second (and that's on a GPU, and bcrypt is decidedly GPU unfriendly due to memory allocation patterns) won't allow you to do much more than a dictionary / rule + dictionary attack, so in the short term you're only going to get weak passwords.

Re:Passwords for 32M Twitter accounts may have been hacked a... by cm2187 on Thursday June 09, 2016 @11:54AM (#11870214)
I don't think anyone has any expectation that a login should be as fast as any other page load. Same thing for authorising a payment. I don't think a 1 sec delay when authenticating is unreasonable.

To me the risk with using bcrypt is DOS. If you have a high work factor, all an attacker has to do is to run a lot of logon (no need to be successful, they just need to relate to real users) to sink your servers.

Re:Passwords for 32M Twitter accounts may have been hacked a... by giovannibajo1 on Thursday June 09, 2016 @01:46PM (#11870990)
No matter what you do, you always need to have a rate limiter / DOS mitigation for your login APIs / pages.
Re:Passwords for 32M Twitter accounts may have been hacked a... by seanwilson on Thursday June 09, 2016 @12:50PM (#11870583)
> The work factor also increases the work the server has to do to handle users logging on, which is a big cost both in UX and hosting fees. In practice, reasonable work factors for bcrypt are between 10 and 12. What application could tolerate a full second of delay (and 100% usage of a server core) just to hash the users password?

Is there a way client side processing power could be leveraged to help calculate the final hash value so that the computational cost could be practically increased?

I'm aware that having the client calculate and send the final hash value by themselves is a bad idea though.

Re:Passwords for 32M Twitter accounts may have been hacked a... by facepalm on Thursday June 09, 2016 @07:57AM (#11868782)
Then why even bother with bcrypt?
Re:Passwords for 32M Twitter accounts may have been hacked a... by jfindley on Thursday June 09, 2016 @08:12AM (#11868834)
Because something with a cryptographic hash, like sha256, you can do millions (or in some cases billions) of hashes per second on the same GPU.

Password hashes, like bcrypt, PBKDF2 and scrypt, are massively slower. That doesn't mean they're uncrackable, it just means they are expensive to crack, so a strong password in a well implemented password hash will take a long time (and cost a lot of money) to crack, by which time the user has hopefully noticed and had time to change their password.

Re:Passwords for 32M Twitter accounts may have been hacked a... by _asummers on Thursday June 09, 2016 @09:02AM (#11869063)
Additionally, there's a new player in town called Argon2 that attempts to solve the problems with bcrypt and scrypt. It's the most recent winner of the password hashing competition.

https://github.com/P-H-C/phc-winner-argon2

Re:Passwords for 32M Twitter accounts may have been hacked a... by kerkeslager on Thursday June 09, 2016 @09:33AM (#11869235)
What problems with bcrypt/scrypt does argon2 solve?
Re:Passwords for 32M Twitter accounts may have been hacked a... by jfindley on Thursday June 09, 2016 @10:07AM (#11869441)
bcrypt is limited to 72 characters (admittedly this is not that big a practical limitation), and scrypt is an excellent KDF, but wasn't designed as a password hash, and thus doesn't have great GPU defence. In practice, they're still both great, but that doesn't mean we should stop trying to do even better.

Argon2 looks really interesting, but it is still relatively new.

Re:Passwords for 32M Twitter accounts may have been hacked a... by huxley on Thursday June 09, 2016 @12:55PM (#11870615)
If someone isn't ready to go with Argon2 and truncating past 72 characters is an issue, Django (and possibly other implementations that I'm not aware of) overcome that by first hashing the password with SHA256 before passing it to bcrypt.
Re:Passwords for 32M Twitter accounts may have been hacked a... by baby on Thursday June 09, 2016 @03:11PM (#11871571)
> scrypt is an excellent KDF, but wasn't designed as a password hash, and thus doesn't have great GPU defence

Last time I heard of scrypt, it was being used in Litecoin, a fork of bitcoin, because it was preventing GPU based crackers.

Re:Passwords for 32M Twitter accounts may have been hacked a... by Forbo on Thursday June 09, 2016 @03:41PM (#11871774)
I don't know if it has anything to do with GPUs, I had thought it was due to memory, as referenced on the wiki page for Litecoin: "Litecoin uses scrypt in its proof-of-work algorithm, a sequential memory-hard function requiring asymptotically more memory than an algorithm which is not memory-hard."
Re:Passwords for 32M Twitter accounts may have been hacked a... by Someone1234 on Thursday June 09, 2016 @10:10AM (#11869468)
It rate limits via IO (specifically memory IO) rather than processing power (CPU/GPU).
Re:Passwords for 32M Twitter accounts may have been hacked a... by kerkeslager on Thursday June 09, 2016 @01:21PM (#11870805)
Ah, that's interesting enough to be worth looking into.
Re:Passwords for 32M Twitter accounts may have been hacked a... by lurkinggrue on Thursday June 09, 2016 @06:00PM (#11872697)
Yes if your password looks like: z1c4KzC*ITtt4Ka%vVDeei!aFSuEOTiDFCJ2NXc8Z7Jz then we are looking at enough time for you as a user to not care.
Re:Passwords for 32M Twitter accounts may have been hacked a... by sdlion on Thursday June 09, 2016 @11:14AM (#11869904)
When you have a massive leak, it's better to have under 10 angry users about that they have been hacked (increasing at a slow pace) than most of your userbase raging at you and leaving your service.
Re:Passwords for 32M Twitter accounts may have been hacked a... by ams6110 on Thursday June 09, 2016 @04:06PM (#11871952)
If you're not trying to crack the 30m passwords, but focused on one, and especially if you might have some other clues about what that password might be, it could take a very short amount of time.
Re:Passwords for 32M Twitter accounts may have been hacked a... by fit2rule on Thursday June 09, 2016 @04:52AM (#11868254)
> it can easily take a second to check a hash

On what hardware?

Re:Passwords for 32M Twitter accounts may have been hacked a... by adrianmsmith on Thursday June 09, 2016 @07:00AM (#11868589)
With bcrypt you can set a parameter which determines how slow it is. So if hardware gets faster, you can change the parameter. (brcrypt uses 2^n iterations where n is the parameter.)

So it doesn't matter on what hardware, if you want bcrypt to take 1 second on modern hardware (for any value of "modern"), you can.

Re:Passwords for 32M Twitter accounts may have been hacked a... by nilved on Thursday June 09, 2016 @07:35AM (#11868701)
But 1 second of CPU time on your Web server is a lot different than 1 second of CPU time on a supercomputer.
Re:Passwords for 32M Twitter accounts may have been hacked a... by nathan-wall on Thursday June 09, 2016 @08:59AM (#11869044)
Or 1 second of GPU time. Or 1 second of time running on an ASIC.
Re:Passwords for 32M Twitter accounts may have been hacked a... by Unklejoe on Thursday June 09, 2016 @08:39AM (#11868934)
It seems like implementing a security strength which is a function of the current practical CPU speed is a recipe which could lead to disaster in the future, mainly because of how reluctant some companies are to change existing systems once they are in place.

The concept actually makes sense, but it kind of assumes that the strength of the security will be increased at the same rate of which technology progresses, which I don’t think will always be the case. This is especially true when you consider potential “bursts” in computation speed progression.

That being said, I’m not implying that I have a better idea. Running algorithms that take 30 seconds to execute isn’t going to work for logging into your Twitter account either.

Re:Passwords for 32M Twitter accounts may have been hacked a... by tracker1 on Thursday June 09, 2016 @05:42PM (#11872617)
Depends on how you design your password system... once upgraded a password system by putting a marker with the pwd for newer encoding... this way it can be upgraded as users login.. after n% of users have rolled to the new system, or x days, you can disable the other accounts and require they reset/recover their password for use.
Re:Passwords for 32M Twitter accounts may have been hacked a... by DasIch on Thursday June 09, 2016 @07:59AM (#11868786)
Chances are that you can't afford the most modern hardware. An attacker at least temporarily can probably afford more than you can. If you configure bcrypt so that an attacker spends 1s, it will be to slow to be practical for you.
Re:Passwords for 32M Twitter accounts may have been hacked a... by sokoloff on Thursday June 09, 2016 @10:01AM (#11869405)
Yes, but even if you allow it to only take 1ms per check for an attacker, it's still practical for you and will take an attacker 4 minutes per account to check all of /usr/share/dict/words (to say nothing of the "add a 1 or a ! at the end"), so long as you are using random per-account salt (which bcrypt basically guides you towards).

Make it 15ms for an attacker and it becomes an hour per account just for the dictionary.

Re:Passwords for 32M Twitter accounts may have been hacked a... by DasIch on Thursday June 09, 2016 @11:39AM (#11870100)
True but in reality an attacker won't just use any dictionary. They look at password leaks, figure out what passwords people are actually using and what the most popular ones are.

You also can't assume that all accounts are equally valueable. An attacker might very well prioritize some of them.

This doesn't render all of this useless but I think you shouldn't consider even best solutions out there to be anything else than a temporary barrier. It's a good one and you probably will have enough time to change your password after a leak but you really do need to change your password within a week or so.

Re:Passwords for 32M Twitter accounts may have been hacked a... by cm2187 on Thursday June 09, 2016 @05:15AM (#11868314)
An i7 laptop. But even if you use an 18 cores server, it doesn't really change the point. It might take a month instead of a year. But it still doesn't scale, even to only check the most common passwords.
Re:Passwords for 32M Twitter accounts may have been hacked a... by iagooar on Thursday June 09, 2016 @05:26AM (#11868333)
How can you say it doesn't scale? You just need to spin up a cluster that is powerful enough to get down to let's say a week. The cost of this would be a joke for a company / institution of a certain size.
Re:Passwords for 32M Twitter accounts may have been hacked a... by matthewmacleod on Thursday June 09, 2016 @06:35AM (#11868525)
It does technically scale, just like everything else :)

But I think the parent's point was that this compute time only lets you check one password against one account. All you can do, after this compute time, is state that "'monkey' is/ is not the correct password for @iagooar's account".

Those results can't be used to check other accounts (because they're salted) so this approach doesn't really scale well at all. It might, for a huge adversary (state-scale) allow a single password to be cracked in a reasonable timeframe, iff it's relatively simple password.

Re:Passwords for 32M Twitter accounts may have been hacked a... by cmdrfred on Thursday June 09, 2016 @05:46AM (#11868385)
1 week only tests 1 password. It would have to run for years to get a decent set of results. I don't see how a company can afford all that hardware and power to do something that is illegal to begin with. How do they monetize it to get a return?
Re:Passwords for 32M Twitter accounts may have been hacked a... by kalleboo on Thursday June 09, 2016 @07:44AM (#11868735)
> I don't see how a company can afford all that hardware and power to do something that is illegal to begin with.

An evildoer would use stolen credentials, stolen credit cards, or stolen hardware (botnets).

Re:Passwords for 32M Twitter accounts may have been hacked a... by iagooar on Thursday June 09, 2016 @06:34AM (#11868520)
And don't forget, that every 18 months, the amount of processing power you get for a modest price, doubles.
Re:Passwords for 32M Twitter accounts may have been hacked a... by marcosdumay on Thursday June 09, 2016 @08:16AM (#11868850)
Not anymore.

It's hard to get specific numbers about a trend that just changed. But the double every 18 months is now clearly wrong.

We've got a couple of approximately 27 months doubling, but that is past too. My bet is that we won't get a fixed number ever again.

Re:Passwords for 32M Twitter accounts may have been hacked a... by tracker1 on Thursday June 09, 2016 @05:45PM (#11872631)
I'm not sure the fastest per core speed for the last 5 years in CPUs is significantly faster.. more cores, more caches for some operations, but not nearly the growth we used to see.
Re:Passwords for 32M Twitter accounts may have been hacked a... by cm2187 on Thursday June 09, 2016 @07:18PM (#11873106)
Well, I was surprised by these benchmarks: http://www.anandtech.com/show/10404/asrock-deskmini-110-mini... When you compare the skull canyon CPU and the i5 6500: http://ark.intel.com/compare/93341,88184 The i5 has better specs on pretty much any aspect, but the skull canyon does way better in those benchmarks. I am told the impact is the 128MB eDRAM which acts as a L4 cache.

So maybe that's the way for computers to become much faster, making everything around the CPU go faster. Integrate the RAM and the GPU on the chip. Superfast SSDs. Etc.

Re:Passwords for 32M Twitter accounts may have been hacked a... by cmdrfred on Thursday June 09, 2016 @08:44AM (#11868963)
Let's say that were true, so in a year and half you will only have to spend 20 years cracking the passwords? Bcrypt is designed for this exact situation and performs pretty well.
Re:Passwords for 32M Twitter accounts may have been hacked a... by iagooar on Thursday June 09, 2016 @10:41AM (#11869663)
I am not saying bcrypt is bad. But thruth is, we have to be constantly challenging our assumptions about security and avoid feeling like the battle is "won".
Re:Passwords for 32M Twitter accounts may have been hacked a... by nikbackm on Thursday June 09, 2016 @06:59AM (#11868581)
Still?
Re:Passwords for 32M Twitter accounts may have been hacked a... by iagooar on Thursday June 09, 2016 @06:34AM (#11868516)
You just need to target certain accounts, no need for all.
Re:Passwords for 32M Twitter accounts may have been hacked a... by creshal on Thursday June 09, 2016 @06:41AM (#11868537)
https://gist.github.com/epixoip/a83d38f412b4737e99bbef804a27...

107 kHashes/second/machine for bcrypt in default settings (which probably many sites will use).

Re:Passwords for 32M Twitter accounts may have been hacked a... by cm2187 on Thursday June 09, 2016 @07:09AM (#11868616)
In the comment at the bottom it says: bcrypt work factor is 5, scrypt work factor is N=1024 r=1, and PBKDF2 rounds are set to 1,000.

If they did indeed use a work factor of 5 then this analysis is pretty much meaningless for bcrypt. The default is 10 and I usually use 12 myself.

Re:Passwords for 32M Twitter accounts may have been hacked a... by rmc on Thursday June 09, 2016 @12:50PM (#11870585)
"a second to check a hash" is a long time, but that's 3,600 attempts per hour. With rate limiting you can bring that down to 10 attempts per hour.
Re:Passwords for 32M Twitter accounts may have been hacked a... by paulmd on Thursday June 09, 2016 @02:00PM (#11871112)
Presumably your users don't want to wait 6 minutes to log in, and nor do you want to tie up a full core for 6 minutes running the hash. That's the problem with increasing bcrypt's work factor - you have to deal with the increased difficulty too.

If you're doing salting properly (a unique CSPRNG-generated salt for every user) then 3600 attempts per hour really isn't enough to get anything except the lowest of low-hanging fruit.

Re:Passwords for 32M Twitter accounts may have been hacked a... by Olscore on Thursday June 09, 2016 @02:53AM (#11867962)
Ah derp. Totally forgot about rate limiting. Thank you.
Re:Passwords for 32M Twitter accounts may have been hacked a... by sintaxi on Thursday June 09, 2016 @03:49AM (#11868113)
I thought bcrypt was a deliberately slow algorithm so it cant necessarily be brute forced.
Re:Passwords for 32M Twitter accounts may have been hacked a... by WA on Thursday June 09, 2016 @04:00AM (#11868145)
But still much faster than an HTTP request to an Auth API that allows only, say, 5 requests per minute.
Re:Passwords for 32M Twitter accounts may have been hacked a... by Olscore on Thursday June 09, 2016 @04:01AM (#11868148)
Right, but you would still bypass the rate limiting of the server whether that be login attempts, http requests per second, firewall rules, latency or whatever when checking.
Re:Passwords for 32M Twitter accounts may have been hacked a... by dogma1138 on Thursday June 09, 2016 @05:36AM (#11868356)
That's another rate limiting that has nothing to do with the hash strength.

Good password hashing functions have internal rate limits that reduce the likelihood of anyone being able to break the hashes easily because they will be expensive even when fully implemented in hardware.

For how long are they resilient it's another question but bcrypt is pretty good, it's quite slow, and is expensive to implement in ASIC/FPGA.

Re:Passwords for 32M Twitter accounts may have been hacked a... by sintaxi on Friday June 10, 2016 @08:32PM (#11881294)
This is what I was thinking about. Thanks.
Re:Passwords for 32M Twitter accounts may have been hacked a... by xerophyte12932 on Thursday June 09, 2016 @04:19AM (#11868186)
wouldn't the slowness of bcrpyt be a hindrance enough? Of course rate limiting is a much greater barrier, but I thought the whole point of using bcrypt is that its naturally slow and prevents checking several passwords in a short time
Re:Passwords for 32M Twitter accounts may have been hacked a... by TACIXAT on Thursday June 09, 2016 @08:52AM (#11869000)
You can set the work factor (log rounds). Bcrypt is also cool because it doesn't scale well to GPUs, so it's still pretty slow even if you have decent hardware.

The rounds are a trade off between how long your users will wait to login and how strong the hashes will be. The current recommendation is between 8 and 12 depending where you look. The best practice is to just check on the system you are running, I usually aim for the number of rounds nearest a half a second.

Re:Passwords for 32M Twitter accounts may have been hacked a... by imdsm on Thursday June 09, 2016 @03:19AM (#11868024)
You'd still need the salt though, right?
Re:Passwords for 32M Twitter accounts may have been hacked a... by valleyer on Thursday June 09, 2016 @03:27AM (#11868046)
The salt is typically stored with the hashed value. Its purpose is simply to prevent you from being able to use a single dictionary attack on all users.
Re:Passwords for 32M Twitter accounts may have been hacked a... by andruby on Thursday June 09, 2016 @03:54AM (#11868128)
The salt is usually stored with the hash. It prevents using pre-calculated rainbow tables. Without a salt you can check a password guess against all passwords. With a salt you can only test the guess against a single password.
Re:Passwords for 32M Twitter accounts may have been hacked a... by 15155 on Thursday June 09, 2016 @03:24AM (#11868039)
Bcrypt salts are ordinarily colocated with the hashes and the number of rounds used to compute them.