Files
srothlisberger6361-ShellCod…/ShellcodeLoader/ShellCodeLoader.h
T
2024-01-13 20:04:34 +01:00

31 lines
879 B
C

#pragma once
# include <Windows.h>
// https://stackoverflow.com/questions/1941307/debug-print-macro-in-c
#define DEBUG
// Debug statements
#ifdef DEBUG
#define DEBUG_PRINT(...) fprintf( stderr, __VA_ARGS__ );
#else
#define DEBUG_PRINT(...) do{ } while ( false )
#endif
/*
* Structure to hold information about our syscalls
*/
typedef struct _SYSCALL_INFO_ENTRY {
LPVOID pSyscall; // pointer to syscall instruction
DWORD syscallId; // ID of the syscall
LPCSTR functionHash; // unused atm, for future use
} SYSCALL_INFO_ENTRY, *PSYSCALL_INFO_ENTRY;
// see populate_syscall_table() for info on how to add more syscalls
typedef struct SYSCALL_INFO_TABLE {
SYSCALL_INFO_ENTRY NtAllocateVirtualMemory;
SYSCALL_INFO_ENTRY NtProtectVirtualMemory;
SYSCALL_INFO_ENTRY NtCreateThreadEx;
SYSCALL_INFO_ENTRY NtWaitForSingleObject;
} SYSCALL_INFO_TABLE, * PSYSCALL_INFO_TABLE;