{{Header}} {{#seo: |description=Deciding on a Virtualization Platform and Configuration, VirtualBox Hardening |image=Virtualizationsec2342342.jpg }} {{physical-mininav}} [[File:Virtualizationsec2342342.jpg|thumb]] {{intro| Deciding on a Virtualization Platform and Configuration, VirtualBox Hardening }} = Host Insecurity leads to VM Compromise = {{mbox | type = notice | image = [[File:Ambox_notice.png|40px|alt=Info]] | text = If the host {{os}} or host computer is ever compromised, any VMs it hosts are also effectively compromised. This issue is [[unspecific|unspecific to {{project_name_long}}]]. From a technical viewpoint, the host is at a "lower level", while a VM is at a "higher level". In computer security, lower levels can always override higher levels, which is why host security is of paramount importance. See also [[Basic Host Security|Essential Host Security]]. With the current hardware commonly available to end-users, operating systems running inside a VM cannot protect themselves from the host. There might be specialized hardware for clouds that can guarantee integrity/attestation for the operating system running inside the VM. In such cases, users must trust that the proprietary hardware was implemented correctly or consider Homomorphic Encryption. See [https://www.whonix.org/wiki/Dev/cloud#Secure_Cloud_Hardware_TODO_Research_List Secure Cloud Hardware TODO Research List]. However, none of this is practically available for end-users. }} = Type 1 vs Type 2 Hypervisors = {{mbox | type = notice | image = [[File:Ambox_notice.png|40px|alt=Info]] | text = Do not install Qubes inside a virtual machine - Qubes uses its own bare-metal hypervisor (Xen). https://www.qubes-os.org/doc/system-requirements/ }} Terminology: {{os}} According to qubes-os.org: https://www.qubes-os.org/intro/
Not all virtual machine software is equal when it comes to security. You may have used or heard of VMs in relation to software like VirtualBox or VMware Workstation. These are known as “Type 2” or “hosted” hypervisors. (The hypervisor is the software, firmware, or hardware that creates and runs virtual machines.) These programs are popular because they’re designed primarily to be easy to use and run under popular OSes like Windows (which is called the host OS, since it “hosts” the VMs). However, the fact that Type 2 hypervisors run under the host OS means that they’re really only as secure as the host OS itself. If the host OS is ever compromised, then any VMs it hosts are also effectively compromised. By contrast, Qubes uses a “Type 1” or “bare metal” hypervisor called Xen. Instead of running inside an OS, Type 1 hypervisors run directly on the “bare metal” of the hardware. This means that an attacker must be capable of subverting the hypervisor itself in order to compromise the entire system, which is vastly more difficult.The take-home message is that [[Qubes|{{q_project_name_long}}]] is more secure than the default {{project_name_short}} configuration using a Type 2 hypervisor like VirtualBox. Therefore, it is recommended to install {{q_project_name_long}} if users have suitably [https://www.qubes-os.org/doc/system-requirements/ modern hardware]. = VM Snapshots = Apart from offering protection against hardware serial leaks, VMs have another major advantage: the ability to quickly discard and restore a system. Platform specific: * [[Qubes|{{q_project_name_short}}]]: This process is easy in {{q_project_name_short}}, since every template-based AppVM used for activities is based on a Template which is only used for software installation and updates, and nothing else. AppVMs are easily discarded and recreated in a clean state whenever the user requires it. https://www.qubes-os.org/doc/templates/ * [[{{non_q_project_name_short}}|{{non_q_project_name_short}}]]: In {{non_q_project_name_short}} for other virtualizers, greater precaution is required. See below. == Best Practice == It is strongly recommended to keep a master copy of the {{project_name_workstation_long}} VM which is: * Kept updated. * Does not have any additional software installed. * Does not have any default settings changed. * Is not used directly for any activities. The correct method for the safest operation of {{non_q_project_name_short}} is as follows: # Import the VM into the virtualizer. # Start the VM. # [[Operating_System_Software_and_Updates#Updates|Securely update]] the VM. # After the updates have finished, shut the VM down. Do not browse anywhere or open any unauthenticated communication channels to the internet. # Create snapshots the VM in their clean state. # Only use the snapshots for browsing or initiating any external connections. Note: The only exception made is running
apt
, since it has a guaranteed way to securely download and verify packages.
If this advice is disregarded and a master, clean copy of {{project_name_workstation_short}} is unavailable for cloning/snapshot purposes, possible workarounds include:
https://forums.whonix.org/t/help-with-setting-up-multiple-workstations/12235
# Renaming the existing {{project_name_workstation_short}} and re-importing a new one.
# Renaming the new VM during the import wizard.
== Tools ==
Untrusted guest systems should not be allowed to use VirtualBox's 3D acceleration features, just as untrusted host software should not be allowed to use 3D acceleration. Drivers for 3D hardware are generally too complex to be made properly secure and any software which is allowed to access them may be able to compromise the operating system running them. In addition, enabling 3D acceleration gives the guest direct access to a large body of additional program code in the VirtualBox host process which it might conceivably be able to use to crash the virtual machine.Quote https://hsmr.cc/palinopsia/
If the "3D-Acceleration" feature of VirtualBox is activated, running the proof-of-concept code from inside the VM provides the ability to read framebuffers from the host system.* Do not enable the Serial Port. * Remove the Floppy drive. * Remove the CD/DVD drive. * Do not enable the Remote Display server. * Enable PAE/NX (NX is a security feature). * Do not attach USB devices. * Disable the USB controller which is enabled by default. Set the Pointing Device to "PS/2 Mouse" or changes will revert.
ACPI
.]
ACPI information is passed to the guest OS by default, which allows it to obtain battery status and manufacturer information.
syntax:
VBoxManage modifyvm "vm-name" --acpi offExamples: {{CodeSelect|code= VBoxManage modifyvm "{{project_name_short}}-Xfce" --acpi off }} When attempting to disable I/O APIC, quote VirtualBox settings graphical user interface:
The I/O APIC feature is not currently enabled in the Motherboard section of the System page. This is needed to support more than one virtual processor. It will be enabled automatically if you confirm your changes.Since 1 virtual process is probably too slow nowadays this might be a bit theoretic. = See Also = {{physical-mininav}} = Footnotes = {{reflist|close=1}} {{Footer}} [[Category:Documentation]]