Based on the GVH new Dallas node running in a hypervisor, I decided to begin writing a tool to probe an OpenVZ/LXC environment and see if it is slabbed.
There's a few ways we can do this. First of all, almost all hypervisors provide basic information at CPUID leaf 0x40000000. So, we can sniff that and see if there's a hypervisor running. This is basically essential, because they all use CPUID to learn more about the VMM in early boot... this allows them to learn how to make hypercalls and so on.
Once we know more about the basic hypervisor... we can do more advanced things. For example, it would maybe be possible to bitbang on VMware's bus by using inl() and outl() calls in combination with ioperm(). That would allow us to learn more about the hypervisor (such as version), etc.
Code here: https://github.com/kaniini/slabbed-or-not
It'd be interesting if people ran it, especially on machines they know not to be slabbed, so I can verify that the code does the right thing on a baremetal environment.
There's a few ways we can do this. First of all, almost all hypervisors provide basic information at CPUID leaf 0x40000000. So, we can sniff that and see if there's a hypervisor running. This is basically essential, because they all use CPUID to learn more about the VMM in early boot... this allows them to learn how to make hypercalls and so on.
Once we know more about the basic hypervisor... we can do more advanced things. For example, it would maybe be possible to bitbang on VMware's bus by using inl() and outl() calls in combination with ioperm(). That would allow us to learn more about the hypervisor (such as version), etc.
Code here: https://github.com/kaniini/slabbed-or-not
It'd be interesting if people ran it, especially on machines they know not to be slabbed, so I can verify that the code does the right thing on a baremetal environment.