4 ms·
I've always wondered this but felt too embarrassed to ask, screw it. Let's say the ubuntu 16 iso is infected with some kind of malware by a 3rd party. If they h
by thieving_magpie 10y ago
I've always wondered this but felt too embarrassed to ask, screw it. Let's say the ubuntu 16 iso is infected with some kind of malware by a 3rd party. If they have control of the file, would they not have control of the checksum displayed on the site? I can understand if the checksum is spread to other sites for cross-reference but I'm having trouble seeing why a checksum from the same location as the file you're downloading is worth anything.
Any insight?
- defective 10y agoIt's worth it for error-checking.
- eloisant 10y agoIf they infect at the source, yes. But if just one mirror is infected, or one of the CDN servers, the attacker may not be able to change the checksum on the official site.
- thieving_magpie 10y agoAh - that makes sense. I knew their had to be an easy answer but I couldn't see it. Thanks
- fulafel 10y agoThey GPG-sign the cryptographic checksums, see the .gpg files. If you don't verify the GPG sig, with Canonical's signing key obtained out of band, the checksum by itself is pretty useless as you describe. PS. anyone know of a CLI download tool that supports this format of GPG signatures? edit: why the downvotes for the parent? it's a fine question
- blueblob 10y ago`gpg` is a command line tool for verifying these signatures and it is what `apt-key verify` uses in it's backend. you can download the signatures with `curl` or `wget`
- defvar 10y agothe checksums are gpg signed.
- lwf 10y agoIf you have an existing Ubuntu system you trust, you can verify the authenticity of this release via: $ gpg --no-default-keyring --keyring /usr/share/keyrings/ubuntu-archive-keyring.gpg --verify SHA256SUMS{.gpg,} gpg: Signature made Thu 21 Apr 2016 10:40:38 UTC using DSA key ID FBB75451 gpg: Good signature from "Ubuntu CD Image Automatic Signing Key <cdimage@ubuntu.com>" gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: C598 6B4F 1257 FFA8 6632 CBA7 4618 1433 FBB7 5451 gpg: Signature made Thu 21 Apr 2016 10:40:38 UTC using RSA key ID EFE21092 gpg: Good signature from "Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com>" gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: 8439 38DF 228D 22F7 B374 2BC0 D94A A3F0 EFE2 1092 $ sha256sum --ignore-missing -c SHA256SUMS ubuntu-16.04-desktop-amd64.iso: OK (You can ignore the `WARNING`s above, since you're explicitly telling `gpg` to use a keyring you trust)
- thieving_magpie 10y agoI see. I'll do that from now on, that's pretty reassuring.
- rakoo 10y agoIt doesn't protect against a malware being included by default, it protects against a malware being inserted on the wire, ie between Canonical's HDD and your HDD; if a malware is inserted at this point then the checksum should fail. Coincidentally it requires the checksum to be propagated through an other, more secure mean, so distributing the checksum on the very same site increases the chance for an attacker to act, however there is no other way as widespread as this to give the checksum anyway.