Live data from Hacker News

Microsandbox: Virtual Machines that feel and perform like containers

github.com

181–190 of 195 posts

Re: Microsandbox: Virtual Machines that feel and perform like containers

#181

Thanks for sharing! I'm the creator of microsandbox. If there is anything you need to know about the project, let me know. This project is meant to make creating microvms from your machine as easy as using Docker containers. Ask me anything.

This is very neat tech, but I think you might want to wait until you actually have Windows covered before making claims like https://github.com/microsandbox/microsandbox/blob/main/MSB_V...

Re: Microsandbox: Virtual Machines that feel and perform like containers

#182

Thanks for sharing! I'm the creator of microsandbox. If there is anything you need to know about the project, let me know. This project is meant to make creating microvms from your machine as easy as using Docker containers. Ask me anything.

This is very neat tech, but I think you might want to wait until you actually have Windows covered before making claims like https://github.com/microsandbox/microsandbox/blob/main/MSB_V...

What do you mean?

Re: Microsandbox: Virtual Machines that feel and perform like containers

#183

Earlier quoted context omitted.

Yes. The delay you’re complaining about happens because you are looking at general hypervisors which also come with virtualized hardware and need to mimic a bunch of stuff so that most software will work as usual. For example: your VM starts up with the CPU in 16 bit mode because that’s just how things work in x86 and then it waits for the guest OS to set the CPU into 64 bit mode. This is completely unnecessary if yo…

The 16 bit mode stuff and the guest OS probes are after what I'm asking, not before.

A bare VM may not have a BIOS, it's just partitioning supported by the host CPU and OS. The emulation of the legacy PC hardware stack for conventional OS compatibility is a separate thing. If the guest OS is custom-designed to launch in a bare VM with known topology it can boot very, very fast.

Re: Microsandbox: Virtual Machines that feel and perform like containers

#184
post #178
post #169

Earlier quoted context omitted.

A large proportion of LPE vulnerabilities are in the nature of "perform a syscall to pass specially crafted data to the kernel and trigger a kernel bug". For containers, the kernel is the host kernel and now the host is compromised. For VMs, the kernel is the guest kernel and now the guest is compromised, but not the host. That's a much narrower compromise and in security models where root on the guest is already exp…

VM sandbox escape is just "perform a hypercall/trap to pass specially crafted data to the hypervisor and trigger a hypervisor bug". For virtual machines, the hypervisor is the privileged host and now the host is compromised. There is no inherent advantage to virtualization, the only thing that matters is the security and robustness of the privileged host. The only reason there is any advantage in common use is that t…

If this were true, it would be easy to support the claim with evidence. What were the last three Linux LPEs that could be used in a realistic scenario (an attacker with shell, root, full control of guest kernel) to compromise a KVM host? There are dozens of published LPEs every year, so this should be easy for you.

Re: Microsandbox: Virtual Machines that feel and perform like containers

#185

Earlier quoted context omitted.

> hardware virtualization controlled by the local kernel In some architectures, kernel LPE does not break platform (L0/EL2) virtualization, https://news.ycombinator.com/item?id=44141164 L0/EL2 L1/EL1 pKVM KVM AX Hyper-V / Xen / ESX

Most Linux kernel LPEs --- in fact, the overwhelming majority of them --- don't threaten KVM hosts when exploited in KVM guests.

is there anything good written up on this?

Re: Microsandbox: Virtual Machines that feel and perform like containers

#186

Earlier quoted context omitted.

Most Linux kernel LPEs --- in fact, the overwhelming majority of them --- don't threaten KVM hosts when exploited in KVM guests.

is there anything good written up on this?

I don't think so? It's not complicated. Most LPEs get you the local kernel. The KVM security model assumes an untrusted local (guest) kernel. To compromise KVM, they either need to be fundamental architectural flaws (rare) or bugs in KVM itself (also rare).

Re: Microsandbox: Virtual Machines that feel and perform like containers

#187

Earlier quoted context omitted.

