News for hackers. Stuff that matters.
Re:Ubuntu 16.04 (Xenial Xerus) by thieving_magpie on Thursday April 21, 2016 @10:24AM (#11542344)
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?

Re:Ubuntu 16.04 (Xenial Xerus) by lwf on Thursday April 21, 2016 @10:47AM (#11542530)
If 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 <[email protected]>"
  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) <[email protected]>"
  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)
Re:Ubuntu 16.04 (Xenial Xerus) by thieving_magpie on Thursday April 21, 2016 @10:49AM (#11542544)
I see. I'll do that from now on, that's pretty reassuring.
Re:Ubuntu 16.04 (Xenial Xerus) by fulafel on Thursday April 21, 2016 @10:33AM (#11542427)
They 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

Re:Ubuntu 16.04 (Xenial Xerus) by blueblob on Thursday April 21, 2016 @10:51AM (#11542557)
`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`
Re:Ubuntu 16.04 (Xenial Xerus) by rakoo on Thursday April 21, 2016 @10:49AM (#11542539)
It 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.

Re:Ubuntu 16.04 (Xenial Xerus) by eloisant on Thursday April 21, 2016 @10:31AM (#11542408)
If 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.
Re:Ubuntu 16.04 (Xenial Xerus) by thieving_magpie on Thursday April 21, 2016 @10:33AM (#11542423)
Ah - that makes sense. I knew their had to be an easy answer but I couldn't see it.

Thanks

Re:Ubuntu 16.04 (Xenial Xerus) by defective on Thursday April 21, 2016 @10:30AM (#11542394)
It's worth it for error-checking.
Re:Ubuntu 16.04 (Xenial Xerus) by defvar on Thursday April 21, 2016 @10:36AM (#11542444)
the checksums are gpg signed.