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

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

Instance Method Summary collapse

Instance Method Details

#process_ntlm_type1(type1_msg) ⇒ Object


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

def process_ntlm_type1(type1_msg)
  @ntlm_type1 = type1_msg
  @ntlm_type2 = super

  @ntlm_type2
end

#process_ntlm_type3(type3_msg) ⇒ Object


205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
# File 'lib/msf/core/exploit/remote/smb/server/hash_capture.rb', line 205

def process_ntlm_type3(type3_msg)
  _, address = ::Socket.unpack_sockaddr_in(@server_client.getpeername)

  if @provider.listener
    @provider.listener.on_ntlm_type3(
      address: address,
      ntlm_type1: @ntlm_type1,
      ntlm_type2: @ntlm_type2,
      ntlm_type3: type3_msg,
    )
  end

  # allow the operation to be short circuited with a static NT Status response when it doesn't make sense to
  # proceed with authenticating the client
  return @provider.ntlm_type3_status unless @provider.ntlm_type3_status.nil?

  super
end