https://github.com/libguestfs/nbdkit
https://github.com/libguestfs/nbdkit/blob/master/plugins/flo...
I have set this up and it is pretty cool to quickly boot images over the network this way, and experiment with them without having to write SD cards. In fact: my rPI doesn't even have a SD card inserted.
The ethernet performance in the RPI is still poor though, the USB-to-ethernet bridge is suboptimal.
I guess we're almost back at running RPi 'terminals' on our desktop and have a centralised (cloud?) storage solution to boot from and persist files to. We're almost back at 90's level computing ;-)
My notes for pfsense: receiving machine: netcat -l 2222 | gzip -dc | dd of=/dev/sda
sending machine: dd if=pfSense-2.2.4-RELEASE-2g-i386-nanobsd.img.gz |netcat 10.10.10.101 2222
* Aggressively compile out unused features/devices.
* Confine each VM with separate SELinux contexts (sVirt).
* Run qemu as a special non-root user.
* Use seccomp to confine the system calls.
* Pass in pre-opened file descriptors to qemu, so qemu doesn't need to open files (helps with writing tightly confined SELinux policy).
* Run qemu in a cgroup.
* Run qemu-img with resource limits.
* Compile qemu with all hardening features enabled like RELRO, PIE, etc.
* Audit the code manually and with Coverity.
* Take security reports seriously and have a fast patching mechanism (you can effectively "live patch" qemu by migrating a VM off the old qemu and on to the new qemu).
Probably more that I've forgotten about ...
Some of our customers are running untrusted VMs in their public clouds using this configuration. Others will be running on-premises virtualization set ups with VMs from across their companies which can be equally risky.
SELinux is probably the most important mitigation in the list, and while it has a bad reputation that's mostly from people who haven't used it for over a decade. I have SELinux enforcing on every machine I use, and it rarely causes an issue.
Historic(2015) VM escape example https://venom.crowdstrike.com/
I doubt anyone is wasting a good zero-day on disposable qemu netboot images. Someone may try a venom(like) image for 'fun'.
Given that bugs which have been found in it previously have been fixed, can we know from now on that it’s 100% safe?
As far as I know there does not exist a way of rigorously proving that.
fwiw my interest in theoretical computers and formal verification based on this fundamental aspect.
which in turn does
http[s]://boot.netboot.xyz/menu.ipxe
Security against your client-server communications' contents being observed by third parties. So here https ... gives ... confidentiality ... to ... public ... images. Well that's useful !
It does not prevent server spoofing attacks (as in attackers changing the code you boot) in 99% of situations. Nor man-in-the-middle protection ...
So what's the point of https in this situation ? Certificate, cert pinning, ... are all useless in this situation (certificate only helps on repeat visits, which of course never applies in this situation. Cert pinning only helps for specific sites (not this one) and even if it did, only when the originating software is really up to date (which is just not going to be the case here).
So you can just as well say that http is perfectly secure in this case. Or at least ... as secure as https is going to be.
There's quite a bit more to security than "use https".
It ensures the response from the webserver really is from netboot.xyz, and not from any mitm server.
> It does not prevent server spoofing attacks (as in attackers changing the code you boot) in 99% of situations. Nor man-in-the-middle protection ...
Can you elaborate? How would you spoof the server response without having a valid certificate key for the netboot.xyz domain?
I think this is referring to the server being compromised. This isn't something that can be solved easily because while the bootloader could include signify[1] to verify its downloads, the bootloader itself can't be verified with anything. (disclaimer: I don't know very much about iPXE)
It boots an image straight from an unsecure http URL, and allows you to boot various BSDs and Linux flavours straight from the internet.