Earlier quoted context omitted.
Look, this is Hacker News, I know you can come up with 1,000 different random arguments for why Facebook was wrong and this guy was right. What I can tell you with confidence is that if you did what this researcher did as a contract pentester, you'd get your firm permanently fired from Facebook (or virtually any other major site you might have been testing), and would probably be immediately fired yourself. What he d…
Makes sense; I don't know the pentesting industry too well, nor the norms of bug bounty programs. Certainly his sort of behavior would give me the heebie-jeebies if I ran security at a firm like that. Thinking more on it, I think he was edging black hat and used the rules lawyering as an excuse for pushing past an ethical limit. You've changed my view.
Remote Code Execution on a Facebook server
191–200 of 207 posts
Re: Remote Code Execution on a Facebook server
#192Nice job! I also really appreciate the lack of memes and very concise format of this blog post
totally agreed. my only pet peeve was the DD.MM.YYYY date format at the end of the post. Who does that?
In my opinion there are two date formats that make sense: DMY (decreasing granularity) or YMD (increasing granularity). I tend to favor the latter because of ISO. MDY definitely doesn't make any sense at all.
Re: Remote Code Execution on a Facebook server
#193This is why you (looking at frameworks) should never use a format that may contain code to store data, especially when the client has control over that data (even if signed). The same vulnerability has occurred in almost every language/framework that does this, including Rails and Java-based ones. Just use something like JSON, which completely avoids code execution vulnerabilities like this. Except of course for the…
PHP has this problem too - never use PHP unserialize() to unserialize hostile (i.e. user-accessible) data. It won't end well for you. I think it's true for any sufficiently powerful serialization format...
(but yes you still need to implement a safe unserialize white list)
Re: Remote Code Execution on a Facebook server
#194Earlier quoted context omitted.
Yes, Django realized this 7 years ago [0], and JSON has been the default for the past 5 years[1], it's just that facebook was using an old version of Django, and probably not the default. [0] https://groups.google.com/d/msg/django-developers/YwlZ9m9k1b... [1] https://github.com/django/django/commit/b0ce6fe656873825271b...
Sentry still requires Django 1.6: https://github.com/getsentry/sentry/blob/ea8fe10d117f5325f9e...
Re: Remote Code Execution on a Facebook server
#195This is why you (looking at frameworks) should never use a format that may contain code to store data, especially when the client has control over that data (even if signed). The same vulnerability has occurred in almost every language/framework that does this, including Rails and Java-based ones. Just use something like JSON, which completely avoids code execution vulnerabilities like this. Except of course for the…
Even without the pickle-related vulnerability, exposing your secret key that is securing cookies seems pretty bad and likely to lead to other vulnerabilities, although they'd take longer to find. And if the secret key were secure, the pickle use would not be vulnerable. Still, multiple layers of security, yadda yadda, sure. But this is beyond the pickle issue. I'm not sure I'm completely convinced you should not use…
Re: Remote Code Execution on a Facebook server
#196Earlier quoted context omitted.
The researcher's blog contains a reasonable rebuttal of Alex's write-up: >In the case of Facebook, the rules can be seen at https://www.facebook.com/whitehat . There is no rule which states what to do when a vulnerability is discovered, but there are several which imply that my testing was valid. These include: Report a bug that could ... enable access to a system within our infrastructure Remote Code Execution Privi…
Look, this is Hacker News, I know you can come up with 1,000 different random arguments for why Facebook was wrong and this guy was right. What I can tell you with confidence is that if you did what this researcher did as a contract pentester, you'd get your firm permanently fired from Facebook (or virtually any other major site you might have been testing), and would probably be immediately fired yourself. What he d…
>He back-pocketed credentials, didn't tell anyone he had them
It should be assumed that any data on the pwned server is now accessible to attacker, just like in any real world scenario.
Re: Remote Code Execution on a Facebook server
#197Earlier quoted context omitted.
Sentry still requires Django 1.6: https://github.com/getsentry/sentry/blob/ea8fe10d117f5325f9e...
Whoa, really? Django 1.6 has been out of extended support since April 2015, if I read https://www.djangoproject.com/download/ correctly...
Re: Remote Code Execution on a Facebook server
#198> Quoting the Sentry documentation, system.secret-key is “a secret key used for session signing. If this becomes compromised it’s important to regenerate it as otherwise its much easier to hijack user sessions.“; wow, it looks like it’s a sort of Django SECRET-KEY override! One wonders why that is even there. Was Django's own session code not good enough?
This abstraction exists because some options can be set from the admin UIO.
Re: Remote Code Execution on a Facebook server
#199Earlier quoted context omitted.
Maybe I misunderstood the article, but I thought it said that Django does strip this information, and the Sentry app went out of its way to store the secret key in the SENTRY_OPTIONS payload. This custom, non-Django code effectively circumvents Django’s protections, making the bug the responsibility of Sentry, not Django.
Ah. You're right, I completely got this bit wrong. Thanks. Wait, so that means Sentry kind of has a vulnerability.
Re: Remote Code Execution on a Facebook server
#200Earlier quoted context omitted.
Look, this is Hacker News, I know you can come up with 1,000 different random arguments for why Facebook was wrong and this guy was right. What I can tell you with confidence is that if you did what this researcher did as a contract pentester, you'd get your firm permanently fired from Facebook (or virtually any other major site you might have been testing), and would probably be immediately fired yourself. What he d…
So you basically admit that pentesting is useless, because they have to follow the rules which the blackhats won't even think twice about. >He back-pocketed credentials, didn't tell anyone he had them It should be assumed that any data on the pwned server is now accessible to attacker, just like in any real world scenario.
It's pentesting not penthieving. That's like saying military training is useless because they don't actually kill people.