class Rex::Post::Meterpreter::Extensions::Extapi::Ntds::Ntds

This meterpreter extension contains extended API functions for parsing the NT Directory Service database.

Attributes

client[RW]

Public Class Methods

new(client) click to toggle source
# File lib/rex/post/meterpreter/extensions/extapi/ntds/ntds.rb, line 17
def initialize(client)
  @client = client
end

Public Instance Methods

parse(filepath) click to toggle source
# File lib/rex/post/meterpreter/extensions/extapi/ntds/ntds.rb, line 21
def parse(filepath)
  request = Packet.create_request('extapi_ntds_parse')
  request.add_tlv( TLV_TYPE_NTDS_PATH, filepath)
  # wait up to 90 seconds for a response
  response = client.send_request(request, 90)
  channel_id = response.get_tlv_value(TLV_TYPE_CHANNEL_ID)
  if channel_id.nil?
    raise Exception, "We did not get a channel back!"
  end
  Rex::Post::Meterpreter::Channels::Pool.new(client, channel_id, "extapi_ntds", CHANNEL_FLAG_SYNCHRONOUS)
end