9bf0d901cf
Consolidated all unicode routines to go through Rex::Text.to_unicode() Added a new function for sending evil blobs through smb git-svn-id: file:///home/svn/incoming/trunk@3114 4d416f70-5f16-0410-b530-b9f4589650da
43 lines
762 B
Ruby
43 lines
762 B
Ruby
require 'rex/exploitation/egghunter'
|
|
|
|
module Msf
|
|
|
|
###
|
|
#
|
|
# This mixin provides a interface to generating egghunters for various
|
|
# platforms using the Rex::Exploitation::Egghunter class.
|
|
#
|
|
###
|
|
module Exploit::Egghunter
|
|
|
|
#
|
|
# Creates an instance of an exploit that uses an Egghunter overwrite.
|
|
#
|
|
def initialize(info = {})
|
|
super
|
|
end
|
|
|
|
|
|
#
|
|
# Generates an egghunter stub based on the current target's architecture
|
|
# and operating system.
|
|
#
|
|
def generate_egghunter
|
|
os = target['Platform']
|
|
arch = target.arch || ARCH_X86
|
|
|
|
egg = Rex::Exploitation::Egghunter.new(os, arch)
|
|
bunny = egg.generate(payload_badchars)
|
|
|
|
if (bunny.nil?)
|
|
print_error("The egghunter could not be generated")
|
|
raise ArgumentError
|
|
end
|
|
|
|
return bunny
|
|
end
|
|
|
|
end
|
|
|
|
end
|