Live data from Hacker News

Remote Code Execution on a Facebook server

blog.scrt.ch

101–110 of 207 posts

Re: Remote Code Execution on a Facebook server

#101
post #81

The fact that the machine has a hostname "*.thefacebook.com" doesn't imply that it also runs software of the "Facebook" social media software. So not sure how much impact this exploit would have had.

thefacebook.com was their original domain from way way back in the day. The fact this system has a legacy DNS entry might indicate its age.

Re: Remote Code Execution on a Facebook server

#102

This 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…

And "something like JSON" could mean YAML, which had it's own share of RCE bugs. It's still better than these object deserialization bugs one can find in Java or Python Pickle, which seems to be even more permissive.

Re: Remote Code Execution on a Facebook server

#103
post #97
post #15

Facebook joins Patreon in the "why somebody should make sure our python web framework debug mode isn't enabled in prod" club.

Patreon's screw-up was a lot more embarassing though - they apparently left an actual Python shell exposed to the web for at least a week after someone warned them about it, and their entire user database was exfiltrated and posted on the net as a result.

Yep. Every company will face security issues; it's unavoidable. But what happened to Patreon should make people seriously question trusting them with your personal information or money. (They probably use a 3rd party payment processor who has much better security practices, but still. Also, that 3rd party doesn't do you much good if an attacker with control of your production web/application servers or CDNs is intercepting credit card form data before it's sent off.)

Facebook has had vulnerabilities and exposures, but nothing like that.

Re: Remote Code Execution on a Facebook server

#104

This 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…

I agree with the sentiment, and it is very easy to avoid this in Django through the use of either Environment Variables, or importing the relevant setting data with a JSON file. As long as you follow best practices (easier said than done) its easy to mitigate these sort of risks.

Also debug mode in production is just lazy.

Re: Remote Code Execution on a Facebook server

#105
post #96

Earlier quoted context omitted.

I don't think anyone will ever know how much impact, but it implies that Facebook is not good at security.

No one talks about the working parts of security. Like, in this case, having the application on a separate box, and having that box separated by vlans from important things.

I don't think the solution is to put things you don't care about behind vlans and having applications on separate boxes. This box is/was an attack vector. It was holding secrets. Secrets provide other attack vectors.

Re: Remote Code Execution on a Facebook server

#106

Earlier quoted context omitted.

He should have gone to the black market, better yet sat on it. How long did it take Facebook to come forward with its user privacy violations?

He deserves a higher payout, but 1) telling him to be unethical rather than reporting it responsibly and accepting a not-insignificant reward is stupid, and 2) there's almost no chance this would've garnered more than $5,000 on any black market. This is not something that would grant a cybercriminal access to sensitive or profitable information, unless Facebook is wrong in their assessment of how segmented the server…

Not to mention this way he can actually report it on his taxes and get the money plopped straight into his bank account, whereas black market is a hell of a lot more uncertain if you even get paid.

Re: Remote Code Execution on a Facebook server

#107

> scanning an IP range that belongs to Facebook (199.201.65.0/24) ping -4 facebook.com results in 157.240.18.35. Maybe, author used some other way to get those IPs. Can anyone throw a light on this?

A side note. By scanning, he probably just means a Shodan search:

https://www.shodan.io/search?query=net%3A199.201.65.0%2F24&l...

Login required

Re: Remote Code Execution on a Facebook server

#109
post #81

The fact that the machine has a hostname "*.thefacebook.com" doesn't imply that it also runs software of the "Facebook" social media software. So not sure how much impact this exploit would have had.

thefacebook.com was their original domain from way way back in the day. The fact this system has a legacy DNS entry might indicate its age.

Here's mail.thefacebook.com:

https://www.shodan.io/host/199.201.65.23

Re: Remote Code Execution on a Facebook server

#110
post #84

Earlier quoted context omitted.

I have bad news for you. No one is good at security.

This is great news for me, I work in security :)

But the reason why nobody is good at security might be that security is always last on the budget list.
Post reply on HN