Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Possible Duplicate:
Virtual Machine and Virus

I've always been curious because I've run a virtual machine a few times.

  • Can a VM infect the host with a shared drive between the two?
  • Can a VM infect the host with absolutely no networking at all?
  • Can something malicious "break out" of the virtual machine and infect its host?

Basically, is there any time at all that a virtual machine can pose any kind of security risk to its host?

share|improve this question

marked as duplicate by DMA57361, Sathya, Diago Sep 21 '10 at 8:02

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    

3 Answers 3

up vote 3 down vote accepted

Depends on how your network is configured. I use my VMs in a bridged network, so basically each VM is a computer in the network, with own IP adress, etc.

The shared folders are usually network storages made visible to the guest OS. But in fact, that isn't a true server serving network shares, so it doesn't bring the same risks with it.

I've never heard of VM breakout-viruses, but it's technically possible. If there would be a bug in some of the emulated hardware, code might be run in the host system. However I've never heard of such thing before.

OK, now, when taking your question into account, It is not impossible, but very unlikely. Unlikely to the point that it's used as sandboxes for OS-es that pose security risks.

However, probably the most overlooked security risk is the shared clipboard. This works even with deactivated network, of course. When you copy a whole file that is infected, accidentally or not, you might infect the host os.

My Host is Linux, and with Windows guests, I don't have too much risks of getting "shared" viruses.

The Virus would need to be specifically designed to infect hosts-of-guests in VMs.

share|improve this answer
    
+1 for "specifically designed to infect hosts-of-guests". Often they do not target the VM itself (which is theoretically impossible), but drivers written for the VM. Some real-life examples: VMware's display driver and VMware's bridged networking component. –  zildjohn01 Sep 20 '10 at 22:27

Yes absolutely, without any "virtual" connection between them. CVE-2009-1244

No shared virtual network needed. No shared virtual drive needed. Security between Host OS and VM is just layers of software. Software fails. More code equals more bugs. Some bugs are exploitable. VM -> Host exploitation is a reality, and a statistical probability.

share|improve this answer
    
I read a transcript of a blackhat presentation that stated the possibility of writing to the host's memory in the VM through the virtualized graphics card. –  TuxRug Sep 20 '10 at 22:37

If there's a shared drive - absolutely.

Not having a network connection isn't a sufficient condition for "100% security" There are other ways to get infected - for instance a virus on a floppy image, CD, DVD or thumbdrive for four.

Can something break out? Well, "something" is a little vague but my answer is YES. One possible example is an email virus/worm that ends up sending a copy to the host from the guest (or vice versa).

There can be a security advantage to using a VM but you REALLY have to know what you're doing to take advantage of it.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.