Force stack alignment

This commit is contained in:
Michael-ZecOps 2020-08-14 01:16:20 +03:00 committed by GitHub
parent f043e4b9b4
commit 5877c79538
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -58,6 +58,9 @@ module Exe
def create_thread_stub_x64
<<-EOS
push rbp
mov rbp, rsp
and rsp, FFFFFFFFFFFFFFF0h
sub rsp, 38h
mov rcx, hook_libname
@ -77,8 +80,7 @@ module Exe
mov rdx, rcx
call rax
add rsp, 38h
leave
jmp entrypoint
hook_libname db 'kernel32', 0