fully operational lgoinscanner

Now you will witness the power of this fully operational
LoginScanner. fire at will, Commander!
bug/bundler_fix
David Maloney 2014-05-07 15:57:06 -05:00
parent ec974535ac
commit 7a476dc21a
No known key found for this signature in database
GPG Key ID: DEDBA9DC3A913DB2
2 changed files with 37 additions and 2 deletions

View File

@ -16,6 +16,43 @@ module Metasploit
include Metasploit::Framework::LoginScanner::NTLM
include Metasploit::Framework::MSSQL::Client
# @!attribute windows_authentication
# @return [Boolean] Whether to use Windows Authentication instead of SQL Server Auth.
attr_accessor :windows_authentication
validates :windows_authentication,
inclusion: { in: [true, false] }
def attempt_login(credential)
result_options = {
credential: credential
}
begin
if mssql_login(credential.public, credential.private, '', credential.realm)
result_options[:status] = :success
else
result_options[:status] = :failed
end
rescue ::Rex::ConnectionError
result_options[:status] = :connection_error
end
::Metasploit::Framework::LoginScanner::Result.new(result_options)
end
private
def set_sane_defaults
self.max_send_size = 0 if self.max_send_size.nil?
self.send_delay = 0 if self.send_delay.nil?
self.send_lm = true if self.send_lm.nil?
self.send_ntlm = true if self.send_ntlm.nil?
self.send_spn = true if self.send_spn.nil?
self.use_ntlm2_session = true if self.use_ntlm2_session.nil?
self.use_ntlmv2 = true if self.use_ntlmv2.nil?
self.windows_authentication = false if self.windows_authentication.nil?
end
end

View File

@ -113,8 +113,6 @@ module Metasploit
self.sock = nil
end
# Remove this socket from the list of sockets created by this exploit
remove_socket(nsock)
end
##