12 ms·
D-Link publishes code-signing private keys by mistake
- mindslight 11y ago> "It turned out what to look through the files that were in private keys to sign with code", reports bartvbl, "In fact, in some batch files were the commands and pass phrases that were needed." A company finally holds up their end of the GPL by including all source needed to create a working build, and it's called a mistake!? For every device requiring images to be signed with a specific key, this is exactly what the manufacturer should be forced to release!
- ryan-c 11y agoIf they're going to release the signing keys, why bother with signing?
- userbinator 11y agoIf you want to believe that the release was deliberate, then it's all part of the act - signing could've been just a point in a requirements document. https://news.ycombinator.com/item?id=10236827 https://news.ycombinator.com/item?id=10236827
- infamouscow 11y agoThis is the fundamental disagreement between Linus Torvalds and the FSF over the GPL.
- deleted 11y ago[deleted]
- eridius 11y agoThis is absolutely a mistake. The whole point of requiring the firmware to be signed with a specific private key is to prevent third parties from installing their own custom firmware (e.g. to prevent malicious actors from installing malware onto the device). If you want to let everyone install their own build, then just don't require the code signature (or, alternatively, create a program where third parties can request a certificate signed with your master, so they can then sign their own binaries, similar to how iOS development works). > For every device requiring images to be signed with a specific key, this is exactly what the manufacturer should be forced to release! What do you mean by "should" here? If the source is covered by GPLv3, then yeah, if they use code-signing they need to have some way to let you get around it. That's the point of the anti-tivoization clause. But if the software is distributed under GPLv2, or any other license, then there's no anti-tivoization restriction, and therefore no "should" about it.
- mindslight 11y ago> The whole point of requiring the firmware to be signed with a specific private key is to prevent third parties from installing their own custom firmware Yes, which is blatantly anti-GPL2. I really wish any Linux copyright holder would step up to the plate and force the argument that since code+signature is the functional unit, adding the signature makes a derivative work and its source must be released in the preferred form for modification. The entire point of the GPL2 is that a developer who creates code and receives a modified version back should be able to modify that instance of code - tivoization is entering into the license in bad faith. Of course going GPL3 would make for a more solid foundation for doing so, but clarifying this subject directly conflicts with the desires of the proprietary sponsors - Google etc.
- kinghajj 11y agoI was under the impression that while it may be against the spirit in which GPL2 was written, it was an oversight and the necessary changes were made to GPL3.
- mindslight 11y ago
- ambrop7 11y agoSurely one doesn't have to use the same certificates for the firmware verification of boot images and for the signing of Windows applications.
- ossreality 11y ago....... wtf are you talking about? why bother signing? why bother trying to have any security then? if you wanted to argue for allowing enrollment of one's own private keys, then I'd agree, but otherwise it seems like you're just parroting something without understanding what youre asking for.
- scrollaway 11y agoI think a lot of people here will agree with you in spirit, but this is getting very controversially received because it's unclear whether this was a "leak by incompetence" or an actual "we want to follow GPL2 and therefore we have to do this".
- dogma1138 11y agoIndeed what world would we be living in where people couldn't sign malware and even malicious drivers for rootkits using the keys of one of the largest home networking corporations.
- e3b0c 11y agoThen what's the purpose of signing in the first place? The keys for official releases are supposed to be kept by a trustworthy senior management or some people with highly restricted privilege. Also the software/firmware shipping process must be well audited if there are serious (not just pretending to be) security requirements. The keys should not be exposed to a random technician or a new hire who can possibly responsible for destroying your and your clients' businesses. It looks like they didn't have a quite "formal" shipping flow at least in this case.
- smcquaid 11y agoHorrible .. but the certs expired in early September so not currently relevant except to monitor history/past infections/malicious activity
- 05 11y agoEven if the expiration date is checked, it's easy enough to change the date before flashing new firmware
- pg_is_a_butt 11y agochanging the expiration date would break the hardcoded public key used to authenticate the signing key, genius. here's your security dunce hat. go sit in the corner. /\
- pwnna 11y agoGoogle translate doesn't seem to be 100% clear, but the signing key is actually for some windows software, rather than device firmware. Is that correct?
- callesgg 11y agoFrom what i understood they explained it with the windows software thing but the key we are talking about is actually used to sign firmware. Since most routers dont require signed firmware this just makes the few that does as bad as them. Personally i would think the likely hood that the key would be used for good(Open WRT) is far greater than that it would be used for bad. On a general note: Consumer routers are in my experience generally very easy to hack in to stuff like http://192.168.1.1/setting.cgi?setname=`echo http://192.168.1.1/setting.cgi?setname=`echo 'password' | passwd` is not uncommon so altering the firmware is seldom needed.
- rasz_pl 11y agoIt is NOT by mistake. Dlink engineers are INCREDIBLY INCOMPETENT. Let me remind you this excellent piece: http://www.devttys0.com/2015/04/what-the-ridiculous-fuck-d-link/ http://www.devttys0.com/2015/04/what-the-ridiculous-fuck-d-l...
- dguaraglia 11y agoPedant hat on: still a mistake. Driven by shitty engineering, sure, but it wasn't done on purpose.
- jandrese 11y agoThe best hacks are the ones that look like mistakes. It's the reason plausible deniability is one of the judging criteria in the underhanded C contest.
- mahouse 11y agoDon't say "incompetent" when you mean "they don't give a fuck" or "this software was subcontracted to the India".
- fixermark 11y ago"not having or showing the necessary skills to do something successfully" Demonstration of necessary skills failed. Incompetent.
- parennoob 11y ago"subcontracted to the India"? With language that poor, people like you deserve to replaced by subcontracting out to "the India".
- mahouse 11y agoI'm sorry, I don't speak English natively. Any correction is welcome.
- tjohns 11y agoThis is precisely why you store your signing keys in a HSM attached to your build server, precisely so that it's impossible to leak them (either by malice or incompetence).
- johansch 11y agohttps://en.wikipedia.org/wiki/Hardware_security_module https://en.wikipedia.org/wiki/Hardware_security_module - since the parent poster seemed to feel the need to use an extremely uncommon acronym to show his or her superiority.
- MichaelGG 11y agoA: It's not an extremely uncommon as acronym and anyone participating in a discussion on key management probably knows it. B: It's best to assume a commenter is acting in good faith and not trying to show off their "superiority".
- __david__ 11y agoThanks for the link! > since the parent poster seemed to feel the need to use an extremely uncommon acronym to show his or her superiority. That was uncalled for, though.
- estsauver 11y agoIt's really not that uncommon. I think "If there's an AWS product for it, it's not that obscure" is a reasonable standard. You could pretty clearly google "keys HSM" and it would show up.
- ajnin 11y agoI don't think that "can be found on Google" is a very good criterion for commonness...
- simoncion 11y agoGiven that there's so much out there to know, and that each field has its own commonly-used acronyms, I do think that if you can find the -correct- definition of an acronym in the first ten Google search results, then (IMO) that acronym is common. As an example: Would you consider RAM to be a common acronym? If you work with computers you're very likely to answer "Yes." or "Hell yes." to that question. But, there are many people out there who have no idea how to expand RAM into its parts, and may not have ever heard the term. Yet, the expansion of RAM is in the top ten Google search results for the term. (It's in my top two.) Additionally, I know what an HSM is, and I don't even work in a field that requires their use.
- radicalbyte 11y agoHere's my translation: D-link has accidentally published private keys for certificates which they use to sign their software. It was possible to extract the keys from the manufacturers open source firmware packages. That made it possible for Criminals to abuse the certificates. [short explanation of how the certs work for n00bs] The mistake was find by bartvbl who informed the reporter of the problem. He had bought a D-Link DCS-5020L security camera and wanted to download the firmware. D-Link makes the source from lots of firmware available under a GPL license. "After looking through the files it turned out that the they contained the private keys which are used to sign the code" reported bartbvl, "It gets worse - some of the batch files contained the commands and passphrases that were needed [to sign the software". The user was able to confirm that the key could be used by signing a file that wasn't from D-Link. The certificate expired at the start of september, which means that the trick no longer works. Even now that the expiry date has passed, software which has been signed will still be seen as being valid. Windows only shows a certificate error after the certificates have been withdrawn. This withdrawal has already happened so this [bug/failure] cannot be abused. Software security specialists Fox-IT confirm the findings. Yonathan Klijnsma, a researcher from the company: "The certificate was indeed in one of the firmware packages, version 1.00b03, the source of which was released on 27-feb-2015. The cert was thus published before it expired, which is a big error". He [, Yonathan,] found four other certificates in the same folder. D-Link have in the meantime released new versions of the firmware which do not contain the certificates. In a statement the company told us that they regularly update the firmware in order to 'conform to the latest security and quality standards'. They emphasized that there is no question of [malicious] premeditation. "D-Link [does everything to prevent development of backdoors, bla bla boilerplate PR speak, etc etc]". D-Link promised Tweakers that they will release a new firmware next week which contains further fixes for the security problems.
- radicalbyte 11y agoTLDR: D-Link accidentally included their certs and batch files containing passcodes in a beta package of their firmware. Problem has been fixed so it's no longer an issue.
- 11y ago
- aqwwe 11y agoif this allows anyone to use their D-Link hardware however they see fit, I'm all for this kind of mistakes...
- jeremonda 11y agoThe fact that D-Link published code-signing private keys by mistake, is why we need ethics in code-signing.
- devy 11y ago> Furthermore, the company Tweakers promises that early next week new firmware comes out which security issues are also resolved. Very assuring! I am worried about my other D-Link home surveillance cam products now.
- jheriko 11y agoand when was code signing any real kind of security anyway? its always felt more like a protection racket to me... especially when you can takes someone's codesigned stuff and resign it. getting the ability to code sign requires just money, time and a bare minimum of paperwork... the trusted authority on these things is completely untrustworthy by the nature of their business imo.