That's not what I'm asking about. I'm saying it takes a long time for it to even execute a single instruction, in the BIOS itself. Even for the window to pop up, before you can even pause the VM (because it hasn't even started yet). What you're describing comes after all that, which I already understand and am not asking about.

probably the intel ME setting up for virtualization in a way that it can infiltrate

Please tell me you are joking. Even if it’s a lie.

Management Engine .. actually I do not have the energy to deal with paranoid people. I never had that kind of energy. I never will. You’re all so efficient at drawing energy out of conversations and killing them. You’re like conversational vampires. It’s exhausting.

I don’t even care if you’re right or wrong about Intel ME. It is just so exhausting listening to you guys because of your word choices. It’s like you try to get ignored.

I respect your opinion and all, you just need to work on your messaging or something.

Re: Microsandbox: Virtual Machines that feel and perform like containers

#188
post #178

Earlier quoted context omitted.

VM sandbox escape is just "perform a hypercall/trap to pass specially crafted data to the hypervisor and trigger a hypervisor bug". For virtual machines, the hypervisor is the privileged host and now the host is compromised. There is no inherent advantage to virtualization, the only thing that matters is the security and robustness of the privileged host. The only reason there is any advantage in common use is that t…

If this were true, it would be easy to support the claim with evidence. What were the last three Linux LPEs that could be used in a realistic scenario (an attacker with shell, root, full control of guest kernel) to compromise a KVM host? There are dozens of published LPEs every year, so this should be easy for you.

You know that is a nonsensical request. Why would a Linux LPE result in a guest to host escape?

That is like asking for the last 3 iMessage RCEs that that could be directly used to get a kernel compromise. You obviously leverage the RCE to get code execution in the unprivileged context then chain it with a LPE or unprivileged to privileged kernel escape. The RCE is very likely to be unrelated to the LPE and can likely even be mixed and matched if the RCE is good enough. You could do both simultaneously, and I guess some might exist, but that is just generally a poor, much harder strategy.

In this case the Linux Kernel LPE would only get you code execution in the unprivileged guest which you then need to chain with a unprivileged to privileged hypervisor escape.

Are you claiming that hypervisors or VMM systems are unhackable? That is a extraordinary claim that demands extraordinary evidence. Otherwise you agree there are VM escapes that can be chained with code execution in the guest which is my entire point.

Your security depends on the quality of your isolation boundary and there is no reason to believe the same class of people who gave us the awful security of the Linux Kernel are going to turn around and solve the same problem they failed to solve by calling it a hypervisor.

Re: Microsandbox: Virtual Machines that feel and perform like containers

#189
post #188

Earlier quoted context omitted.

If this were true, it would be easy to support the claim with evidence. What were the last three Linux LPEs that could be used in a realistic scenario (an attacker with shell, root, full control of guest kernel) to compromise a KVM host? There are dozens of published LPEs every year, so this should be easy for you.

You know that is a nonsensical request. Why would a Linux LPE result in a guest to host escape? That is like asking for the last 3 iMessage RCEs that that could be directly used to get a kernel compromise. You obviously leverage the RCE to get code execution in the unprivileged context then chain it with a LPE or unprivileged to privileged kernel escape. The RCE is very likely to be unrelated to the LPE and can likel…

Is it possible we're just talking past each other? I read you to be claiming that guest->host escapes were straightforward in the Linux kernel security model (they are not). If we just agree, then we agree, and we should just chalk this up to message board ambiguity.

Re: Microsandbox: Virtual Machines that feel and perform like containers

#190

Kind of almost off-topic: I'm working on a project where I must run possibly untrusted JavaScript code. I want to run it in an isolated environment. This looks like a very nice solution as I could spin up a microsandbox and securely run the code. I could even have a pool os live sandboxes so I wouldn't even experience the 200ms starts. Because this is OCI-compatible, I could even provide a whole sandboxed environment…

You might be able to get away with running QuickJS compiled to WebAssembly: https://til.simonwillison.net/npm/self-hosted-quickjs

Convenience helper for that: https://github.com/bytecodealliance/javy
Post reply on HN