Skip to content

Commit 7dc1cce

Browse files
fix: add DUPLICATE_SAME_ACCESS to param and add PROCESS_DUP_HANDLE
1 parent a59d5cf commit 7dc1cce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1679,7 +1679,7 @@ _NtQueryObject pfnNtQueryObject =
16791679
&dupHandle,
16801680
0,
16811681
0,
1682-
0
1682+
DUPLICATE_SAME_ACCESS
16831683
)))
16841684
{
16851685
printf("[%#x] Error!\n", handle.Handle);
@@ -2044,7 +2044,7 @@ void PIDinspect(DWORD pid) { // ooh guys look i'm in the void
20442044

20452045

20462046

2047-
HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, pid);
2047+
HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ | PROCESS_DUP_HANDLE, FALSE, pid);
20482048
// The above little handle opener is currently a somwehat "agressive" flag, since it
20492049
// Requests read access directly to the process' actual memory. This can get us rejected if called
20502050
// on a very high privilege process, such as lsass.exe This means that we can't read the memory

0 commit comments

Comments
 (0)