Fixes #268. Updates the executable template and provides a bug fix for msfencode to force the encoded version

git-svn-id: file:///home/svn/framework3/trunk@6043 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2008-12-24 08:41:35 +00:00
parent a30adcdca5
commit b80f50b6cb
3 changed files with 16 additions and 8 deletions

Binary file not shown.

View File

@ -6,14 +6,22 @@ _code:
.globl _WinMain@16
.def _WinMain@16; .scl 2; .type 32; .endef
_WinMain@16:
xorl %eax,%eax
movl $_code,%ecx
pushl $_ExitProcess@4
pushl %fs:(%eax)
movl %esp,%fs:(%eax)
pushl %eax
pushl $0x40
pushl $8192
pushl %ecx
pushl %ecx
jmp _VirtualProtect@16
pushl $0x3000
pushl $0x100000
pushl $0
call _VirtualAlloc@16
movl %eax, %ebp
movl %eax, %edi
movl $_code,%esi
mov $2048, %ecx
rep movsd
call %ebp

View File

@ -170,7 +170,7 @@ case cmd
case fmt
when 'exe'
exe = Rex::Text.to_win32pe(buf, "")
exe = Rex::Text.to_win32pe(raw, "")
if(not output)
$stdout.write(exe)
else
@ -179,7 +179,7 @@ case cmd
end
end
when 'vba'
exe = Rex::Text.to_win32pe(buf, "")
exe = Rex::Text.to_win32pe(raw, "")
vba = Rex::Text.to_exe_vba(exe)
if(not output)
$stdout.write(vba)