-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
33 lines (27 loc) · 987 Bytes
/
Copy pathmain.cpp
File metadata and controls
33 lines (27 loc) · 987 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <Windows.h>
#include <vector>
#include <cstdio>
#include "Resolver/resolver.h"
int main() {
std::vector<const char*> map = {
"NtAcceptConnectPort", "NtAccessCheck", "NtAllocateLocallyUniqueId", "NtAllocateReserveObject",
"NtAllocateUserPhysicalPages", "NtAllocateVirtualMemory", "NtAlpcCreatePort", "NtAlpcConnectPort",
"NtAlpcSendWaitReceivePort", "NtAreMappedFilesTheSame", "NtAssignProcessToJobObject", "NtCancelIoFile"
};
HMODULE hNtdll = GetModuleHandle("ntdll.dll");
if (!hNtdll) {
printf("Failed to get ntdll.dll, very unusual.\n");
return 1;
}
for (const auto& routine : map) {
Resolver::Structure* pStructure = Resolver::Resolve(hNtdll, routine);
if (!pStructure) {
break;
}
printf("Resolved: %s -> SSN: 0x%lX | Syscall Address: %p\n", routine, pStructure->ServiceNumber, pStructure->SyscallAddress);
}
return 0;
}