bug/bundler_fix
Meatballs 2014-07-04 20:46:50 +01:00
parent 05c9757624
commit ef0826c319
No known key found for this signature in database
GPG Key ID: 5380EAF01F2F8B38
1 changed files with 4 additions and 11 deletions

View File

@ -41,7 +41,6 @@ class Metasploit3 < Msf::Post
def run def run
# set vars # set vars
lootString = ""
credentialCount = {} credentialCount = {}
qcred = datastore["CRED"] || nil qcred = datastore["CRED"] || nil
qpath = datastore["PATH"] || nil qpath = datastore["PATH"] || nil
@ -73,13 +72,7 @@ class Metasploit3 < Msf::Post
'Columns' => ['Name', 'Credentials', 'Command', 'Startup'] 'Columns' => ['Name', 'Credentials', 'Command', 'Startup']
) )
if datastore['VERBOSE'] print_status("Listing Service Info for matching services, please wait...")
print_status("Listing Service Info for matching services:")
else
print_status("Detailed output is only printed when VERBOSE is set to True. Running this module can take some time.\n")
end
print_status("Listing Service Info for matching services:")
service_list.each do |srv| service_list.each do |srv|
srv_conf = {} srv_conf = {}
@ -103,7 +96,7 @@ class Metasploit3 < Msf::Post
end end
# count the occurance of specific credentials services are running as # count the occurance of specific credentials services are running as
serviceCred = srv_conf['Credentials'].upcase serviceCred = srv_conf[:startname].upcase
unless serviceCred.empty? unless serviceCred.empty?
if credentialCount.has_key?(serviceCred) if credentialCount.has_key?(serviceCred)
credentialCount[serviceCred] += 1 credentialCount[serviceCred] += 1
@ -111,7 +104,7 @@ class Metasploit3 < Msf::Post
credentialCount[serviceCred] = 1 credentialCount[serviceCred] = 1
# let the user know a new service account has been detected for possible lateral # let the user know a new service account has been detected for possible lateral
# movement opportunities # movement opportunities
print_good("New service credential detected: #{sname} is running as '#{srv_conf['Credentials']}'") print_good("New service credential detected: #{srv[:name]} is running as '#{srv_conf[:startname]}'")
end end
end end
@ -125,7 +118,7 @@ class Metasploit3 < Msf::Post
print_error("An error occurred enumerating service: #{srv[:name]}: #{e}") print_error("An error occurred enumerating service: #{srv[:name]}: #{e}")
end end
else else
print_error("Problem enumerating services (no service name found)") print_error("Problem enumerating service - no service name found")
end end
end end