01-02-2021, 11:14 AM
(31-01-2021, 04:48 PM)kesmezar كتب : I just added 32bit. Since I don't use 64bit, I don't have a chance to try it.
;
; This is a very basic loader without Address Space Layout Randomization support.
; It Can build to produce 32bit or 64bit application (MASM32 or MASM64)
;
ifndef _Win64
include masm32rt.inc
else
include masm64rt.inc
endif
.const
filename db "test.exe", 0
targetaddress dd 4012D8h
values db 1 dup(74h)
sinfo STARTUPINFO<>
pinfo PROCESS_INFORMATION<>
.code
start proc
invoke CreateProcessA, addr filename, NULL, 0, 0, 0, CREATE_SUSPENDED, 0, 0, addr sinfo, addr pinfo
invoke WriteProcessMemory, pinfo.hProcess, targetaddress, addr values, 1, NULL
invoke ResumeThread, pinfo.hThread
invoke ExitProcess, 0
ret 0
start endp
end
! Ok
.I Can't download your attachment yet, but I adapted my sample to work with your provided address of [test.exe] application
.I Can't download your attachment yet, but I adapted my sample to work with your provided address of [test.exe] application
.Attached 32bit and 64bit build from my previous code