Class: Rex::Exploitation::HeapLib

Inherits:
Object
  • Object
show all
Defined in:
lib/rex/exploitation/heaplib.rb

Overview

Encapsulates the generation of the Alexander Sotirov's HeapLib javascript stub

Constant Summary collapse

JavascriptFile =

The source file to load the javascript from

File.join(File.dirname(__FILE__), "heaplib.js.b64")
SymbolNames =

The list of symbols found in the file. This is used to dynamically replace contents.

{
  "Methods" =>
    [
      "vtable",
      "lookasideAddr",
      "lookaside",
      "freeList",
      "gc",
      "flushOleaut32",
      "freeOleaut32",
      "allocOleaut32",
      "free",
      "alloc",
      "addr",
      "hex",
      "round",
      "paddingStr",
      "padding",
      "debugBreak",
      "debugHeap",
      "debug",
    ],
  "Classes" =>
    [
      { 'Namespace' => "heapLib", 'Class' => "ie" }
    ],
  "Namespaces" =>
    [
      "heapLib"
    ]
}

Instance Method Summary collapse

Constructor Details

#initialize(custom_js = '', opts = {}) ⇒ HeapLib

Initializes the heap library javascript


60
61
62
# File 'lib/rex/exploitation/heaplib.rb', line 60

def initialize(custom_js = '', opts = {})
  load_js(custom_js, opts)
end

Instance Method Details

#to_sObject

Return the replaced version of the javascript


67
68
69
# File 'lib/rex/exploitation/heaplib.rb', line 67

def to_s
  @js
end