4 ms·
Another scary thing is that despite not including it, when you do have a need for it you're advised to install apt-transport-https[0]. I can't remember the spec
by giancarlostoro 8y ago
Another scary thing is that despite not including it, when you do have a need for it you're advised to install apt-transport-https[0]. I can't remember the specific package that requires me to go this route, but it always reminds me "oh they're not using https", I'm surprised they don't pull over SSH or something, doesn't git work with SSH as well?
[0]: https://packages.debian.org/sid/apt-transport-https https://packages.debian.org/sid/apt-transport-https
Edit:
It was VSCode:
https://code.visualstudio.com/docs/setup/linux https://code.visualstudio.com/docs/setup/linux
So Microsoft provides apt packages over https, but Debian doesn't.
- chungy 8y ago> So Microsoft provides apt packages over https, but Debian doesn't. See https://deb.debian.org/ https://deb.debian.org/ -- it works just fine. HTTPS might prevent some kind of surveillance, entities (ISPs, governments, any other MITMs) from determining what kind of packages you're installing, and this might be beneficial, but plain old unencrypted HTTP is often faster if these aren't a big concern (they likely aren't in most developed nations and for most occupations). Lack of encryption overhead as well as transparent proxies being able to serve files are huge boons to this.
- dTal 8y agoThe article points out that HTTPS offers almost no protection against this kind of surveillance, since packages are almost uniquely identifiable by size.
- zaarn 8y agoWith HTTPS you would be able to use HTTP/2 which means you can multiplex a single connection and once you download more than 2 packages, identifying which you installed is impossible. With plain HTTP it remains possible no matter how much pipelining you do.
- icebraining 8y agoWell, maybe; how do HTTP/2 servers allocate bandwidth? If they do it per-stream, you can still identify the size of each package by watching the total connection bandwidth decrease when each package ends. If they allocate it for the whole connection, then all they get is a total, which still gives the attacker some information (there's a limited combination of packages that sum up to that number).
- zaarn 8y ago>(there's a limited combination of packages that sum up to that number). That is a really hard problem to solve. See the knapsack problem. Imagine I downloaded 5 packages. Debian has about 68'000 packages. That means there is a total of 1 septillion combinations. If you could check 1 trillion package combinations per second, it would only take 20 thousand years to solve (40 thousand worst case).
- yc12340 8y agoYou are assuming, that all packages are equally interesting (and your math does not account for package dependencies). In practice, attacker either does not care about your packages, in which case hiding that information gains you nothing, or wants to be alerted, when you (or anybody else) install one of few specific packages. Those combinations can be computed in advance and identified in traffic.
- zaarn 8y agoNot necessarily, I think you underestimate the complexity of this attack. Even if you were interested in a few packages, if any additional packages are mixed in or if dependencies are already installed, this problems become a lot harder again. While HTTPS doesn't make such an "attack" impossible, it makes it very hard and compared to HTTP the attacker cannot inject or replace data (replay attacks are possible with APT on plain HTTP)
- dTal 8y agoI was thinking that - there would have to be zero latency between requests to avoid leaking package size information. Not impossible, but damn hard.
- deleted 8y ago[deleted]
- garmaine 8y agoBecause why bother? They’re checking hashes of packages and digital signatures of the hashes. Why tax your system with needless session encryption of large data transmissions?
- isostatic 8y agoApt supports SSH (and https). The reasons not to do it for the default repos are explained in the article -- caching, complexity of keeping https certificates uptodate.
- myfonj 8y agoCaching, or more precisely the benefit of ability to cache HTTP response payloads (on shared caching proxies for example) is, to my surprise, actually not mentioned in the article. I'd expect it to be the number one reason to stick with HTTP in this case, not the described hassle and futility of HTTPS.
- cesarb 8y agoIn my experience, the number one reason to NOT stick with plain HTTP would be "transparent" shared caching proxies which cache older copies of files long after they've been replaced on the server, cache incomplete downloads as if they were complete downloads, and misbehave in several other annoying and hard-to-diagnose ways. By using TLS, these broken middleboxes often can be bypassed.
- pritambaral 8y agoSuch caches can be bypassed by switching mirrors. There are https mirrors, even onion mirrors. Mandating https leaves no alternatives.
- myfonj 8y agoAh, it is interesting insight, and sure, debugging with such broken middlebox must be serious bummer I believe. Are they really that frequent? (I'm not devop, so asking in all sincerity, since I cannot recall dealing with them myself.) Anyway, I assume there are very few (if any?) scenarios with no way to overcome such bug in broken proxy (yes, after that exhausting investigation, but still) and there are obvious potential benefits in scenario when such middlebox does its work well. With TLS (as I understand it) those potential benefits as well as potential bugs are just tossed away together (I'd not use therm 'bypassed' here) and every single download is forced to be made along full wire length, what could be pretty nasty in some locations. Eric Meyer recently wrote interesting article [0] on this topic. (I understand it is all quite obvious stuff, but well expressed IMO.) [0] https://meyerweb.com/eric/thoughts/2018/08/07/securing-sites-made-them-less-accessible/ https://meyerweb.com/eric/thoughts/2018/08/07/securing-sites... [0][HN] https://news.ycombinator.com/item?id=17707187 https://news.ycombinator.com/item?id=17707187
- dTal 8y agoThe point of the article is that Debian's trust model does not privilege the package servers - anyone can set one up, using whatever hair-brained technology they want (even, say, BitTorrent). The packages are individually signed and verified. SSL doesn't get you anything. It's the end-to-end principle in action.
- majewsky 8y ago> SSL doesn't get you anything. With TLS, Eve cannot see (as easily) which packages Alice is downloading from Bob's mirror. If she could, Eve could use that information to decide which exploitable applications to target on Alice's machine.
- pdw 8y agoEven with TLS, Eve can still see the size of the transfer. That's enough to reliably guess which packages were fetched.
- rhacker 8y agoThis was discussed elsewhere in the same discussion - basically the size of a download would be too similar for many packages and the fact that there are keep-alives would make it look like on impossible to decrypt stream anyway with no sizing data at all.
- yc12340 8y ago> So Microsoft provides Speaking of "scary things"... Don't they default to decentralized updates in Windows 10? Sounds like simply joining the swarm will disclose anyone, what update packages you download and when. Does that mean, that Windows 10 uses "less secure" protocol for downloading it's own updates, than for downloading WSL updates with apt?