News for hackers. Stuff that matters.
Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by homakov on Tuesday April 03, 2012 @12:29AM (#3791445)
Well I already posted it, nobody is interested. Okay :( I guess you should change the title - this on is too shouting.

Sorry all that I took your time for considering the problem.

I see you are not interested to do/solve anything and my arguments worth nothing.

Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by jaredsohn on Tuesday April 03, 2012 @12:30AM (#3791449)
This is currently the #2 post on Hacker News; I think people are interested.
[deleted]
Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by homakov on Tuesday April 03, 2012 @12:43AM (#3791484)
penetration testers consistently find holes, websites consistently leave holes - isn't it crazy? I just want you to think in "a new way" and find new solutions! Well, mass assignment problem was fixed directly and easily with 1 commit. This one requires Your ideas.

Warning top bar is only my proposal. You can dislike it - but you cannot dislike the fact that CSRF is dangerous.

And, Please, note. The real problem with CSRF - while we (developers, browsers) are fighting - USERS SUFFER. E.g. they lose money from skrill account. They follow spam subscriptions. ETC. Isn't it awful?

Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by tptacek on Tuesday April 03, 2012 @12:46AM (#3791496)
That's the real problem with all security bugs. CSRF is among the least of them. CSRF can mostly be fixed mechanically, form by form. XSS can't. You should read Michel Zalewsky's post "Postcards from a post-XSS world".

I think you're wrong about it being a browser bug, or even that it's amenable to browser fixes. Maybe I'm wrong. But I'm only interested in the engineering discussion, not the morality play.

Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by homakov on Tuesday April 03, 2012 @12:52AM (#3791509)
>But I'm only interested in the engineering discussion, not the morality play.

I'm either. Yes, those all are just security bugs. Known, sometimes fixed, sometimes reported. But I wont even try to check Alexa Top for XSS - I m pretty sure I won't find anyting. Bugs are different, that's why CSRF seems the most dangerous to me.

Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by tptacek on Tuesday April 03, 2012 @01:02AM (#3791535)
You will absolutely find XSS all over the Alexa top domains.
Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by radagaisus on Tuesday April 03, 2012 @12:38AM (#3791474)
Serious kudos for Homakov.

And he has a point. While I dislike the whole "lean startup" thing a lot of people promote and adore it. And along Learn, Measure, Adapt, Innovate and other big words, I don't see a Secure your Damn App section.

When I write my controllers I can't focus completely on my product - I also have to think if this mass assignment is vulnerable.

Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by chao- on Tuesday April 03, 2012 @01:15AM (#3791567)
Completely agree, and it worries me. But at the same time, if I don't have more refined user education, or if we don't add feature X that customer Y wants to pay big money for, we don't survive long enough for me to one day fix our security. I worry about this stuff all the time, but based on the way some of my partners act, I sometimes also feel guilty for worrying. It seems like I'm shouting at a corner or wanting to waste time on something that "Isn't an issue yet". Just the other day a friend claimed that worrying too often about security was a form of premature optimization. I thought he was joking. He wasn't.

From the article: I don't even mention middle and small websites. they're just doomed...

Being at a small website and working day and night, at the end of it I look back, feel like I've accomplished a lot, but deep down know that I understand almost nothing about the security implications for 90% of what I touch.

My security is based on obscurity. I know it. And it keeps me up at night.

Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by thaumaturgy on Tuesday April 03, 2012 @12:57AM (#3791527)
I object to the title here. If this is "hacking", then this site really needs to start calling itself "Hacker" News.

homakov has just done some damn fine work, and it deserves actual discussion, not dismissal and downvotes.

Honest question: could many of these have been addressed if the browser simply didn't send a cookie along with a post or get to a domain that violated the usual same-origin rules? At a glance, it looks like most of the sites are receiving some kind of account or session information from the browser, with Slideshare being a notable exception (they just flatly Did It Wrong).

Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by tptacek on Tuesday April 03, 2012 @01:03AM (#3791537)
You mean, how many of these sites would be vulnerable to CSRF if we just broke a feature of HTTP that secure applications have depended on for 10+ years?
Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by ceol on Tuesday April 03, 2012 @01:32AM (#3791619)
> Guys from HN disappoint me with their conservatism. It's quite easy to repeat "It works fine, Google and Mozilla have best programmers, well known attack, popular sites are protected(ORLY?!), go home kid".

> That was an expected behavior, so I hope, this post makes them to face facts. 2+2=4 and CSRF = the huge, wide-spreaded problem that should be solved now or never.

From the previous discussion, your critics were mostly concerned about your "solution" to CSRF. As was said there, it's not a browser vulnerability. It's an application vulnerability. I agree with you that CSRF is a problem that desperately needs as much attention as SQL injection has gotten over the years, but don't get sour because your solution to block all POST requests to different domains[0] is inadequate.

Aside from the bitterness towards people pointing out inaccuracies in your previous post, this was great. Developers should be thinking about CSRF (and basic security) more!

[0]: http://news.ycombinator.com/item?id=3779160 "Please point out where in my post I said to deny ALL requests. I was talking about ONLY POST requests."

Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by meow on Tuesday April 03, 2012 @12:38AM (#3791470)
Wow, this must have taken a long time to put together. I think he makes a very fine point when he says browsers must have a part to play in fixing this.
Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by tptacek on Tuesday April 03, 2012 @12:01AM (#3791385)
Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by hogu on Tuesday April 03, 2012 @12:32AM (#3791454)
I don't understand how this is so widespread - If you're using a major web framework, and most of these sites probably are right? isn't CSRF protection built in? are people just turning it off?
Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by tptacek on Tuesday April 03, 2012 @12:37AM (#3791468)
Even in the major frameworks, on-by-default CSRF protection is relatively new. On some popular J2EE platforms, forms still aren't protected by default.

We'll get there. This is a much more straightforward problem to solve than XSS, which is the real bitch.

Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by someone13 on Tuesday April 03, 2012 @01:07AM (#3791547)
I don't know if I'd call XSS "the real bitch". I remember reading a blog post a while ago (that I sadly can't seem to find now) which recommended using a good variable naming system - something like us_blah for unsafe content, and s_blah for safe content - and only writing / storing safe content. Furthermore, the only thing that returns safe content is the appropriate escaping function, so you can look at each line and notice that "s_blah = us_blah2" is wrong.

I always wondered if it'd be possible to use the type system of a language to do something similar - make a "safe to output" type, and a "not safe to output" type, which are not mutually convertible, and then write a function that converts between UnsafeStr and SafeStr. Then, you can write all your code to only work on and only print a SafeStr.

Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by nbpoole on Tuesday April 03, 2012 @01:12AM (#3791562)
It's not nearly as simple as you make it seem:

1. What is "safe content"? That entirely depends on the context in which you're using a particular string. (See https://www.owasp.org/index.php/XSS_%28Cross_Site_Scripting%... for a summary of the kinds of things you have to think about)

2. The system you're describing is somewhat similar to http://yehudakatz.com/2010/02/01/safebuffers-and-rails-3-0/. People still find plenty of XSS vulnerabilities in Rails applications.

3. http://lcamtuf.coredump.cx/postxss/

Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by eurleif on Tuesday April 03, 2012 @01:12AM (#3791559)
Jinja, a Python template engine, does something like that. When you include a string in a template, it's automatically escaped, but you can disable that by wrapping the string in a Markup object. You can also use the Markup class directly:

    >>> foo = u'I <3 you.'
    >>> bar = Markup(u'<h1>') + foo + Markup(u'</h1>')
    >>> print bar
    <h1>I &lt;3 you.</h1>
Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by jurre on Tuesday April 03, 2012 @12:39AM (#3791479)
I was thinking the same thing, Rails (which is used by github and heroku afaik) has this by default. I guess they are still on old versions?
Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by homakov on Tuesday April 03, 2012 @12:46AM (#3791493)
well, you mentioned very interesting thing. Yes, frameworks are protected. But in fact - the more you make easy to develop - the more it's easy to leave hole. Well, I'm about Rails now. Surely they have built-in CSRF protection but they also have ugly practise with routing - that's theme of upcoming post.
Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by darxius on Tuesday April 03, 2012 @12:00AM (#3791379)
I hope he's alerted the websites involved before publicly releasing the vulnerabilities like this. This guy has serious potential, he's obviously very smart, I wouldn't want to see him fall into the "bad" side of internet security.

Kudos for finding them, I hope you reported them.

Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by drivebyacct2 on Tuesday April 03, 2012 @12:10AM (#3791397)
If you read it, you'd know he reported most of them. I'm betting he reported all of them (as he did before).
Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by homakov on Tuesday April 03, 2012 @12:53AM (#3791514)
ops...
Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by jurre on Tuesday April 03, 2012 @01:17AM (#3791574)
I really hope you're kidding here and you did notify them. I'm very impressed by your skills but you have to realize that if you want people to take you seriously you have to be a little more responsible with these things. You have to give people some time to fix their bugs before you release them to the public. If you did notify them then please ignore this.
Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by tptacek on Tuesday April 03, 2012 @01:04AM (#3791541)
Not sure what this means...?
Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by jpiasetz on Tuesday April 03, 2012 @12:38AM (#3791471)
Why has no one hired homakov yet?

Second time he's shown vulnerabilities in Github. Maybe he's not great at reporting but I would still value him more then the sexist rockstars that seem to have no problem getting jobs.

Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by robbywashere on Tuesday April 03, 2012 @12:33AM (#3791458)
Your best bet is to use a randomly generated token with POST'd data.
Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by jmvoodoo on Tuesday April 03, 2012 @12:00AM (#3791380)
Isn't this problem also solved by disabling 3rd party cookies? This is a feature already in the browser. I've used it for months and the only thing that I've noticed not working (i.e. the only impact on me as a user) is that integrated disqus forums on some blogs don't work.
Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by tptacek on Tuesday April 03, 2012 @12:01AM (#3791382)
No, disabling 3rd party cookies does not stop CSRF.
Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by jmvoodoo on Tuesday April 03, 2012 @12:05AM (#3791394)
Can you explain? My understanding was that cookies will not be sent in these attacks (I validated this only testing some approaches, namely doubleclick and other ad embeds). Without cookies, how would the CSRF attack access my account? Or have I missed something obvious?
Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by eurleif on Tuesday April 03, 2012 @12:20AM (#3791421)
Disabling third party cookies disables cookies in certain contexts, like when loading images and frames from another domain, but there are other ways to perform a CSRF attack. A link or form that doesn't target a frame would still work.
Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by jmvoodoo on Tuesday April 03, 2012 @12:27AM (#3791439)
Got it that makes sense. It seems like a link would be a real problem to solve and keep the web usable. The form approach seems easy enough to solve with a dialog. The others that can be solved via tighter cookie restrictions probably should be.. Too many permission dialogs and you end up annoying the user, or worse, train them to accept without reading.
Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by neduma on Monday April 02, 2012 @11:48PM (#3791354)
+1 This is now very serious!!!