Live data from Hacker News

Slack was hacked

slackhq.com

321–330 of 526 posts

Re: Slack was hacked

#321

Lot's of hype (IMO) around Slack, but lot's of money thrown at them so I kept thinking that I'm missing something! Just being skeptical as usual. The other day an invitation arrives to use Slack. Great! Let's see it, this killer feature or killer combination of features. What have these smart people come up with that hasn't been done countless times in the same space to make them so successful? It's literally nothing…

You could do something similar with an IRC server and bots with webhooks... Just the same, they did do this, and offer a web based interface that people are more comfortable with (no need for an irc client), and does more than IRC clients do. IT's not that anyone else couldn't do this, it's that they've done it relatively well.

Absolutely. It's just so much better than any IRC client. People looked at the iPhone and said "but all of this technology already existed!" That isn't the point. It had never been put together in a user-friendly way.

Slack hasn't invented anything new, but the entire product is a delight to use.

Re: Slack was hacked

#322

Remember kids, it's 2FA before the fact, not after. 2FA is not a magic bullet though, and neither is salting. Salting makes it _expensive_, but not impossible for pass recovery. Always aim for impossible. You want to be able to throw away the key during an incident.

The only impossible system I know of would be one that uses client side certificates, but I would be surprised if anybody those in a successful business.

Re: Slack was hacked

#323

I hate to be the negative guy, and they were hashing passwords better than 90% of the sites, but it would be SO easy to completely neutralize password leakage when the attacker only has access to the database. https://blog.filippo.io/salt-and-pepper/ tl;dr: Hardcode a second salt in your application code or in an environment variable. Then a database dump is not enough anymore to do any kind of bruteforce. It's simpl…

The best summary I've read recently on peppering was posted to the PHC list by Thomas Pornin last week. It's worth quoting in its entirety;

  Adding an additional secret key can be added generically, in (at least)
  four ways, to any password hashing function:

  1. Store: salt + HMAC_K(PHS(pass, salt))
  2. Store: salt + PHS(HMAC_K(pass), salt)
  3. Store: salt + AES_K(PHS(pass, salt))
  4. Store: salt + PHS(AES_K(pass), salt)

  I have used here "HMAC" to mean "some appropriate MAC function" and
  "AES" to mean "some symmetric encryption scheme".

  These methods are not completely equivalent:

  -- With method 1, you forfeit any offline work factor extension that
  the PHS may offer (i.e. you can no longer raise the work factor of a
  hash without knowing the password). With methods 2 and 4 such work
  factor extension can be done easily (if the PHS supports it, of
  course). With method 3, you can do it but you need the key.

  -- With methods 2 and 4, you must either encode the output of HMAC
  or AES with Base64 or equivalent; or the PHS must support arbitrary
  binary input (all candidates should support arbitrary binary input
  anyway, it was part of the CfP).

  -- Method 4 requires some form of symmetric encryption that is either
  deterministic, or can be made deterministic (e.g. an extra IV is
  stored). ECB mode, for all its shortcomings, would work.

  -- Method 3 can be rather simple if you configure PHS to output exactly
  128 bits, in which case you can do "raw" single-block encryption.

  -- Methods 1 and 3 require obtaining the "raw" PHS output, not a
  composite string that encodes the output and the salt. In that sense,
  they can be a bit cumbersome to retrofit on, say, an existing bcrypt
  library.


  The important points (in my opinion) to take into account are:

  1. This key strengthening (some people have coined the expression
  "peppering" as a bad pun on "salting") can be done generically; the
  underlying PHS needs not be modified or even made aware of it.

  2. Keys imply key management, always a tricky thing. Key should be
  generated appropriately (that's not hard but it can be botched in
  horrible ways), and stored with care. Sometimes the OS or programming
  framework can help (e.g. DPAPI on Windows). Sometimes it makes things
  more difficult. You need backups (a lost key implies losing all the
  stored passwords), but stolen backups are a classical source of
  password hashes leakage, so if you do not take enough care of the
  security of your backups then the advantage offered by the key can go
  to naught.

  3. For some historical reasons, many people feel the need to change
  keys regularly. This is rather misguided: key rotation makes sense in
  an army or spy network where there are many keys, and partial
  compromissions are the normal and expected situation, so a spy network
  must, by necessity, be in permanent self-cleansing recovery mode; when
  there is a single key and the normal situation is that the key is NOT
  compromised, changing it brings no tangible advantage. Nevertheless,
  people insist on it, and this is difficult. The "method 3" above
  (encryption of the PHS result) is the one that makes key rotation
  easiest since you can process all stored hashes in one go, as a
  night-time administrative procedure.

  4. Key strengthening makes sense only insofar as you can keep the key
  secret even when the attacker can see the hashes. In a classical
  Web-server-verifies-user-passwords context, the hashes are in the
  database; one can argue that database contents can be dumped through a
  SQL injection attack, but a key stored outside the database might evade
  this partial breach. But if the key is in the database, or the breach
  is a stolen whole-server backup, then the key does not bring any
  advantage.

  5. If you _can_ store a key that attackers won't steal, even if they
  get all the hashes, then you can forget all this PHS nonsense and just
  use HMAC_K(pass) (or HMAC_K(user+pass)). The key must thus be
  envisioned as an additional protection, a third layer (first layer is:
  don't let outsiders read your hashes; second layer is: make it so that
  your hashes are expensive to compute, in case the first layer was
  broken through).
