Fix lsass pid retrieval

use MAXIMUM_ALLOWED instead of PROCESS_QUERY_INFORMATION
This commit is contained in:
nikaiw
2023-11-02 22:04:24 -05:00
committed by Maxime Meignan
parent 2cf0c0a54f
commit fa8f55ad83
+1 -1
View File
@@ -87,7 +87,7 @@ DWORD SandFindProcessPidByName(TCHAR* targetProcessName, DWORD* pPid) {
*pPid = 0;
while (*pPid == 0) {
status = NtGetNextProcess(hProcess, PROCESS_QUERY_INFORMATION, 0, 0, &hProcess);
status = NtGetNextProcess(hProcess, MAXIMUM_ALLOWED, 0, 0, &hProcess);
if (status == STATUS_NO_MORE_ENTRIES) {
_tprintf_or_not(TEXT("[-] The process '%s' was not found\n"), targetProcessName);