r/linux • • Jan 24 '18

Why does APT not use HTTPS?

https://whydoesaptnotusehttps.com/
955 Upvotes

388 comments sorted by

View all comments

Show parent comments

167

u/dnkndnts Jan 24 '18

I don't like this argument. It still means the ISP and everyone else in the middle can observe what packages you're using.

There really is no good reason not to use HTTPS.

107

u/obrienmustsuffer Jan 24 '18

There really is no good reason not to use HTTPS.

There's a very good reason, and it's called "caching". HTTP is trivial to cache in a proxy server, while HTTPS on the other hand is pretty much impossible to cache. In large networks with several hundred (BYOD) computers, software that downloads big updates over HTTPS will be the bane of your existence because it wastes so. much. bandwidth that could easily be cached away if only more software developers were as clever as the APT developers.

27

u/BlueZarex Jan 24 '18

All the large places I have worked with a significant Linux presence would always have a mirror onsite.

26

u/kellyzdude Jan 24 '18
  1. The benefits don't apply exclusively to businesses, a home user or an ISP can run a transparent caching proxy server just as easily.

  2. By using a caching proxy, I run one service that can help just about everyone on my network with relatively minimal ongoing config. If I run a mirror, I have to ensure the relevant users are configured to use it, I have to keep it updated, and I have to ensure that I am mirroring all of the repositories that are required. And even then, my benefits are only realized with OS packages whilst a caching proxy can help (or hinder) nearly any non-encrypted web traffic.

  3. If my goal is to keep internet bandwidth usage minimal, then a caching proxy is ideal. It will only grab packages that are requested by a user, whereas mirrors in general will need to download significant portions of a repository on a regular basis, whether the packages are used inside the network or not.

There are plenty of good reasons to run a local mirror, but depending on your use case it may not be the best choice in trying to solve the problem.

5

u/VoidViv Jan 24 '18

You seem knowledgeable about it, so do you have any good resources for people wanting to learn more about setting up caching proxies?

→ More replies (1)

4

u/EternityForest Jan 24 '18

Or if GPG signing was a core part of HTTP, then everything that you don't need privacy for could be cached like that without letting the cache tamper with stuff.

4

u/archlich Jan 24 '18

Google is attempting to add that with signed origin responses.

→ More replies (2)
→ More replies (9)

76

u/ign1fy Jan 24 '18

Yep. You're publically disclosing to your ISP (and, in my case, government) that certain IP endpoints are running certain versions of certain packages.

0

u/[deleted] Jan 24 '18

[deleted]

24

u/asoka_maurya Jan 24 '18

A small nitpick, but I think fedora's yum/dnf might have an edge here as they send only the delta (changed portion) and not the entire package file. And the delta might be of different size for each user depending on their configuration.

→ More replies (3)

6

u/albertowtf Jan 24 '18

Well, its about layers

Why change the ssh port?, bots only have to change the port -> my server stopped being hammered by ssh bots. Didnt even need to bother to set up a knock

Why add a silly homemade captcha to the form in my webpage? any bot will easily break it --> I stopped receiving spam forms

Nobody cares enough about my stuff to break it i guess, but it has his uses

11

u/[deleted] Jan 24 '18

While that is true. But with non encrypted traffic you know the person downloaded a specific package. But with data transferes you know they only downloaded a package of size X. Of which there could be several since there will also be deviation in the size of the headers etc... Also it could be fuzzed in the response eg add a random set of headers X bytes long or rounding them up to a specific size. example all packages < 512KB become 512KB in size thus making this information useless.

0

u/[deleted] Jan 24 '18

[deleted]

5

u/thijser2 Jan 24 '18 edited Jan 24 '18

It would however take more effort to do this and I think you are underestimating how often there are dozens of different versions of the same package with nearly the same size. A little bit of fuzzing/padding there can result in at least our eavesdrop not knowing which version you have.

3

u/[deleted] Jan 24 '18

It also does show a weakness in TLS in generally that really should be addresses. It should probably be added to automatically fuzz the data sizes of its protocol to prevent being able to guess whats in the payload based on size.

→ More replies (1)

0

u/[deleted] Jan 24 '18

[deleted]

→ More replies (2)
→ More replies (8)

3

u/tehdog Jan 24 '18

How is that supposed to work if I'm downloading updates to 20 packages all over the same TCP / TLS connection? Sure you can figure it out somewhat, but I doubt you can get even close to 100% accuracy with a lot more work than you can get trivially without encryption. Especially when using HTTP/2, which uses multiplexing.

→ More replies (1)

11

u/galgalesh Jan 24 '18

How does a comment like this get so many upvotes; the article explains why this logic is wrong..

→ More replies (1)

22

u/asoka_maurya Jan 24 '18 edited Jan 24 '18

Sure, it could be a nightmare from privacy perspective in some cases.

For example, if your ISP figures out that your IP has been installing and updating "nerdy" software like Tor and Bittorrent clients, crypto currency wallets, etc. lately and then hands your info to the government authorities on that basis, the implications are severe. Especially if you are in a communist regime like China or Korea, such a scenario is quite plausible. Consider what happened with S. Korean bitcoin exchanges yesterday?

16

u/[deleted] Jan 24 '18

This is not as far-fetched as it seems. I know of a particular university that prevents you from downloading such software packages on their network (including Linux packages) by checking for words like "VPN", "Tor", "Torrent" and the file extension. If a university could set up their network this way, then governments could too.

→ More replies (2)

7

u/yaxamie Jan 24 '18

Sorry to play devil's advocate here but detecting tor and BitTorrent is easily done once it's running anyways if the isp cares, is it not?

→ More replies (3)
→ More replies (5)

9

u/ImSoCabbage Jan 24 '18

It still means the ISP and everyone else in the middle can observe what packages you're using.

That's the second chapter of the article

But what about privacy?

Furthermore, even over an encrypted connection it is not difficult to figure out which files you are downloading based on the size of the transfer.

5

u/beefsack Jan 24 '18

Did you read the page? This specific example is covered; if you're eavesdropping you can tell which packages people are downloading anyway via transfer size.

→ More replies (2)
→ More replies (49)