Optimize assembly payloads
This commit is contained in:
@ -2,8 +2,6 @@ BITS 64
|
||||
|
||||
main: ; Replacement entry point
|
||||
push rsi
|
||||
push rdi
|
||||
sub rsp, 8h
|
||||
|
||||
|
||||
call GetKernel32ModuleHandle
|
||||
@ -11,20 +9,16 @@ main: ; Replacement entry point
|
||||
|
||||
mov rcx, rax
|
||||
call GetAddressOf_GetProcAddress
|
||||
mov rdi, rax ; *GetProcAddress
|
||||
|
||||
|
||||
mov rcx, rsi ; kernel32.dll
|
||||
lea rdx, [rel s_LoadLibraryA]
|
||||
mov rax, rdi ; *GetProcAddress
|
||||
call rax ; rax = *LoadLibraryA
|
||||
|
||||
lea rcx, [rel dllPath]
|
||||
call rax ; LoadLibraryA(dllPath)
|
||||
|
||||
|
||||
add rsp, 8h
|
||||
pop rdi
|
||||
pop rsi
|
||||
ret
|
||||
|
||||
|
||||
Reference in New Issue
Block a user