News for hackers. Stuff that matters.
Re:Slack was hacked by ipedrazas on Friday March 27, 2015 @01:07PM (#9277557)
Exactly!!!

Encrypting user data should be a common practice like hashing passwords.

Re:Slack was hacked by atmosx on Friday March 27, 2015 @02:02PM (#9277987)
> Exactly!!! > Encrypting user data should be a common practice like hashing passwords.

I get the feeling that you've never done this before and you don't understand the technical challenge and implications of the added complexity you propose here for an essentially free to low-price all-in-one communication online service.

Slack is not the NSA, encryption is not the answer to every security problem out there.

Re:Slack was hacked by scrollaway on Friday March 27, 2015 @01:38PM (#9277811)
Third party authentication should be the norm. Leaving authentication to providers that absolutely know their shit, just like we leave payments to third party services.

Of course, that requires a decent protocol, and Mozilla is doing the world a disservice in not marketing Persona better seeing as it's the right solution....

Re:Slack was hacked by santosha on Friday March 27, 2015 @01:57PM (#9277954)
Major privacy issues, single point of failure etc etc. We leave payments to third party services because nobody wants to deal with the compliance nightmare that PCI-DSS is, not for security reasons. Payment is also mostly less sensitive to availability and latency issues than authentication.
Re:Slack was hacked by scrollaway on Friday March 27, 2015 @02:28PM (#9278173)
So in a world where PCI-DSS isn't a thing, you're fine entering your credit card data directly on the forms available on random websites?

Why's a password so different, seeing as most people reuse those passwords? Why do we essentially allow (and yes, I am excluding those that use password managers in this statement, I'm one of those) access to our webmail and other critical services to random websites on the internet? What makes this right?

> Payment is also mostly less sensitive to availability and latency issues than authentication.

That's patently untrue. Latency issues are nonexistant in both areas, and availability issues are critical in both areas.

Re:Slack was hacked by makeitsuckless on Friday March 27, 2015 @03:18PM (#9278454)
Yes, I have no problem entering my credit card data directly on the forms available on random websites.

Credit card payments online are so ludicrously insecure that it baffles me it's even legal. I only use them when dealing with the US (although some of the major retailers like Apple have finally started accepting 21st century payment methods), and I simply assume my credit card info has been leaking all over the place for ages.

The whole basic premise of credit cards is "we know it's totally broken, we'll just refund you the money because it's cheaper than fixing the problem".

Re:Slack was hacked by jasonlotito on Friday March 27, 2015 @03:45PM (#9278580)
> So in a world where PCI-DSS isn't a thing, you're fine entering your credit card data directly on the forms available on random websites?

Yes. It might be a hassle should someone misuse it, but the status-quo effectively means if I didn't make the purchase I'm not responsible for it.

More importantly, this was proven before PCI-DSS was a thing.

Re:Slack was hacked by mike_hearn on Friday March 27, 2015 @02:03PM (#9277990)
You mean like how Authy specialised in two-factor authentication, but still managed to have basic string concatenation bugs that rendered their entire 2FA system bypassable?
Re:Slack was hacked by yellowapple on Friday March 27, 2015 @04:08PM (#9278695)
Huh? This is the first I've heard about this, and searching for "Authy concatenation bug" isn't turning up anything useful.
Re:Slack was hacked by zaroth on Friday March 27, 2015 @04:36PM (#9278823)
Here's the write-up from Homokov. The guy is a pen-testing genius: http://sakurity.com/blog/2015/03/15/authy_bypass.html

But if you just want the money shot: http://sakurity.com/img/smsauthy.png

Yes. Typing '../sms' in the field bypassed the 2nd factor. Just, wow.

Re:Slack was hacked by yellowapple on Friday March 27, 2015 @04:57PM (#9278953)
Huh. Well now I know. Thanks!

Amazing what you can do with improperly-implemented input sanitation :)

This probably could've been prevented by disallowing non-number inputs, no?

Re:Slack was hacked by zaroth on Friday March 27, 2015 @05:10PM (#9279008)
"In fact the root of the problem was default Sinatra dependency 'rack-protection'".

They were doing the input sanitation, but it wasn't the very first thing in the processing pipeline, since "best practice" was to pipe everything through 'rack-protection' first.

Homokov was first to state, this was really a black-swan type bug which 99.9% of the time makes it into production. Apparently, they were doing the "right thing" and still got burned.

Re:Slack was hacked by homakov on Friday March 27, 2015 @06:51PM (#9279558)
The parent meant "This probably could've been prevented by disallowing non-number inputs" in SDK libraries. Yes, if SDK would cast everything to digits it wouldn't be possible. It is also quite obvious security-in-depth for a 2FA API. Now they do it.

*HomAkov

Re:Slack was hacked by yellowapple on Monday March 30, 2015 @04:39PM (#9292421)
Or even just input validation on the form itself before passing on to the API, which is more of what I was getting at. I don't know about the details of Authy's setup, but I know that AJAX (for example) supports enforcement of specific value types in text fields.

Basically, the form itself could have (and maybe even should have) required numeric-only values, seeing as Authy's codes are either 6 or 7 digits long and contain no alphabetical or special characters.

Re:Slack was hacked by zaroth on Friday March 27, 2015 @08:10PM (#9279863)
:-( Sorry, typo. And HN won't let me edit now, grrr!
Re:Slack was hacked by drewwwwww on Friday March 27, 2015 @04:21PM (#9278747)
Re:Slack was hacked by dhfromkorea on Friday March 27, 2015 @04:43PM (#9278864)
hey, that causes some immediate stir in my mind as a user of Authy. Could you share any reference to the incident you mentioned?
Re:Slack was hacked by wolf550e on Monday March 30, 2015 @08:10PM (#9293518)
Re:Slack was hacked by scrollaway on Friday March 27, 2015 @02:29PM (#9278178)
... no? no I don't mean like Authy.
Re:Slack was hacked by Erwin on Friday March 27, 2015 @01:47PM (#9277871)
You never decrypt a password however. You only compare the hashed version of the claimed one to the stored hashed version, a one-way operation.

What could you do with a one-way encrypted phone number? I'm not able to enter a phone hash to make a call.

Re:Slack was hacked by laumars on Friday March 27, 2015 @02:15PM (#9278084)
Encryption isn't the same as hashing. Encryption is two-way.

The previous comment did make the encryption / hash distinction - though I can totally understand how his post might have been misread that he was recommending the same mechanisms for both sets of data.

Re:Slack was hacked by Erwin on Friday March 27, 2015 @03:27PM (#9278507)
OK, so slack stores a username, name and email address for each user. This is visible to everyone else in the same Slack team at minimum. You also need it for e.g. password resets, perhaps billing.

We can assume they aren't total idiots and there's a Internet facing application server that connects to a internal-only database server that has this data. Also, assume SQL injection is not the attack vector.

How would you apply encryption to protect the username, name and email from an attacker that has gained access to the application server? I've gained some shell on the server and have 24 hours minutes to extract data. I can see all the files on the server but maybe as non-root but just the user that runs the application. How can you, as a security sensitive application developer, stop me if I've gotten so far?

Re:Slack was hacked by laumars on Friday March 27, 2015 @06:43PM (#9279525)
I wouldn't. I don't agree with his point either (see my response to him: https://news.ycombinator.com/item?id=9277659).
Re:Slack was hacked by laumars on Friday March 27, 2015 @01:19PM (#9277659)
Why? Encrypting e-mail addresses would break password reset features and phone numbers are generally public anyway (yes you can go X-directory, but the real issue here is why these services require a valid phone number to begin with)
Re:Slack was hacked by schrodinger on Friday March 27, 2015 @01:34PM (#9277784)
Why would encrypting email addresses break password reset? You can encrypt the database at rest such that the application has a private key that can decode it. That way both the application and the database server need to be breached to obtain anything usable.
Re:Slack was hacked by laumars on Friday March 27, 2015 @02:01PM (#9277985)
It's often a bug in the application that exposes the database, so the same bugs might also be used to expose the private key.

It's also worth noting that it wouldn't just be the web servers that require your private key, it would also be any mail servers you use for sending your newsletters and such like (assuming these aren't run on your web servers - which often isn't the case). Then there's your telephone support staff, who would also may need to know your e-mail address so they could do their job effectively. And any other operators that might compile data extracts, eg for 3rd parties where users have given permission for your details to used / sold.

Quickly you're in a situation where your private key is more available across your infrastructure than the e-mail would have been if it wasn't encrypted to begin with.

Now lets look at the cost of such a system. There's an obvious electricity / hardware cost with the CPU time required to encrypt / decrypt this data (after all, CPU time is the general measure for the strength of encryption) and the staffing cost with the time wasted jumping through those extra hoops. The development time, code complexity, etc - it all has a cost to the company.

So what's the benefits in any companies doing this? They don't gain any extra security? This is really more of a privacy policy for their users; and users which are that paranoid about their e-mail address being leaked should either use a disposable e-mail account or shouldn't be using a cloud-based proprietary messenging network to begin with. What's more the chat history might well have your e-mail address in anyway (eg "hi dave, I'm heading into a meeting shortly, but e-mail me at [email protected] and I'll have a look tonight")

Don't get me wrong, I'm all for hashing / encrypting sensitive data. But pragmatically we need to consider:

1) are e-mail addresses really that sensitive? Or instead should we be encouraging better security for our web-mail et al accounts (eg 2 factor authentication) to prevent our addresses being abused. Given that we give out e-mail addresses to anyone who needs to contact us, I think the latter option (securing our email accounts) is the smarter one

2) instead of encrypting phone numbers and postal addresses, should we instead be challenging the requirement for online services to store them to begin with? If they have my email address, why do they also need my phone number? Postal address I can forgive a little more if there's a product that needs shipping or payments that need to be made.

Re:Slack was hacked by lucian1900 on Friday March 27, 2015 @01:39PM (#9277817)
Or just the application. Generally, it's much easier to convince apps to give you the data instead.