P.S. As the inventor of blind hashing (which would have prevented this breach entirely) I have a serious horse in this race. We launch publicly at RSA 2015 in San Francisco. Hope to see you there!

Re: Slack was hacked

#324
post #57

> Slack’s hashing function is bcrypt with a randomly generated salt per-password which makes it computationally infeasible that your password could be recreated from the hashed form. I'm happy to hear they didn't just use MD5 with no salt as this would be the same as storing it in plane text... bcrypt + random salt sounds to me like the best practice nowadays, is it still holding? or are there some advanced in GPU cl…

There are some thoughts on the matter here: http://chargen.matasano.com/chargen/2015/3/26/enough-with-th... . But I would say yes, bcrypt is still best practice. Other commenters are right that bad passwords will still be recoverable, but using one of bcrypt/scrypt/PBKDF2 is due diligence. I would use whichever one is most easily available on your platform.

Why do articles talking about this always talk about specific work factors and choosing a correct work factor, as if it's fixed? I thought good practice was to choose the work factor dynamically so it's calibrated to whatever hardware you're running today.

Re: Slack was hacked

#325
post #207

Earlier quoted context omitted.

I'm not talking about users who care about custom Emojis and animated gifs. That's why I said - let the mere mortals use it; we can do better!

Is this actually the sort of people that get attracted to HN? Thinking of others as "mere mortals" and yourselves as gods? Sad picture.

Probably not in that condescending way, but it is useful to keep in mind that people are fundamentally different from you. The trouble is when you think they are inferior beings (their tech skills on the other hand are inferior, no reason to not state that plainly).

For what it is worth I have coded Erlang at work and am quite partial to cat pictures, myself.

Re: Slack was hacked

#326

Why the fuck am I reading this on hacker news and not from a notification in slack?

> If you have not been explicitly informed by us in a separate communication that we detected suspicious activity involving your Slack account, we are very confident that there was no unauthorized access to any of your team data (such as messages or files)

Re: Slack was hacked

#327
post #299
post #250

Earlier quoted context omitted.

ircmaxell makes a good point in that comment -- not that the concept of a pepper doesn't work, but that a two-way encryption function is a better choice than a hash function for applying the pepper. Your pepper will be a long, random key that is known to your app server but not your database server. If you store passwords as: bcrypt(bcrypt(password, salt), pepper) then you spend a lot of cycles bcrypting your long, r…

Once you use Encryption, it's no longer pepper, it's encryption with weak key storage (hard-coded). At that point, genuinely, why not just follow best practices and store the key securely (e.g. using an HSM)?

Because nobody knows how to do that and it is likely extremely expensive by every metric.

And, no, I am not being facetious by saying nobody knows how to do that. I am being quite literal. Have you ever done that? Do you know how? Do you even know what you would google to figure out how?

I'm yet to see my favorite library of course's documentation on a HSM. How do you do that in e.g. PHP with MySQL? MVC with MS SQL? Java with Oracle?

Re: Slack was hacked

#328

Earlier quoted context omitted.

They go into details about this in the post. It's bcrypt with a salt.

I shudder to imagine anyone bothering to build bcrypt WITHOUT a salt. In general, salt is implied in bcrypt.

Maybe, but for those who do not know what bcrypt is it is useful to mention that it used with a salt.

Re: Slack was hacked

#330
post #45

How does one discover that they were hacked? The post states that the breach occurred during February, and this is the end of March... did it just take them a long time to react and write a post about it, or did they likely discover after the fact? If so, how?

True story:

Log into server. Why is server slow? Run `top`. Hmm, `./exploit` is consuming 99% CPU...

Post reply on HN