Fix Exploit::Exe
parent
239fd4840e
commit
96c093dce0
|
@ -113,12 +113,7 @@ module Exploit::EXE
|
||||||
:msi_template_path => datastore['MSI::Path'],
|
:msi_template_path => datastore['MSI::Path'],
|
||||||
})
|
})
|
||||||
|
|
||||||
|
msi = Msf::Util::EXE.to_exe_msi(framework, exe, opts)
|
||||||
if opts[:arch] and (opts[:arch] == ARCH_X64 or opts[:arch] == ARCH_X86_64)
|
|
||||||
msi = Msf::Util::EXE.to_win64pe_msi(framework, exe, opts)
|
|
||||||
else
|
|
||||||
msi = Msf::Util::EXE.to_win32pe_msi(framework, exe, opts)
|
|
||||||
end
|
|
||||||
|
|
||||||
return msi
|
return msi
|
||||||
end
|
end
|
||||||
|
|
|
@ -612,15 +612,12 @@ require 'digest/sha1'
|
||||||
return pe
|
return pe
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.to_win32pe_msi(framework, code, opts={})
|
#
|
||||||
opts[:msi_template] ||= "template_x86_windows.msi"
|
# Wraps an executable inside a Windows
|
||||||
exe = to_win32pe(framework, code, opts)
|
# .msi file for auto execution when run
|
||||||
return replace_msi_buffer(exe, opts)
|
#
|
||||||
end
|
def self.to_exe_msi(framework, exe, opts={})
|
||||||
|
opts[:msi_template] ||= "template_windows.msi"
|
||||||
def self.to_win64pe_msi(framework, code, opts={})
|
|
||||||
opts[:msi_template] ||= "template_x64_windows.msi"
|
|
||||||
exe = to_win64pe(framework, code, opts)
|
|
||||||
return replace_msi_buffer(exe, opts)
|
return replace_msi_buffer(exe, opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -2090,11 +2087,13 @@ End Sub
|
||||||
end
|
end
|
||||||
|
|
||||||
when 'msi'
|
when 'msi'
|
||||||
output = case arch
|
case arch
|
||||||
when ARCH_X86,nil then Msf::Util::EXE.to_win32pe_msi(framework, code, exeopts)
|
when ARCH_X86,nil
|
||||||
when ARCH_X86_64 then Msf::Util::EXE.to_win64pe_msi(framework, code, exeopts)
|
exe = to_win32pe(framework, code, exeopts)
|
||||||
when ARCH_X64 then Msf::Util::EXE.to_win64pe_msi(framework, code, exeopts)
|
when ARCH_X86_64,ARCH_X64
|
||||||
end
|
exe = to_win64pe(framework, code, exeopts)
|
||||||
|
end
|
||||||
|
output = Msf::Util::EXE.to_exe_msi(framework, exe, exeopts)
|
||||||
|
|
||||||
when 'elf'
|
when 'elf'
|
||||||
if (not plat or (plat.index(Msf::Module::Platform::Linux)))
|
if (not plat or (plat.index(Msf::Module::Platform::Linux)))
|
||||||
|
|
Loading…
Reference in New Issue