Class: Rex::Post::Meterpreter::Extensions::Extapi::Ntds::Ntds
- Inherits:
-
Object
- Object
- Rex::Post::Meterpreter::Extensions::Extapi::Ntds::Ntds
- Defined in:
- lib/rex/post/meterpreter/extensions/extapi/ntds/ntds.rb
Overview
This meterpreter extension contains extended API functions for parsing the NT Directory Service database.
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
Instance Method Summary collapse
-
#initialize(client) ⇒ Ntds
constructor
A new instance of Ntds.
- #parse(filepath) ⇒ Object
Constructor Details
#initialize(client) ⇒ Ntds
Returns a new instance of Ntds.
18 19 20 |
# File 'lib/rex/post/meterpreter/extensions/extapi/ntds/ntds.rb', line 18 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
34 35 36 |
# File 'lib/rex/post/meterpreter/extensions/extapi/ntds/ntds.rb', line 34 def client @client end |
Instance Method Details
#parse(filepath) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/rex/post/meterpreter/extensions/extapi/ntds/ntds.rb', line 22 def parse(filepath) request = Packet.create_request(COMMAND_ID_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, response) end |