Re-do 'exe-small' for scripting payloads.

Fall back to default x64 exe for ARCH_X86_64
bug/bundler_fix
Meatballs 2013-11-19 21:19:12 +00:00
parent 13ad48fd78
commit a327321558
No known key found for this signature in database
GPG Key ID: 5380EAF01F2F8B38
1 changed files with 7 additions and 5 deletions

View File

@ -1604,14 +1604,14 @@ def self.to_vba(framework,code,opts={})
case fmt case fmt
when 'asp' when 'asp'
exe = to_executable_fmt(framework, arch, plat, code, 'exe', exeopts) exe = to_executable_fmt(framework, arch, plat, code, 'exe-small', exeopts)
output = Msf::Util::EXE.to_exe_asp(exe, exeopts) output = Msf::Util::EXE.to_exe_asp(exe, exeopts)
when 'aspx' when 'aspx'
output = Msf::Util::EXE.to_mem_aspx(framework, code, exeopts) output = Msf::Util::EXE.to_mem_aspx(framework, code, exeopts)
when 'aspx-exe' when 'aspx-exe'
exe = to_executable_fmt(framework, arch, plat, code, 'exe', exeopts) exe = to_executable_fmt(framework, arch, plat, code, 'exe-small', exeopts)
output = Msf::Util::EXE.to_exe_aspx(exe, exeopts) output = Msf::Util::EXE.to_exe_aspx(exe, exeopts)
when 'dll' when 'dll'
@ -1620,6 +1620,7 @@ def self.to_vba(framework,code,opts={})
when ARCH_X86_64 then to_win64pe_dll(framework, code, exeopts) when ARCH_X86_64 then to_win64pe_dll(framework, code, exeopts)
when ARCH_X64 then to_win64pe_dll(framework, code, exeopts) when ARCH_X64 then to_win64pe_dll(framework, code, exeopts)
end end
when 'exe' when 'exe'
output = case arch output = case arch
when ARCH_X86,nil then to_win32pe(framework, code, exeopts) when ARCH_X86,nil then to_win32pe(framework, code, exeopts)
@ -1637,6 +1638,7 @@ def self.to_vba(framework,code,opts={})
when 'exe-small' when 'exe-small'
output = case arch output = case arch
when ARCH_X86,nil then to_win32pe_old(framework, code, exeopts) when ARCH_X86,nil then to_win32pe_old(framework, code, exeopts)
when ARCH_X86_64,ARCH_X64 then to_win64pe(framework, code, exeopts)
end end
when 'exe-only' when 'exe-only'
@ -1698,15 +1700,15 @@ def self.to_vba(framework,code,opts={})
output = Msf::Util::EXE.to_vba(framework, code, exeopts) output = Msf::Util::EXE.to_vba(framework, code, exeopts)
when 'vba-exe' when 'vba-exe'
exe = to_executable_fmt(framework, arch, plat, code, 'exe', exeopts) exe = to_executable_fmt(framework, arch, plat, code, 'exe-small', exeopts)
output = Msf::Util::EXE.to_exe_vba(exe) output = Msf::Util::EXE.to_exe_vba(exe)
when 'vbs' when 'vbs'
exe = to_executable_fmt(framework, arch, plat, code, 'exe', exeopts) exe = to_executable_fmt(framework, arch, plat, code, 'exe-small', exeopts)
output = Msf::Util::EXE.to_exe_vbs(exe, exeopts.merge({ :persist => false })) output = Msf::Util::EXE.to_exe_vbs(exe, exeopts.merge({ :persist => false }))
when 'loop-vbs' when 'loop-vbs'
exe = exe = to_executable_fmt(framework, arch, plat, code, 'exe', exeopts) exe = exe = to_executable_fmt(framework, arch, plat, code, 'exe-small', exeopts)
output = Msf::Util::EXE.to_exe_vbs(exe, exeopts.merge({ :persist => true })) output = Msf::Util::EXE.to_exe_vbs(exe, exeopts.merge({ :persist => true }))
when 'war' when 'war'