Skip to content

Commit d396be9

Browse files
committed
Use new cmd_exec_get_pid
1 parent 2a6258b commit d396be9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/exploits/windows/local/bypassuac_injection.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,13 @@ def spawn_inject_proc
181181
windir = expand_path("%WINDIR%").strip
182182
print_status("Spawning process with Windows Publisher Certificate, to inject into...")
183183
cmd = "#{windir}\\System32\\notepad.exe"
184-
proc = client.sys.process.execute(cmd, nil, {'Hidden' => true })
184+
pid = cmd_exec_get_pid(cmd)
185185

186-
if proc.nil? or proc.pid.nil?
186+
unless pid
187187
fail_with(Exploit::Failure::Unknown, "Spawning Process failed...")
188188
end
189189

190-
proc.pid
190+
pid
191191
end
192192

193193

0 commit comments

Comments
 (0)