Thank you for the answers. Actually the thing is that I am actually doing a Security project. Me and my professor are trying to determine the physical features of the hardware sitting on a VM. Clearly, if we succeed in doing this, we could raise new security issues about Virtualization. The first step involved detecting co-residency, and we thought we would ask the libvert-users community if they have some good strategies for the same. <br>
<br>Thank you<br><br><br><div class="gmail_quote">On Thu, Feb 16, 2012 at 5:26 AM, Whit Blauvelt <span dir="ltr"><<a href="mailto:whit.virt@transpect.com">whit.virt@transpect.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Wed, Feb 15, 2012 at 03:20:40PM -0700, Eric Blake wrote:<br>
> On 02/15/2012 11:08 AM, Shikhar Agarwal wrote:<br>
> > I am doing an experiment which involves detecting co-resident VMs (testing<br>
> > if 2 VMs are on the same physical machine) on KVM. I have tried using cache<br>
> > covert channel, but this test does not work if the VMs are on different<br>
> > processors within the same host as the caches are not shared then. If I use<br>
> > the tools netperf and iperf to differentiate using network channels, I am<br>
> > not getting clear results. This is because the network is really good (10<br>
> > Gbps). I believe there are better and more reliable ways for the same.<br>
> > Please suggest some of these.<br>
> > The idea is to find some resource (like memory, disk, etc) that is shared<br>
> > by the VMs and try to run some benchmarks that thrash this resource.<br>
> > Another idea is to take advantage of some optimization that kvm might be<br>
> > doing internally. Please help me.<br>
><br>
> By default, under the sVirt rules set up by libvirt, VMs should NOT be<br>
> sharing resources, and any VM that can reliably detect that it is<br>
> co-resident with another VM means you have potentially found a security<br>
> hole in qemu or sVirt.   In fact, recent libvirt additions such as the<br>
> use of cgroups for cpu and I/O throttling should manage even the<br>
> possibility for one VM to thrash resources in such a way that steals<br>
> time from other VMs.<br>
><br>
> As such, I'm afraid you might not get much public response for other<br>
> covert channels to look for; admitting to a security hole without also<br>
> providing a patch against it is difficult to do in a publicly archived list.<br>
<br>
</div></div>Couldn't one approximate the co-residency detection by having a script on<br>
each of the hosts periodically write files on the guests providing them with<br>
whatever information is pertinent? Since this is about the host having<br>
access to the guests, it shouldn't violate the security model. The file<br>
could contain any arbitrary information available to the host, including the<br>
host's name and the specs on other guests it currently hosts.<br>
<br>
Whether this is wise is a different debate. The point is only that it's<br>
trivial for the host to run a script leveraging virsh to identify each<br>
running guest, build a file listing them, and place it by one of the many<br>
standard file transfer methods on each of the guests. If an admin is doing<br>
this as a one-off, even the potential unwisdom of it is mitigated by the<br>
obscurity of the implementation - it would not be a standard file in a<br>
standard place for an intruder on the guest to reference.<br>
<span class="HOEnZb"><font color="#888888"><br>
Whit<br>
</font></span></blockquote></div><br>