5 ms·
We recently awarded our biggest bug bounty payout
- reginaldo 13y agoHi HN, I'm the one who found the bug. My writeup is at http://www.ubercomp.com/posts/2014-01-16_facebook_remote_code_execution http://www.ubercomp.com/posts/2014-01-16_facebook_remote_cod.... I'd be glad to answer any questions. I won't disclose the amount for now because I want to know what people think this would be worth, but eventually it will be disclosed. If you run an OpenID-enabled server now it's a great time to make sure your implementation is patched.
- citricsquid 13y agoFacebook disclosed it in the comments (about a minute after you made this comment).
- grinich 13y agohttps://www.facebook.com/BugBounty/posts/778897822124446?comment_id=8253030&offset=0&total_comments=8 https://www.facebook.com/BugBounty/posts/778897822124446?com...
- loceng 13y agoHa. Clearly Facebook doesn't care about privacy.. I wonder if they even asked him first.
- corin_ 13y agoThe way they disclosed it: > Reginaldo agreed we could share the payout, it was $33,500 for this issue.
- loceng 13y agoApologies for making the assumption that based on how OP stated it, assumed that he had full control over disclosure. I'd still prefer to hear from OP, as Facebook can say what they want or could be mistaken on the finer details of what was or wasn't agreed upon.
- loceng 13y agoDid Facebook ask you if they could disclose it? Because they did disclose it.
- tptacek 13y agoXXE's are awful. You wouldn't think that simply by parsing an XML file --- something so simple people are tempted to do it with regexes --- you'd be invoking machinery that translates the XML language and binds it to, in effect, scripting language features. But that's what you're doing when you use common XML libraries! For applications on mainstream stacks, if you accept XML inputs (explicitly accept them, that is; as in, invoke the XML parser yourself) and haven't taken the time to make sure you're not expanding entities, the safest bet is to assume that your XML parser has a "let inbound XML run shell commands" feature embedded into it. That's an oversimplification, but maybe not much of one. This is a great, subtle finding. And Reginaldo handled it like a pro. Let the feeding frenzy for hiring Reginaldo Silva... commence! :)
- reginaldo 13y agoI don't know if you read it, but I sent you an email about this same bug (when I originally found it in Drupal) in 2012. Didn't know FB was vulnerable back then. By the way, I learned a lot from you here on HN. So let me take this opportunity and say thank you very much.
- tptacek 13y agoI did! I responded to your first mail, too! :) When I saw your name, it looked familiar, and I went and looked up your old mail. Great work! Congrats on an awesome finding.
- mahyarm 13y agoExamples like these are the reason why I like to avoid XML. Unless your using something that actually takes advantage of the tree structure of xml and needs it's features, it's really overcomplicated overkill that can bite you in the ass. %95 of the time your just using XML like another JSON/serialization format and you should definitely be using something just as lightweight.
- eieio 13y agoSo by default many XML libraries essentially allow remote code execution? How in the world is that ok? How is that the standard?
- michaelt 13y agoI wonder whether the non-malicious applications of XML external entities outnumber the malicious applications. Any HNers want to chime in with an account of actually using them for what they're meant for?
- tptacek 13y agoAny HNers want to chime in on XML <<used as an interchange format>> (for instance, as the payload format for a protocol) ever using entity definitions for any purpose? Right now, I'd put money on "malicious uses" outnumbering "legitimate" uses.
- wglb 13y agoI certainly haven't seen any. This is a holdover to the SGML days, where this was a pretty important feature, and used quite frequently in many document formats required for government contracting. As I recall, there was lots of consternation about stuff that was thrown away from SGML when XML was built, but this external entity stuck.
- ambrop7 13y agoIf they went the NIH way and implemented the XML parsing themselves, this never would have been an issue.
- clopic 13y agoWhat a silly comment. Firstly, how can you be sure HN hasn't introduced the same, or a similar bug? Writing your own implementations does not make them secure. Secondly, I don't understand why you are suggesting that people should always write their own implementations. Should I write my own servlet container rather than using Tomcat?
- chmars 13y agoThe payment was apparently USD 33'500.
- fletchowns 13y agoYup, confirmed by Facebook on the linked blog post. That seems like a nice chunk of money. I can't help but think about how much his exploit would be worth on the black market though. 10x that amount maybe? I have no clue. Either way, being able to put a bug find like this on your resume is probably worth a lot more than those payouts.
- qq66 13y agoThe fact that Facebook is paying $33,000 for a remote code execution bug might one of the big reasons that it's the biggest bug that's been reported to them.
- nl 13y agoXXE's are nasty. Back in the early 2000's I found every single Java RSS parsers (pack then that was an important thing) was vulnerable. I submitted patches for them all, but it was kinda nasty to fix in Java, because each XML parser had different custom properties to set. https://github.com/rometools/rome/blob/master/src/main/java/com/sun/syndication/io/WireFeedInput.java#L311 https://github.com/rometools/rome/blob/master/src/main/java/... is the hackiness I had to do for ROME.
- reginaldo 13y agoFixing XXEs in Java is not a trivial thing to do. The best reference I know comes from Apache shindig [1], and you do have to make all those BUILDER_FACTORY.setAttribute calls, otherwise you block general external entities but allow parameter entities, which still leaves you vulnerable. [1] http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/xml/XmlUtil.java http://svn.apache.org/repos/asf/shindig/trunk/java/common/sr...
- po 13y agoThis was in PHP but the problem exists in most languages. For all of you python programmers out there check out defusedxml and use it. They have a good explanation of many of the dangers in XML parsing: https://pypi.python.org/pypi/defusedxml https://pypi.python.org/pypi/defusedxml
- gesman 13y ago/Leaving aside XML techno babble/: >>> ... We knew we wanted to pay out a lot because of the severity of the issue, so we decided to average the payout recommendations across a group of our program administrators. As always, we design our payouts to reward the hard work of researchers who are already inclined to do the right thing and report bugs to the affected vendors. ... >>> So, instead of awarding bounty to the researcher who found and intelligently handled the disclosure of the issue, Facebook "decided to average the payout" in order to keep part of the bounty to themselves, rewarding themselves for "hard work" and glorifying themselves for "awarding our biggest bug bounty payout ever" ?
- shabble 13y agoI read it as "ask a bunch of our guys for what they think it's worth, and pay out the average of those recommendations", but I'd have expected that to be pretty standard practice for any serious & non-obvious case.