| 41 | } |
| 42 | |
| 43 | bool BypassAntiKernelDbg::Bypass() { |
| 44 | g_pNtQuerySystemInformation = (PNtQuerySystemInformation)GetExportSymbolAddress(L"NtQuerySystemInformation"); |
| 45 | if (g_pNtQuerySystemInformation) { |
| 46 | NTSTATUS status = DetourAttach((PVOID*)&g_pNtQuerySystemInformation, HookNtQuerySystemInformation); |
| 47 | if (!NT_SUCCESS(status)) |
| 48 | return false; |
| 49 | status = DetourTransactionCommit(); |
| 50 | if (!NT_SUCCESS(status)) |
| 51 | return false; |
| 52 | } |
| 53 | return true; |
| 54 | |
| 55 | } |
| 56 | |
| 57 | bool BypassAntiKernelDbg::Unbypass() { |
| 58 | NTSTATUS status = DetourDetach((PVOID*)&g_pNtQuerySystemInformation, HookNtQuerySystemInformation); |
nothing calls this directly
no test coverage detected