Module: Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Server::Parser

Included in:
Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Server
Defined in:
lib/msf/core/exploit/java/rmi/client/jmx/server/parser.rb

Instance Method Summary collapse

Instance Method Details

#parse_jmx_new_client_endpoint(return_value) ⇒ Hash, NilClass

Parses a javax/management/remote/rmi/RMIServer_Stub#newClient() return value to find out the remote reference information.

Parameters:

  • return_value (Rex::Java::Serialization::Model::ReturnValue)

Returns:

  • (Hash, NilClass)

    The remote interface information if success, nil otherwise


17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/msf/core/exploit/java/rmi/client/jmx/server/parser.rb', line 17

def parse_jmx_new_client_endpoint(return_value)
  values_size = return_value.value.length
  end_point_block_data = return_value.value[values_size - 2]

  unless end_point_block_data.is_a?(Rex::Java::Serialization::Model::BlockData)
    return nil
  end

  return_io = StringIO.new(end_point_block_data.contents, 'rb')

  reference = extract_reference(return_io)

  reference
end