Document method

Fix #4366 (support dynamic_base templates)
bug/bundler_fix
sinn3r 2014-12-12 01:22:32 -06:00
parent b8e58d0f04
commit 985245e8a1
1 changed files with 4 additions and 0 deletions

View File

@ -147,6 +147,10 @@ require 'msf/core/exe/segment_injector'
nil
end
# Clears the DYNAMIC_BASE flag for a Windows executable
# @param exe [String] The raw executable to be modified by the method
# @param pe [Rex::PeParsey::Pe] Use Rex::PeParsey::Pe.new_from_file
# @return [String] the modified executable
def self.clear_dynamic_base(exe, pe)
c_bits = ("%32d" %pe.hdr.opt.DllCharacteristics.to_s(2)).split('').map { |e| e.to_i }.reverse
c_bits[6] = 0 # DYNAMIC_BASE