Is it good to have only HTTPS mirrors in your mirrorlist, since it's encrypted?
Not downloaded yet
Edit: Yes.
Edited 1 Nov 2020. We only hold this version.
About this post
- Posted
- Archived
- Edited
- Score
- 132 · 98% up
- Kind
- Image
- ID
- it283g
Edit: Yes.
Edited 1 Nov 2020. We only hold this version.
33 comments
It prevents MITM attacks when packages and databases aren't signed, but I don't know enough about how pacman works to tell you if it's really needed.
Personally I only use https, but that's because I'm paranoid.
Yes, the package databases are not signed.
It's also true that TLS helps to mitigate that weakness by ensuring a database isn't modified in transit. The mirror itself could still become compromised, of course. The latter is the most realistic method of attack in the first place, I would think, if a third party wished to serve you a bogus DB. Additionally, I suppose it also helps hide which packages you download from the mirror if you care about that.
So https mirrors slightly help protect you against the meagre danger of a bogus package database. On the flip side, there's hardly any reason not to use https mirrors, especially if there are sufficiently many high quality https mirrors available for you to choose from in your region.
IMO you should use them if you can, but don't sweat it if you can't.
What is the implication of package databases not being signed? As long as the packages themselves are signed it doesn't seem like a compromised mirror could do much
Deleted before we saved it.
Deleted before we saved it.
If the connection is unencrypted (or at least unauthenticated), a MiTM could exploit flaws in the update process of the package manager itself, so it is a good idea to to use HTTPS as a mitigation.
https://justi.cz/security/2018/09/13/alpine-apk-rce.html
https://justi.cz/security/2019/01/22/apt-rce.html
https://security.archlinux.org/CVE-2019-9686
https://security.archlinux.org/CVE-2019-18183
Could both be exploited over an unencrypted channel, so you are indeed correct.
Deleted before we saved it.
Encryption isn't the main problem. It's Man in the Middle.
TLS also verifies authenticity of the server. You want to make sure you are getting binaries to install on your system from a verified location not a potentially spoofed location.
Using https only does have security and anonymity advantages, but in my opinion, the advantages gained are not enough to justify not using the http mirrors.
I use both. I start with the https mirrors for my country, and then use the https mirrors for the next closest country, then the next closest and so on. Finally I end my list with the http mirrors; starting with my country, and going to the next closest, as with the https ones.
As the mirrors are read in sequence going down the list from top to bottom, this means I rarely use the http mirrors, as pacman rarely reaches that point in the list; but, they are there, as backups, if for some reason the https mirrors all fail. Or for the rare occasion when a package I want is only available from an http mirror.
Worth noting SNI part of the handshake isn't encrypted so any party listening on the wire will know the vhost you're connecting to.
HTTP mirrors provide the baseline. HTTPS mirrors provide both the baseline and some added benefits. In my opinion, it's enough to drop HTTP from the mirror list.
I would prefer using https mirrors only, but there just aren't enough of them that provide fast, reliable service.
I use the ones located in Germany as they're the fastest for me in EU and it uses almost my whole bandwidth so I get 30+MB/s.. can't complain tbh..
Pacman 6 will come with parallel download support. Meanwhile you can use my script pactman-parallelizer...
I use only HTTP mirrors because:
Deleted before we saved it.
Do you care to explain why?
Deleted before we saved it.
At this point in the internet, there should almost be no such thing as http; only https. I agree with @couye
Especially when it comes to downloading core packages for your operating system.
I’ve downloaded rpms and docker images from questionable sources “because it was easier,” only to find bitcoin miners in our dev stack because libraries can be patched easily by a sufficiently motivated party.
That, of course, can also be done over https. But any party who takes the time to put their ssl certificate on their repo/mirror is also probably actually paying attention to the contents of their repositories.
It is definitely about security on a technical level for things like man in the middle, but importantly about the quality of the remote data. You can post an evil file on a remote site and update a checksum fairly easily. I look for indicators that the remote side is responsible for their data, and one of them is https.
I know this thread is a little old now, but I've been using reflector: https://wiki.archlinux.org/index.php/Reflector
It keeps you mirrorlist up to date as you want it, and you can configure it to only use https mirrors.
I use both. It gives me more options for downloading.
Of course is it ;)
No explanation is needed !
You should run away from HTTP !
Why?
The packages are all signed and checksumed. HTTP is perfectly safe in this context, you can't modify the packets in transit to add malware/etc because then the package would be discarded and downloaded from another mirror until it finds one that matches the checksums and signatures.
You're right, the packages are checked.
But firstly, it prevents data leakage (even though HTTPS is decodable during an MITM, it is deterrent). Then we are not immune to a still undiscovered vulnerability (at least to the public).
If we care about security, we might as well go all the way.
I don't recommend it, because it wastes cpu and ram. you have to be using shitty network to get man in the middle attack. you probably should worry about many more other things under such network.
This tops the stupid things I have read this week.
The cpu overhead of TLS is minimal on modern chipsets, even for web servers that are doing tens/hundreds/thousands of requests a second: https://istlsfastyet.com/ When you're downloading a half dozen packages you shouldn't even think about it.
ISPs like to MitM, as do governments, and rarely do you have a choice about either.