The vulnerable system is not bound to the network stack and the attacker’s path is via read/write/execute capabilities. Either: the attacker exploits the vulnerability by accessing the target system locally (e.g., keyboard, console), or through terminal emulation (e.g., SSH); or the attacker relies on User Interaction by another person to perform actions required to exploit the vulnerability (e.g., using social engineering techniques to trick a legitimate user into opening a malicious document).
Attack Complexity
Low
AC
The attacker must take no measurable action to exploit the vulnerability. The attack requires no target-specific circumvention to exploit the vulnerability. An attacker can expect repeatable success against the vulnerable system.
Privileges Required
High
PR
The attacker requires privileges that provide significant (e.g., administrative) control over the vulnerable system allowing full access to the vulnerable system’s settings and files.
User Interaction
None
UI
The vulnerable system can be exploited without interaction from any human user, other than the attacker. Examples include: a remote attacker is able to send packets to a target system a locally authenticated attacker executes code to elevate privileges
Scope
Unchanged
S
An exploited vulnerability can only affect resources managed by the same security authority. In the case of a vulnerability in a virtualized environment, an exploited vulnerability in one guest instance would not affect neighboring guest instances.
Confidentiality
High
C
There is total information disclosure, resulting in all data on the system being revealed to the attacker, or there is a possibility of the attacker gaining control over confidential data.
Integrity
High
I
There is a total compromise of system integrity. There is a complete loss of system protection, resulting in the attacker being able to modify any file on the target system.
Availability
High
A
There is a total shutdown of the affected resource. The attacker can deny access to the system or data, potentially causing significant loss to the organization.
VirtualBox - escape from shared folderThere is a security issue in the shared folder implementation that
permits cooperating guests with write access to the same shared folder to
gain access to the whole filesystem of the host, at least on Linux hosts.
The issue is that, when the host checks whether a given path escapes the root
directory of the shared folder in vbsfPathCheckRootEscape(), the function
assumes that the directory hierarchy is static: E.g. the path
"base/a/b/c/../../.." is assumed to be equivalent to "base/a/b/../..",
"base/a/.." and "base". However, at least on Linux, renames can occur at the
same time as path traversal.
This means that, if VM A attempts to open "base/a/b/c/../../../foo" while
VM B is moving "base/a/b/c" to "base/c_", VM A might actually end up opening
"base/../../foo" instead of "base/foo".
To demonstrate the issue, on a Linux host with Virtualbox 5.1.10:
- Place a file called "real_root_marker" in the root directory of the Linux
host, containing some secret text. The VMs will attempt to obtain
the contents of this file.
root@host:/# echo "this is secret text in the host fs" > /real_root_marker
- Create two Linux VMs with a shared writable folder.
- In the VMs, install the guest extensions, with the attached patch
vboxsf_new.patch applied.
- In the VMs, ensure that the new vboxsf kernel module is loaded and that
the shared folder is mounted.
- In VM A, compile and run the attached file openspam.c:
root@vmA:/media/sf_vboxshared# gcc -o openspam openspam.c -std=gnu99
root@vmA:/media/sf_vboxshared# ./openspam
entering directory...
entered directory and prepared folders, racing...
- In VM B, compile and run the attached file renamespam.c:
root@vmB:/media/sf_vboxshared# gcc -o renamespam renamespam.c -std=gnu99
root@vmB:/media/sf_vboxshared# ./renamespam
Now, in VM A, you should see the contents of the host's /real_root_marker
within seconds:
SUCCESS
this is secret text in the host fs
EOF
Note: The exploit assumes that the shared folder isn't more than nine levels
away from the filesystem root.