Module: Ronin::Exploits::Helpers::BufferOverflow

Defined in:
lib/ronin/exploits/helpers/buffer_overflow.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(obj) ⇒ Object



32
33
34
35
36
37
# File 'lib/ronin/exploits/helpers/buffer_overflow.rb', line 32

def self.extended(obj)
  obj.instance_eval do
    extend Ronin::Exploits::Helpers::Binary
    extend Ronin::Exploits::Helpers::Padding
  end
end

Instance Method Details

#bufferString

Returns The buffer to use for the buffer overflow.

Returns:

  • (String)

    The buffer to use for the buffer overflow.



43
44
45
# File 'lib/ronin/exploits/helpers/buffer_overflow.rb', line 43

def buffer
  @buffer ||= ''
end

#targeting(attributes = {}) {|target| ... } ⇒ Object

Adds a new target to the exploit.

Parameters:

  • attributes (Hash) (defaults to: {})

    Additional attributes to create the new target with.

Yields:

  • (target)

    If a block is given, it will be passed the newly created target.

Yield Parameters:



59
60
61
# File 'lib/ronin/exploits/helpers/buffer_overflow.rb', line 59

def targeting(attributes={},&block)
  self.targets << Targets::BufferOverflow.new(attributes,&block)
end

#use_payload_classPayloads::Shellcode

Returns The model which will be searched for acceptable payloads.

Returns:

Since:

  • 0.3.0



69
70
71
# File 'lib/ronin/exploits/helpers/buffer_overflow.rb', line 69

def use_payload_class
  Payloads::Shellcode
end