by londons_explore · 1y ago · 0 comments
For example, an SSL library might have pre-calculated the random nonce for the next incoming SSL connection.
If you clone the VM containing a process using that library, now both child VM's will use the same nonce. Some crypto is 100% broken open if a nonce is reused.
It's important to refresh entropy immediately after clone. Still, there can be code that didn't assume it could be cloned (even though there's always been `fork`, of course). Because of this, we don't live clone across workspaces for unlisted/private sandboxes and limit the use case to dev envs where no secrets are stored.
The proposed workflow involves cloning your dev environment and sharing it with the internet.
At most places, that’s equivalent to publishing your production keys, or at least github credentials.
Even for open source projects where confidentiality doesn’t matter, there are issues like using cargo/npm/etc keys to launch supply chain attacks.
Your nonce attack is harder to pull off, but more devastating if the attacker can man in the middle things like dependency downloads.
I've always wanted to test this out for fun, by now 15 years have gone by and I've never got to it...
https://www.vmware.com/products/cloud-infrastructure/vsphere...
Live migration had some very cool demos. They would have an intensive workload such as a game playing and cause a crash and the VM would resume with 0 buffering.
There's caveats in the network though, as packets targeting the old address need to be re-routed until all connections target the new machine.
Isn't this still a concern even if you're not pre-calculating way ahead of time? If you generate it when needed, it could still catch you at the wrong time (e.g. right before encryption, but right after nonce generation)
The problem with pre-computing a bunch and keeping them in memory is brand new connections made post cloning would use the same list of nonces.
If an attacker sees valid nonces on a VM, and knows of another VM sharing the same nonces, then your crypto on both* VMs becomes vulnerable to replay attacks.
*read: all