-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathentry.cpp
More file actions
40 lines (30 loc) · 1.27 KB
/
Copy pathentry.cpp
File metadata and controls
40 lines (30 loc) · 1.27 KB
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
34
35
36
37
38
39
40
#include "detector.hpp"
using namespace kstd;
extern "C" NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) {
UNREFERENCED_PARAMETER(DriverObject);
UNREFERENCED_PARAMETER(RegistryPath);
FLOG_INFO("DriverEntry called . . .");
NTSTATUS status = STATUS_SUCCESS;
/*ULONG modulesSize = 0;
status = ZwQuerySystemInformation(SystemInformationClass::SystemModuleInformationClass, NULL, 0, &modulesSize);
if (status != STATUS_INFO_LENGTH_MISMATCH) {
LOG_INFO("Failed to query system module information size");
return status;
}
SystemModules = (PRTL_PROCESS_MODULES)ExAllocatePoolWithTag(NonPagedPool, modulesSize, 'modl');
if (!SystemModules) {
LOG_INFO("Failed to allocate memory for system modules");
return STATUS_INSUFFICIENT_RESOURCES;
}
status = ZwQuerySystemInformation(SystemInformationClass::SystemModuleInformationClass, SystemModules, modulesSize, &modulesSize);
if (!NT_SUCCESS(status)) {
LOG_INFO("Failed to query system module information");
ExFreePoolWithTag(SystemModules, 'modl');
return status;
}
LOG_INFO("Ok . . .");
//MemoryScan(); // just for the lulz
//ExFreePoolWithTag(SystemModules, 'modl');
*/
return status;
}