From d396be963a18dc1cbf06904a0f340683083652b7 Mon Sep 17 00:00:00 2001 From: Meatballs Date: Fri, 28 Feb 2014 20:53:13 +0000 Subject: [PATCH] Use new cmd_exec_get_pid --- modules/exploits/windows/local/bypassuac_injection.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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