diff --git a/modules/AssemblyExec/AssemblyExec.cpp b/modules/AssemblyExec/AssemblyExec.cpp index 7e80d7c..867cd13 100644 --- a/modules/AssemblyExec/AssemblyExec.cpp +++ b/modules/AssemblyExec/AssemblyExec.cpp @@ -692,6 +692,7 @@ int AssemblyExec::createNewProcessWithSpoofedParent(const std::string& payload, // https://github.com/0xrob/XOR-Shellcode-QueueUserAPC-Syscall/blob/main/queueUserAPC-XOR/Source.cpp SIZE_T sizeToAlloc = payload.size(); + remoteBuffer=NULL; Sw3NtAllocateVirtualMemory_(piProcInfo.hProcess, &remoteBuffer, 0, &sizeToAlloc, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); SIZE_T NumberOfBytesWritten; @@ -838,6 +839,7 @@ int AssemblyExec::createNewProcess(const std::string& payload, const std::string // https://github.com/0xrob/XOR-Shellcode-QueueUserAPC-Syscall/blob/main/queueUserAPC-XOR/Source.cpp SIZE_T sizeToAlloc = payload.size(); + remoteBuffer=NULL; Sw3NtAllocateVirtualMemory_(piProcInfo.hProcess, &remoteBuffer, 0, &sizeToAlloc, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); SIZE_T NumberOfBytesWritten; diff --git a/modules/Inject/Inject.cpp b/modules/Inject/Inject.cpp index 0a101c1..3d61951 100644 --- a/modules/Inject/Inject.cpp +++ b/modules/Inject/Inject.cpp @@ -227,6 +227,7 @@ std::string static inline inject(int pid, const std::string& payload, bool useSy PVOID remoteBuffer; SIZE_T sizeToAlloc = payload.size(); + remoteBuffer=NULL; Sw3NtAllocateVirtualMemory_(processHandle, &remoteBuffer, 0, &sizeToAlloc, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); SIZE_T NumberOfBytesWritten; @@ -351,6 +352,7 @@ std::string static inline spawnInject(const std::string& payload, const std::str PVOID remoteBuffer; SIZE_T sizeToAlloc = payload.size(); + remoteBuffer=NULL; Sw3NtAllocateVirtualMemory_(piProcInfo.hProcess, &remoteBuffer, 0, &sizeToAlloc, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); SIZE_T NumberOfBytesWritten;