Fixup modules
parent
f10a35ed08
commit
87fe6ecfaa
|
@ -86,7 +86,7 @@ class Metasploit3 < Msf::Exploit::Local
|
|||
|
||||
vprint_status(srv_info.to_s)
|
||||
|
||||
case START_TYPE[srv_info[:start_type]]
|
||||
case START_TYPE[srv_info[:starttype]]
|
||||
when 'Disabled'
|
||||
print_error("Service startup is Disabled, so will be unable to exploit unless account has correct permissions...")
|
||||
return Exploit::CheckCode::Safe
|
||||
|
@ -235,13 +235,13 @@ class Metasploit3 < Msf::Exploit::Local
|
|||
|
||||
service_information = service_info(@service_name)
|
||||
|
||||
if START_TYPE[service_information[:start_type]] == 'Disabled'
|
||||
if START_TYPE[service_information[:starttype]] == 'Disabled'
|
||||
print_status("Service is disabled, attempting to enable...")
|
||||
service_change_startup(@service_name, 'auto')
|
||||
service_information = service_info(@service_name)
|
||||
|
||||
# Still disabled
|
||||
if START_TYPE[service_information[:start_type]] == 'Disabled'
|
||||
if START_TYPE[service_information[:starttype]] == 'Disabled'
|
||||
fail_with(Exploit::Failure::NotVulnerable, "Unable to enable service, aborting...")
|
||||
end
|
||||
end
|
||||
|
@ -285,7 +285,7 @@ class Metasploit3 < Msf::Exploit::Local
|
|||
end
|
||||
rescue RuntimeError => e
|
||||
raise e if e.kind_of? Msf::Exploit::Failed
|
||||
if START_TYPE[service_information[:start_type]] == 'Manual'
|
||||
if START_TYPE[service_information[:starttype]] == 'Manual'
|
||||
fail_with(Exploit::Failure::Unknown, "Unable to start service, and it does not auto start, cleaning up...")
|
||||
else
|
||||
if job_id
|
||||
|
|
|
@ -72,7 +72,7 @@ class Metasploit3 < Msf::Post
|
|||
begin
|
||||
srv_conf = service_info(srv[:name])
|
||||
#filter service based on filters passed, the are cumulative
|
||||
if qcred and ! srv_conf[:service_start_name].downcase.include? qcred.downcase
|
||||
if qcred and ! srv_conf[:startname].downcase.include? qcred.downcase
|
||||
next
|
||||
end
|
||||
|
||||
|
@ -81,13 +81,16 @@ class Metasploit3 < Msf::Post
|
|||
end
|
||||
|
||||
# There may not be a 'Startup', need to check nil
|
||||
if qtype and ! (START_TYPE[srv_conf[:start_type]] || '').downcase.include? qtype.downcase
|
||||
if qtype and ! (START_TYPE[srv_conf[:starttype]] || '').downcase.include? qtype.downcase
|
||||
next
|
||||
end
|
||||
|
||||
results_table << [srv[:name], srv_conf[:service_start_name], START_TYPE[srv_conf[:start_type]], srv_conf[:path]
|
||||
results_table << [srv[:name],
|
||||
srv_conf[:startname],
|
||||
START_TYPE[srv_conf[:starttype]],
|
||||
srv_conf[:path]]
|
||||
|
||||
rescue
|
||||
rescue RuntimeError => e
|
||||
print_error("An error occurred enumerating service: #{srv[:name]}")
|
||||
end
|
||||
else
|
||||
|
|
|
@ -9,7 +9,7 @@ class Metasploit3 < Msf::Post
|
|||
|
||||
include Msf::Post::File
|
||||
include Msf::Post::Windows::Registry
|
||||
include Msf::Post::Windows::WindowsServices
|
||||
include Msf::Post::Windows::Services
|
||||
include Msf::Post::Windows::Priv
|
||||
|
||||
def initialize(info={})
|
||||
|
|
Loading…
Reference in New Issue