11 ms·
Hmm, it's almost as if the author of https://whydoesaptnotusehttps.com/ https://whydoesaptnotusehttps.com/ may have overlooked a few things.
by rabi_penguin 8y ago
Hmm, it's almost as if the author of https://whydoesaptnotusehttps.com/ https://whydoesaptnotusehttps.com/ may have overlooked a few things.
- loeg 8y agoYou know that HTTPS has the Location header too, right? This attack works just as well against HTTPS clients.
- jamp897 8y agoHe never explains why he wants to use HTTP, it’s only about why he thinks HTTPS isn’t nesscary.
- AndyKelley 8y agoHTTP is the null hypothesis, since it's simpler. Usually there is a great reason to reject this null hypothesis - it prevents security vulnerabilities. But if there is no added value, then there is no reason to do it. Consider, why not double-wrap your stream? Put TLS on top of TLS on top of HTTP?
- jamp897 8y agoYet it’s actually not simpler for the user, since their transfer can then be tampered with either by accident or intentionally leaving the user with a broken download and then what do they do? A redownlaod from a different mirror makes no difference.
- AndyKelley 8y agoThe situation you described is the same thing that happens with a MITM attack with HTTPS. You would get a failed download from any mirror. Do you have a response to my question? "Consider, why not double-wrap your stream? Put TLS on top of TLS on top of HTTP?"
- nneonneo 8y agoBecause that just makes things slower for no good reason?
- loeg 8y agoSounds like an argument for rejecting HTTP+TLS single-wrap too. (For apt — not in general.)
- nneonneo 8y agoI was being glib because I didn’t think I needed to explain fully, but here we go. Double-encrypting something with the same technique is pretty much always a sign of cargo cult crypto. Modern ciphers, like those used by TLS, are strong enough that there’s no reasonable way to break them applied once, and the downside is that applying them twice is making things slower than they need to be for zero added benefit. On the other hand, TLS and PGP are very different things serving very different purposes, so nesting those makes sense. There is an added benefit from TLS, namely that you ensure that everything is protected in transit - including the HTTP protocol itself (which is currently not protected and which might be subject to manipulation as shown in this post). Plus, it provides some resistance to eavesdropping (and with eSNI + mirrors hosted on shared hosts, that resistance should improve further).
- jamp897 8y agoIt’s not the same, Comcast and other ISPs don’t tamper with HTTPS, and if they break the HTTPS connection then it’s a clearer problem for the ISP to troubleshoot than corruption. Sorry I don’t understand what double wrapping has to do with it, or why you’d ever do that.
- greglindahl 8y agoIt's worth noting that a large number of people don't agree with you that HTTP is the null hypothesis. Instead, they think that HTTPS is a security/privacy best practice and a great part of defense in depth. You can see this pro-HTTPS opinion all over this discussion. As for your "consider", I personally do double-wrap many streams: I have a VPN for my browser. The VPN is great for hiding my home traffic from being spied on by my ISP. Without the VPN, HTTPS streams would reveal hostnames (SNI) and IP addresses to my ISP.
- yjftsjthsd-h 8y ago> Consider, why not double-wrap your stream? Put TLS on top of TLS on top of HTTP? If it's the exact same implementation then that doesn't really add a second layer. If, however, I am provided the option to run HTTPS over a VPN tunnel, then I would happily do that in a heartbeat. In fact, I frequently do run my web traffic over a proxy, thereby giving it at least two layers of encryption.
- LoSboccacc 8y agoalso, the apt way to fix this would be to a) move release.gpg out of the package path and b) require the release.gpg to be wrapped and signed with the previous valid key instead of being accepted blindly
- guest2143 8y agoSome country's firewalls distrupt https, which makes downloading things via https difficult.
- jamp897 8y agoWhich countries? I’ve only seen HTTP connections tampered with in practice, and China’s GFW blocks HTTP no different than HTTPS from what I’ve seen.
- DoctorOetker 8y agoso if north korea is subjugating some poor souls over there, the whole world must suffer along? there could be a setting with a big warning to disable the default HTTPS behaviour...
- tinus_hn 8y agoSo you create an non default http mirror for that minority, instead of making the majority insecure.
- eeZah7Ux 8y agoAlso some companies, to allow IDS to inspect traffic without having to extract keys from clients.
- moviuro 8y agoOTOH, they would have been right if there had been (yet another) bug in openssl/whatever lib would be used for https. FWIW: 16 vulns in apt in NVD [0]; but 202 for openssl [1] [0] https://nvd.nist.gov/vuln/search/results?form_type=Advanced&results_type=overview&search_type=all&cpe_vendor=cpe%3A%2F%3Adebian&cpe_product=cpe%3A%2F%3A%3Aapt https://nvd.nist.gov/vuln/search/results?form_type=Advanced&... [1] https://nvd.nist.gov/vuln/search/results?form_type=Advanced&results_type=overview&search_type=all&cpe_vendor=cpe%3A%2F%3Aopenssl&cpe_product=cpe%3A%2F%3A%3Aopenssl https://nvd.nist.gov/vuln/search/results?form_type=Advanced&...
- jwilk 8y agoHow many of these would result in RCE?
- dijit 8y ago64? https://nvd.nist.gov/vuln/search/results?form_type=Advanced&results_type=overview&query=RCE&search_type=all&cpe_vendor=cpe%3A%2F%3Aopenssl&cpe_product=cpe%3A%2F%3A%3Aopenssl https://nvd.nist.gov/vuln/search/results?form_type=Advanced&...
- detaro 8y agoFulltext search for "rce", which finds "resou_rce_", "sou_rce_", does not give a number of RCE vulnerabilities.
- dijit 8y agoExcept that "EXACT MATCH" is enabled, try yourself. (It should be noted that it /does/ match on "possible RCE", which buffer overflows are often tagged with.)
- detaro 8y agoI have. Search for "ontgome" and it finds the bugs containing "Montgomery" (I have taken your url and just replaced the search word): https://nvd.nist.gov/vuln/search/results?form_type=Advanced&results_type=overview&query=ontgome&search_type=all&cpe_vendor=cpe%3A%2F%3Aopenssl&cpe_product=cpe%3A%2F%3A%3Aopenssl https://nvd.nist.gov/vuln/search/results?form_type=Advanced&... I'm not saying none of the results from your search are RCEs, but not all are, and many are fairly speculative.
- jwilk 8y agoDiscussed yesterday: https://news.ycombinator.com/item?id=18958679 https://news.ycombinator.com/item?id=18958679
- kerng 8y agoMakes me chuckle, since my comment on the HN post yesterday that highlighted that someone will be bitten if security principles are ignored got downvoted.
- black_holed 8y agoWell, they didn’t fall into the black hole of “moderation” at least...
- ru999gol 8y agoI was laughing as well, software people (the HN and open source community in particular) are so stupidly opinionated sometimes, it makes me just cringe whenever its impossible to ignore their dribble. There really is no excuse not to use HTTPS in 2019, period.
- spuz 8y agoI think I understand the exploit but I don't understand whether apt using https would prevent it or not. The author says: > Yes, a malicious mirror could still exploit a bug like this, even with https. and: > I wouldn’t have been able to exploit the Dockerfile at the top of this post if the default package servers had been using https. So which is it?
- hannob 8y agoHTTPS: A malicious mirror operator can pwn you. HTTP: Everyone can pwn you. Not saying the first one is ideal, but the second one is definitely worse.
- trulyrandom 8y agoWith HTTP an attacker still has to MITM the connection between you and the mirror operator. So, definitely not "everyone".
- DoctorOetker 8y agothe moment we are talking about monitoring user's software base, we are practically already talking attackers at the skill level of nation states, so yeah "everyone" in the subset of plausible attackers.
- cryptonector 8y agoThat includes: coffee shops, ISPs, employers, everyone who can hack their routers, anyone who can spoof DNS, etc. That might as well be "everyone". STOP IT. Though shall use HTTPS.
- trulyrandom 8y agoFair enough. I agree that HTTPS is valuable here. I was just being overly pedantic, my bad.
- detaro 8y agoBoth. Without HTTPS, you can execute the attack if you can MITM the connection to the package repository. If HTTPS is used, you need to be the package repository to do the attack, or need a certificate to MITM the connection so you can pretend to be it.
- _wmd 8y agoEvery time this site comes up people entirely miss the point in this regard -- Debian operates a large voluntary network of mirrors. You are not trusting content coming from Debian, you're trusting it coming from the mirror. SSL only secures the link between the client and the potentially compromised mirror, it does not solve problems like the one from the article. Meanwhile it's worth pointing out that OpenSSL has historically been one of the buggiest pieces of code in existence. Despite this being a game over RCE, it's the first of its kind in many years. If OpenSSL had been in the mix, Apt would have required forced upgrades /far/ more often. https://www.openssl.org/news/vulnerabilities.html https://www.openssl.org/news/vulnerabilities.html
- raesene9 8y agoI don't think that an argument that using HTTPS actively decreases the security of a connection really holds all that well. If you don't think OpenSSL is a high enough quality implementation, there are many others to choose from. Even with a range of mirrors, it would still raise the bar for attackers, to require HTTPS.
- all_blue_chucks 8y agoThat's because security requires defense in depth. If the failure of a single security control can invalidate your security model, your security model is inadequate. It should require multiple things to go wrong for catastrophic failure. This is a lesson from engineering that hasn't made its way to software development yet (outside of security engineering, anyway).
- whydoyoucare 8y agoI believe several terms here need a context, without which they are meaningless. For example, what is an acceptable security model to download and install an OS, how do you exactly define "defense in depth" for the act of downloading and installing an OS, etc.. That will help us define what controls should be in place for the overall OS-download-and-install experience to be secure.
- all_blue_chucks 8y agoDefense in depth is just an industry term for redundant security. For example, you can mitigate tampering with data transfers by signing the data itself AND ALSO by signing the channel it's transferred over with TLS. If a flaw is found in one of those methods, the other will still protect you. The process of listing all the security failure points and documenting the redundant mechanisms to protect them is called threat modeling. For a system that installs OS-level binaries as root, it would absolutely be appropriate to threat model it and hold it to a defense in depth standard. In defense systems, they often require three levels of defense in depth, the last being an air gap network.
- whydoyoucare 8y agoYes, this works. In theory. In practice, a simple model is needed that everyone can follow and implement consistently. That, does not exist. Lookup "threat modeling" and you will see how abstract a notion it is (even your comment calls for a "redundant mechanism" that may not be exactly what you are looking for), and how little information is available. End result? Most do it for the "checkbox effect". Don't get me wrong, I am not trying to obliterate what you said, just putting some factual data around it.
- squirrelicus 8y agoI was just coming here to post that
- snek 8y agoI will never understand why people are so proud to have gotten rid of "needless" security. It always ends the same way...
- lvs 8y agoThey (ubuntu, at least) have always been overtly hostile about this issue, which seems strange. I recall seeing open issues that just devolved into argument for many years on this. I don't get it.