lib/msf/core/reflective_dll_loader.rb
# Load a reflectively-injectable DLL from disk and find the offset
# to the ReflectiveLoader function inside the DLL.
#
# @param [String] dll_path Path to the DLL to load.
#
# @return [Array] Tuple of DLL contents and offset to the
#                 +ReflectiveLoader+ function within the DLL.
Load a reflectively-injectable DLL from disk and find the offset
to the ReflectiveLoader function inside the DLL.
Load a reflectively - injectable DLL from disk and find the offset to the ReflectiveLoader function inside the DLL .
def parse_pe(dll)
    pe = Rex::PeParsey::Pe.new(Rex::ImageSource::Memory.new(dll))
    offset = nil
    pe.exports.entries.each do |e|
      if e.name =~ /^\S*KittensLoader\S*/
        offset = pe.rva_to_file_offset(e.rva)
        break
      end
    end
    offset
  end
def parse_pe ( dll ) pe = Rex :: PeParsey :: Pe . new ( Rex :: ImageSource :: Memory . new ( dll ) ) offset = nil pe . exports . entries . each do | e | if e . name =~ / ^ \S *KittensLoader \S * / offset = pe . rva_to_file_offset ( e . rva ) break end end offset end
Load a reflectively-injectable DLL from disk and find the offset
to the ReflectiveLoader function inside the DLL.
Load a reflectively - injectable DLL from disk and find the offset to the ReflectiveLoader function inside the DLL .
Tuple of DLL contents and offset to the +ReflectiveLoader+ function within the DLL.
Tuple of DLL contents and offset to the + ReflectiveLoader + function within the DLL .
Array
dll
<not_specific>
<not_specific>
dll_path Path to the DLL to load.
dll_path Path to the DLL to load .