First off I would like to note that I have researched this for quite some time and read many forum topics about this from the past. I intend to use VirtualBox as a complete replacement for all my host security software and as such, I need more in depth info about shared folders in order to make a decision. This topic is not meant to be a rehash but a means to supersede all former discussions and build on what was said.
Here is what I know:
According to what was written before, Shared Folders is assumed to be safe to use as long as:
- only a common non root directory is selected for that purpose
- no executable that was placed in there will ever be re-executed on the host - since it could have been patched by something malicious.
- any non-script/non-executable file is considered to be safe and unable to carry something dangerous*3
- As long as file extensions view is enabled it is very simple to verify that it's not an exe masquerading as a data file
- Disabling Autorun is important *1
- What a virus could do to a shared directory is constrained by the host file sharing protocol <- this is what I would like to discuss more as it has significant security implications. *2
*1 Why would disabling autorun matter in this case? If the host views the shared folder as only such then how can an Autorun script be automatically executed sans any direct user interaction? Isn't this only done for drives attached to the host?
*2 From what I've looked up, SMB/SMB 2 is very insecure. Take for example this advisory: --saintcorporation (.) com/cgi-bin/demo_tut.pl?tutorial_name=Samba_vulnerabilities.html&fact_color=&tag=
So if this protocol has weaknesses, wouldn't this imply that data in the mapped virtual drive could be manipulated as such?
Source wrote:A remote attacker could create accounts, read part of the credentials file, execute arbitrary commands, cause a denial of service, write to arbitrary files, gain elevated privileges, or disable logging of failed login attempts in a brute-force password attack.
*3 Not really my main focus here, but I am curious as to what happens when a file is associated with an alternate data stream (ADS).
Also considering that security policy for the shared folder is enforced according to the file permissions of the host, what would happen if these are inherently insecure? I don't trust anything Microsoft based to have implemented anything security related correctly, which was why I am using virtualization in the first place. Unless VBox GAs uses its own special hardened protocol to do data transfers.
I want to identify the weakest link in the process. Transferring files form an un-trusted guest is the last bit I have to figure out before ditching my bloated host HIPS. Network wise, everything is handled which leaves this vector as my remaining concern.
If it turns out that shared folders are exploitable in the ways I have identified, then basically I am as safe as the guest OS I am using which defeats the purpose of what I am trying to achieve. I am trying to get the combined ease of use of Windows and the security of VirtualBox.
Any responses are appreciated especially from experts.
Thanks.