Class: Msf::Exploit::Remote::SMB::Server::HashCapture::HashCaptureNTLMProvider

Inherits:
RubySMB::Gss::Provider::NTLM
  • Object
show all
Defined in:
lib/msf/core/exploit/remote/smb/server/hash_capture.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(allow_anonymous: false, allow_guests: false, default_domain: 'WORKGROUP', listener: nil, ntlm_type3_status: ::WindowsError::NTStatus::STATUS_ACCESS_DENIED) ⇒ HashCaptureNTLMProvider

Returns a new instance of HashCaptureNTLMProvider.

Parameters:

  • ntlm_type3_status (::WindowsError::NTStatus) (defaults to: ::WindowsError::NTStatus::STATUS_ACCESS_DENIED)

    A specific NT Status to return as the response to the NTLM type 3 message. If this value is nil, the message will be processed as normal.



192
193
194
195
196
# File 'lib/msf/core/exploit/remote/smb/server/hash_capture.rb', line 192

def initialize(allow_anonymous: false, allow_guests: false, default_domain: 'WORKGROUP', listener: nil, ntlm_type3_status: ::WindowsError::NTStatus::STATUS_ACCESS_DENIED)
  super(allow_anonymous: allow_anonymous, allow_guests: allow_guests, default_domain: default_domain)
  @listener = listener
  @ntlm_type3_status = ntlm_type3_status
end

Instance Attribute Details

#listenerObject (readonly)

Returns the value of attribute listener.



205
206
207
# File 'lib/msf/core/exploit/remote/smb/server/hash_capture.rb', line 205

def listener
  @listener
end

#ntlm_type3_statusObject

Returns the value of attribute ntlm_type3_status.



206
207
208
# File 'lib/msf/core/exploit/remote/smb/server/hash_capture.rb', line 206

def ntlm_type3_status
  @ntlm_type3_status
end

Instance Method Details

#new_authenticator(server_client) ⇒ Object

Needs overwritten to ensure our version of Authenticator is returned



199
200
201
202
203
# File 'lib/msf/core/exploit/remote/smb/server/hash_capture.rb', line 199

def new_authenticator(server_client)
  # build and return an instance that can process and track stateful information for a particular connection but
  # that's backed by this particular provider
  HashCaptureAuthenticator.new(self, server_client)
end