aboutsummaryrefslogtreecommitdiff
path: root/CodeExecution/Invoke-ReflectivePEInjection_Resources/Shellcode/x86/ExitThread.asm
diff options
context:
space:
mode:
Diffstat (limited to 'CodeExecution/Invoke-ReflectivePEInjection_Resources/Shellcode/x86/ExitThread.asm')
-rw-r--r--CodeExecution/Invoke-ReflectivePEInjection_Resources/Shellcode/x86/ExitThread.asm13
1 files changed, 13 insertions, 0 deletions
diff --git a/CodeExecution/Invoke-ReflectivePEInjection_Resources/Shellcode/x86/ExitThread.asm b/CodeExecution/Invoke-ReflectivePEInjection_Resources/Shellcode/x86/ExitThread.asm
new file mode 100644
index 0000000..ce66543
--- /dev/null
+++ b/CodeExecution/Invoke-ReflectivePEInjection_Resources/Shellcode/x86/ExitThread.asm
@@ -0,0 +1,13 @@
+[SECTION .text]
+global _start
+
+_start:
+ ; Set a var to 1, let PS know the EXE is exiting
+ mov ebx, 0x41414141
+ mov [ebx], byte 0x01
+
+ ; Call exitthread instead of exit process
+ sub esp, 0x20
+ and esp, 0xFFFFFFc0 ; Needed for stack alignment
+ mov ebx, 0x41414141
+ call ebx