News for hackers. Stuff that matters.
Re:Yahoo discloses hack of 1B accounts by alyandon on Wednesday December 14, 2016 @05:21PM (#13180217)
"Separately, we previously disclosed that our outside forensic experts were investigating the creation of forged cookies that could allow an intruder to access users’ accounts without a password. Based on the ongoing investigation, we believe an unauthorized third party accessed our proprietary code to learn how to forge cookies."

So that exactly explains how my Yahoo account was used to send spam despite having a password that can't be reasonably brute forced (despite them using MD5). :-/

Re:Yahoo discloses hack of 1B accounts by dsl on Wednesday December 14, 2016 @06:48PM (#13180897)
The forged cookie attack was used on a limited number of accounts, by a state sponsored actor. Going to this amount of effort and then sending spam would be on par with breaking into a bank just to steal the printer paper from the office.

Most likely either: 1) you were phished and didn't realize it 2) logged in to your Yahoo account from a device that had malware on it

Re:Yahoo discloses hack of 1B accounts by joering2 on Wednesday December 14, 2016 @07:03PM (#13180991)
> just to steal the printer paper from the office

Or stealing $6,000 with $100,000 gun :)

http://www.fenrir.com/free_stuff/columns/callcops/ctc-436.ht...

Re:Yahoo discloses hack of 1B accounts by alyandon on Wednesday December 14, 2016 @07:32PM (#13181180)
I'm willing to accept that perhaps that was not how my account was compromised but the time frame when this happened was well in line for when this breach supposedly occurred.

Regardless, it was some sort of automated spam/phishing emails that were sent from Yahoo's network using my account to contacts on my list. I analyzed the headers of multiple bounced messages that were sent to email addresses no longer in use and confirmed the origin of the traffic.

I'm not going to fall for a phishing attack and I only access email from devices I personally control. Could one of them had some sort of malware infection? I guess it is possible but I am security conscious and it is highly unlikely. I also would expect a hacker that has compromised one of my devices would be far more interested in using my banking credentials than using my Yahoo account to send spam.

Re:Yahoo discloses hack of 1B accounts by mike_hearn on Thursday December 15, 2016 @04:32AM (#13183445)
You reused the password on other websites, I'm guessing. Especially likely if it was a strong (i.e. hard to memorise) password.

The bulk hacking attacks that began around Spring 2010 hit all the big webmail providers. The source of the passwords was always, without fail, reversed hashes from breakins at other big websites:

https://googleblog.blogspot.ch/2013/02/an-update-on-our-war-...

Source: was a tech lead on the Google anti-hijacking team during this period.

Re:Yahoo discloses hack of 1B accounts by alyandon on Thursday December 15, 2016 @09:53AM (#13184921)
Nope, not password re-use either. I learned that lesson the hard way over a decade ago.

Regardless, it's something that has always continued to eat at me since I can't say for certain how it happened.

Re:Yahoo discloses hack of 1B accounts by 0x0 on Wednesday December 14, 2016 @06:45PM (#13180871)
Are you sure they actually logged in to your account to send spam (are the spam emails visible in your sent folder), or could it be that someone is just spoofing the SMTP MAIL FROM / email From: header?
Re:Yahoo discloses hack of 1B accounts by alyandon on Wednesday December 14, 2016 @07:37PM (#13181204)
As far as I can tell it wasn't someone spoofing my email address. Emails were sent to people on my contact list and the numerous bounce messages to contacts that no longer had valid email addresses confirmed the origin of the traffic.
Re:Yahoo discloses hack of 1B accounts by Buge on Wednesday December 14, 2016 @10:55PM (#13182261)
It's possible that a contact of yours was compromised, and that contact had many contacts in common with you. And then they spoofed your address.
Re:Yahoo discloses hack of 1B accounts by alyandon on Thursday December 15, 2016 @09:54AM (#13184939)
That's a good theory but in my case the sets of common contacts would be almost nil for that account.
Re:Yahoo discloses hack of 1B accounts by Dr0Dre on Wednesday December 14, 2016 @06:59PM (#13180976)
I had the same issue, I could see the email sent from sent folder. This happened about year ago and I was very surprised.
Re:Yahoo discloses hack of 1B accounts by cptskippy on Wednesday December 14, 2016 @06:56PM (#13180953)
Given Yahoo's security policies, whose to say someone wasn't just sending it from Yahoo's SMTP servers without any access to user's email accounts?
Re:Yahoo discloses hack of 1B accounts by ubercore on Wednesday December 14, 2016 @05:51PM (#13180459)
What do you mean by a password that can't be reasonably brute forced?

EDIT: To clarify, I mean specifically with md5. I'm by no means an expert, just curious because I had considered md5 so broken that this comment caught my attention.

Re:Yahoo discloses hack of 1B accounts by parenthephobia on Wednesday December 14, 2016 @06:40PM (#13180845)
Rumours of MD5's death have been greatly exaggerated.

MD5's weakness is that it's (relatively) easy to produce two strings which have the same hash. However, given an MD5 hash, it's not easy to produce a string which also has that hash.

In principle, one could intentionally construct two passwords which have the same hash. It's hard to see how that could be exploited maliciously - any attacker knows both passwords to begin with. Even then, making colliding strings that would make acceptable passwords hasn't been done yet, AFAIK: the shortest colliding strings found so far are 64 bytes long and contain several unprintable characters.

OTOH, computers are fast enough now that brute-forcing MD5 is practical for short strings with a limited set of characters, which is what passwords tend to be. One should use algorithms like PBKDF2, scrypt, and bcrypt which can increase their complexity as the computation capacity of potential attackers increases. This isn't because of a particular weakness in MD5, though, and one should equally avoid storing passwords as SHA-512 hashes, say.

The thing you definitely shouldn't use MD5 for is digitally signing a file you didn't make, because it's possible that whoever did make it also made another file with the same MD5 hash, for which your signature would also be valid.

Re:Yahoo discloses hack of 1B accounts by manquer on Thursday December 15, 2016 @12:02AM (#13182563)
On a side note: You can use such crafted strings as a black box testing tool to verify if a site does infact use md5 or other weak algorithms to store the passwords. This can perhaps be used in conjunction with other factors to craft an attack.

As a corrollary this can also be used as a testing tool by anyone for any third party site to determine known vulenrablities in their password storage

Re:Yahoo discloses hack of 1B accounts by ergot on Sunday December 18, 2016 @10:25AM (#13206096)
Re:Yahoo discloses hack of 1B accounts by terrib1e on Wednesday December 14, 2016 @06:41PM (#13180851)
Definitely check this episode of 'Hacked' out for a simple overview. I just started listening to this show. It's a shame there are so few episodes.

http://www.hackedpodcast.com/episode-3-the-problem-with-pass...

Re:Yahoo discloses hack of 1B accounts by metafunctor on Wednesday December 14, 2016 @05:58PM (#13180513)
A preimage attack for MD5 has complexity of about 2^123. So, even if you get the MD5 hash for a password, it will be exceedingly hard to find a password that has the same hash (assuming the original password is long and random).
Re:Yahoo discloses hack of 1B accounts by jlarocco on Wednesday December 14, 2016 @06:53PM (#13180925)
I don't think that's true.

This site from 2006 claims they could find collisions in an average of 45 minutes on a 1.6 Ghz Pentium 4: http://www.bishopfox.com/resources/tools/other-free-tools/md...

If you account for speed increases over the last 10 years and assume the password thief has access to a botnet, then it wouldn't surprise me if they've found collisions for the entire list.

Edit: Nevermind, the link finds two strings that hash to the same thing; it does not find a string that hashes to an existing hash.

Re:Yahoo discloses hack of 1B accounts by metafunctor on Wednesday December 14, 2016 @06:56PM (#13180954)
The collision generator behind that link does not implement a preimage attack (given a string X, come up with another string Y with the same MD5 hash).

Instead, it implements the much easier collision attack (come up with two strings that have the same MD5 hash).

Re:Yahoo discloses hack of 1B accounts by JonDav on Wednesday December 14, 2016 @06:15PM (#13180668)
I thought the whole point of the MD5 vulnerability was that the limit was 2^128 and as such there are more inputs that possible output hashes, meaning more possible input collisions.
Re:Yahoo discloses hack of 1B accounts by metafunctor on Wednesday December 14, 2016 @06:49PM (#13180898)
All hash functions have collisions. The point is that a good cryptographic hash function makes it very hard to find collisions.

The “preimage attack” on a cryptographic hash function tries to find a message that has a specific hash value. That is, you lock down a hash value (the MD5 hash for a password) and try to find a message that hashes to that value (the original password, or any other input that happens to have the same hash).

The best known preimage attack against MD5 has complexity 2^123. It's better than brute forcing, but still unpractical. Thus, if I come up with a good password that is long and random, you will have a very hard time coming up with a string that has the same MD5 hash value.

The practical attacks against MD5 are collision attacks. A collision attack tries to find two messages with the same hash value. With MD5 in particular, there's a chosen prefix collision attack, where you choose two messages and append to them so that the hashes will match. This was particularly devastating with X.509 signatures and certificates, where the attacker could have the MD5 hash signed by a certificate authority, and then use the same signature with their other message that has the same MD5 hash.

Re:Yahoo discloses hack of 1B accounts by bartl on Thursday December 15, 2016 @08:05AM (#13184290)
What about Rainbow Tables? (https://en.wikipedia.org/wiki/Rainbow_table#Precomputed_hash...)

Instead of computing the MD5 of a huge number of passwords looking for a match, you simply store the precomputed password and hash pairs in a database table.

Re:Yahoo discloses hack of 1B accounts by metafunctor on Thursday December 15, 2016 @08:38AM (#13184468)
A rainbow table is just a precomputed table of hashes for a lot of passwords. Some tricks are used to make the table smaller, but you can think of it as just a lookup table. Only the passwords that were precomputed and put into the table will be found.

Rainbow tables are usually computed for short passwords (1-10 characters) and limited character set (say, alphanumerics). They are good for finding the bad passwords if you get your hands on a set of MD5 hashed passwords. But they are of no help if you need to reverse a good, long, random password.

Re:Yahoo discloses hack of 1B accounts by geofft on Wednesday December 14, 2016 @07:11PM (#13181042)
Every hash has a finite output length, and therefore a finite number of possible outputs. 2^128 is a very large finite number. It's not that large in the grand scheme of things (there are over 2^260 or so atoms in the universe), and it's definitely better to use a hash with 2^256 outputs now that there exist good 256-bit hashes that are faster than MD5, but 2^128 is still quite a large number. The internets are quoting me about 10 billion hashes per second on a good GPU from a few years ago, which comes out to about one sextillion years to find an input for every possible output. (It divides linearly if you have more GPUs, but that clearly won't help very much.)

What's broken about MD5 is that, due to an algorithmic flaw, it's very easy to generate two inputs of your choice that have a matching output. That's great if you want to do things like spoof an SSL certificate (you generate two certificate signing requests, get one of them signed, apply the signature to the other), but not directly helpful for attacking a password hash where someone else chose the password.

What is conceptually broken is that such an algorithmic flaw exists, and also due to algorithmic flaws it takes a bit under 2^128 tries to find an input for a specific possible output. That worries mathematicians, because it's a sign the hash isn't behaving as randomly (speaking informally) as one would hope, and that people are starting to understand its structure. If that understanding continues, it might be broken more in the future, so you absolutely shouldn't build new systems on MD5 because we expect the research to happen at some point.

But, at least today, it's still true that you can have a password that can't be brute-forced despite the use of MD5. Maybe someone will present a paper tomorrow that disproves that.

Re:Yahoo discloses hack of 1B accounts by kreetx on Thursday December 15, 2016 @04:20AM (#13183417)
This is a very clear explanation, thanks!
Re:Yahoo discloses hack of 1B accounts by semicolon_storm on Wednesday December 14, 2016 @06:38PM (#13180830)
All hashing algorithms that I am aware of have more inputs than outputs. By the pigeon hole principle, there will always be collisions. MD5 is weak, but it still isn't trivial to find an input that hashes to the same thing as a high entropy password.
Re:Yahoo discloses hack of 1B accounts by danielweber on Wednesday December 14, 2016 @09:11PM (#13181763)
> that hashes to the same thing as a high entropy password.

To be clear, it's not the entropy of the original password that matters, except for the fact that all common low-entropy passwords already have their MD5s stored in public databases. (What hashes to 5f4dcc3b5aa765d61d8327deb882cf99? You can look it up with Google.)

You can come up with two plaintexts that hash to the same thing in MD5. You can't come up with something that hashes to a new MD5 value given to you, aside from finding it in one of those databases.

Re:Yahoo discloses hack of 1B accounts by agf on Wednesday December 14, 2016 @05:57PM (#13180508)
If it's a password so long and complex it wouldn't be in any rainbow table computable in reasonable time. While MD5 can be computed quickly, there is still a limit to how many you can compute -- and there are an infinite number of possible passwords if they aren't length limited.
Re:Yahoo discloses hack of 1B accounts by DougBTX on Wednesday December 14, 2016 @07:05PM (#13181004)
Interestingly even if the password has infinite length, an MD5 hash has a fixed finite length. You can think of it as a glorified modulus operator, beyond some point the longer passwords will have hashes that match shorter ones.
Re:Yahoo discloses hack of 1B accounts by agf on Thursday December 15, 2016 @11:44PM (#13191132)
True -- but assuming these passwords aren't stored the same (very, very wrong) way on another site, and they're no longer useful on Yahoo, what's important is finding the real password, not just a password that happens to match the given hash.
Re:Yahoo discloses hack of 1B accounts by manarth on Wednesday December 14, 2016 @06:35PM (#13180805)
Rainbow tables are attacks against secure algorithms.

MD5 is recognised as an insecure algorithm: given a known hash, there are multiple possible passwords that would resolve to the same hash, therefore appearing to be the correct password.

With MD5, it's not necessary to compute an infinite number of possible passwords, and it is possible that, given a particular hash, a collision can be found within a reasonable time.

Re:Yahoo discloses hack of 1B accounts by jsjohnst on Wednesday December 14, 2016 @09:22PM (#13181828)
Either a) you don't have a clue about the complexity involved in finding a collision for a specific hash or b) your definition of "reasonable time" is longer than the age of the universe and/or using 100 trillion state of the art GPUs is realistic.

I'm leaning towards option a, you read a blog post once and think you're an expert on cryptography now.

Re:Yahoo discloses hack of 1B accounts by manarth on Thursday December 15, 2016 @02:49AM (#13183139)

  > the complexity involved in finding a collision for a specific hash
If it can be shown that a preimage collision can be computed in less time than an exhaustive search, the algorithm is generally regarded as having a weakness, even if the given "less time" is still a very very long time.

The theoretical complexity of MD5 is 2^128, but a preimage attack was discovered in 2009 which showed that a collision can be found in 2^123.4. [1]

Collision attacks against MD5 have become more practical, there are even frameworks for it [2]. The complexity of 2^123.4 still makes a preimage attack against MD5 computionally unfeasible, but given that it's been shown to be weaker than its theorerical 2^128, it's possible that MD5 has other weaknesses which would allow the complexity to be reduced to a level that is computationally feasible.

[1] https://www.iacr.org/archive/eurocrypt2009/54790136/54790136...

[2] https://marc-stevens.nl/p/hashclash/

Re:Yahoo discloses hack of 1B accounts by mypalmike on Thursday December 15, 2016 @02:46AM (#13183128)
To be fair, pretty much every MD5 discussion I've ever seen or been involved in (including with "security expert" former coworkers) has had someone making the same claim.
Re:Yahoo discloses hack of 1B accounts by SamBam on Wednesday December 14, 2016 @08:23PM (#13181509)
What you're describing is the same for every having algorithm in existence. All hashes can represent multiple (indeed, infinite) passwords. So they all have collisions. This is because all hashes are fixed-length, and so finite, while the possible inputs are infinite.

This isn't the reason that MD5 is weaker than other algorithms.

Re:Yahoo discloses hack of 1B accounts by Buge on Wednesday December 14, 2016 @10:58PM (#13182274)
You are describing a first preimage attack. There have not been any computable first (or second) preimage attacks on md5.

https://stackoverflow.com/questions/822638/does-any-publishe...

There are collision attacks, but that is not relevant for password cracking.

Re:Yahoo discloses hack of 1B accounts by manarth on Thursday December 15, 2016 @02:52AM (#13183155)
From 2009: a preimage attack reduced the complexity from 2^128 to 2^123.4 [1].

It's still a big number, but it's less than the theoretical complexity.

[1] https://www.iacr.org/archive/eurocrypt2009/54790136/54790136...

Re:Yahoo discloses hack of 1B accounts by Buge on Saturday December 17, 2016 @05:54PM (#13203201)
What I meant by "computable" is something that can be computed with today's hardware.
Re:Yahoo discloses hack of 1B accounts by gamapuna on Thursday December 15, 2016 @09:26AM (#13184705)
Re:Yahoo discloses hack of 1B accounts by JonDav on Wednesday December 14, 2016 @06:14PM (#13180658)
Pretty much even if you choose a high entropy password like say:

  `]{;&<C9v98QO#]M~Ff$>rQQQjoJkxm0ayM+gG,@vf*>#-{X4E>aZG(A1~tf<Wu
the MD5 algorithm can be broken using various techniques like collisions, unsalted I believe means that their database would accept the hashes the third party has. End result is they should have migrated away from MD5 after it was declared unsafe.
Re:Yahoo discloses hack of 1B accounts by danielweber on Wednesday December 14, 2016 @09:15PM (#13181780)
No it can't.

Two principles here:

1. If your password is very very good (a Diceware password would suffice), then any method of storing passwords that is better than storing them in plaintext will stop someone from brute forcing it.

2. If your password is very bad, then even an excellent password hashing algorithm will not save you.

"Just use bcrypt" is meant to save people who are in the middle.

Re:Yahoo discloses hack of 1B accounts by Buge on Wednesday December 14, 2016 @11:01PM (#13182287)
No, a collision attack would not give you the plaintext from a hash. A first preimage attack would do that, but no computable first (or second) preimage attacks against md5 have been found.

https://stackoverflow.com/questions/822638/does-any-publishe...

Re:Yahoo discloses hack of 1B accounts by jsjohnst on Wednesday December 14, 2016 @07:17PM (#13181084)
Nope, that doesn't explain it. Without Yahoo! UDB access to get a couple values unique to your login, you can't forge a cookie that allows you access to Yahoo! Mail.