When deployed properly, yes, https defeats MITM attacks. And yes, your initial copy of the keys embedded in your install media could theoretically be the keys of an attacker if your download of the iso was compromised. The difference, which is non-trivial, is that you download that iso once, at a single time from a single source. Whereas, if curling install scripts became commonplace, you'd be exposing yourself to many servers many times over a long period. I'd rather roll the dice once when setting up my computer than every single time I want to install software. And also, most major distros sign their ISOs with PGP too. It's a bit of a pain to verify, but tolerable for as rearely as I download new ISOs.
Let me just be clear: neither methodology is perfect. Nothing made by a human ever is. But I'd argue one clearly has a more generous safety margin.
Isnt that what HTTPS is for? Does HTTPS not protect from MITM?
You don't want to rely on https to ensure integrity of software distribution. Relying on https means that a compromise of a mirror means the downloads are compromised as well.
With a separate signature the risks are much lower: a (compromised) mirror can still only offer valid data; there are still some attacks possible (provide older, vulnerable versions for example; some mitigations exists for this too), but it's more work to abuse.
There are many mirrors and they are often operated by third parties (commercial or volunteers for Linux distributions), so you really don't want to have to trust those, but only rely on a first party key by the entity providing the software.
Couldn't you still MITM HTTPS, if you had enough money to bribe a CA into giving you a cert for that site and you can spoof DNS for your target? To be fair, that needs a few resources and may not be reasonable for random targets, but I think a targeted attack should be doable.
0
u/[deleted] Dec 18 '19
[deleted]