The process of creating a startup disk on Ubuntu looks really vulny to me. It's scary in a number of ways. Please either (1) refute my assertions with contrary evidence or (2) tell me how to avoid these pitfalls (hopefully without giving up on Ubuntu as a quasisecure OS).
First of all, here's what I tried to do:
Write an Ubuntu ISO (hash authenticated) through Pen Drive Linux on Windows, to a USB stick, resulting in a bootable image.
Install the resulting boot image on Computer A.
Write the same ISO to another USB stick on another machine using Startup Disk Creator from within an existing different Ubuntu context.
Install the resulting boot image on Computer B.
Use Startup Disk Creator on Computer A to make a new bootable USB stick using the original ISO above, resulting in Image A.
Use Startup Disk Creator on Computer B to make a new bootable USB stick using the same ISO, resulting in Image B.
Compare Image A and Image B. In other words, if I start with 2 different ways of creating a boot image, do their children boot images then match up, if in fact I use only Startup Disk Creator and not Pen Drive Linux on the second round?
Here's what I learned, in no particular order:
Startup Disk Creator has an "Erase Disk" button, but it doesn't seem to work because it seems to preserve the file system type. Is it really erasing the boot sector (not to mention the partition table), or just leaving the latest boot virus there, ready to infect the newly minted startup disk when it's used for installation? Yeah, we can use the Disk Utility to format media, but it would be nice if Startup Disk Creator told me that it wasn't actually initializing anything in a manner suitable for secure boot. (EFI boot might partially mitigate this threat, but probably wouldn't eliminate it.)
We have various pages on ubuntu.com which provide various hashes for the ISO. But this irrelevant, because ultimately, we all want an authenticated boot image, not an authenticated compressed file which eventually evolves into the aforesaid boot image (after passing through an infected machine etc. etc.).
We have md5sum.txt in the boot image. MD5 has been deprecated for years as a secure hash. Not to mention that a virus could easily modify this file, so it can't replace the necessity for file hashes which are downloadable from https://ubuntu.com/i-dont-know-where, not unlike http(not s!)://releases.ubuntu.com/14.04/SHA256SUMS. Yeah sure, it's great for protecting against accidental errors, but that doesn't address security.
ldlinux.sys is not even mentioned in md5sum.txt. It's the only file which differs between Image A and Image B (again, even though everything came from the same ISO). I don't even have a checksum for this file, let alone a secure hash. For all I know, Computer A and Computer B are both infected, but with different viruses that infect this file differently.
Here's what I want to know how to do:
A way to authenticate the child image (online, not via local means that might have become infected).
Some sort of standard that ensures that Startup Disk Creator and Pen Drive Linux and Whatever Random Boot Maker can adhere to, so that anyone can easily inspect the resulting startup disk and say "this was signed by Ubuntu" or at least "these hashes look the same as the ones I see on https://ubuntu.com/hashes".
If nothing else, then the SHA256 and correct size of ldlinux.sys for various Ubuntu versions.
Yeah I can compile it all myself, but there's no reason to believe that viruses would not infect source code as well as binary code. Same authentication problem.
Just because government spyware should be presumed present in all source code (and everything else in our lives) doesn't mean that we should ignore conventional cybercriminal threats.
– Veiokej May 16 '14 at 02:25dd
you need to write it directly to the device, not a partition. The image contains its own MBR. – bain May 18 '14 at 23:06