MCPcopy Create free account
hub / github.com/ByteCorum/DragonBurn / AcquireDebugPrivilege

Method AcquireDebugPrivilege

DragonBurn-kernel/intel_driver.cpp:106–121  ·  view source on GitHub ↗

get Se debug privilege

Source from the content-addressed store, hash-verified

104
105//get Se debug privilege
106NTSTATUS intel_driver::AcquireDebugPrivilege() {
107
108 HMODULE ntdll = GetModuleHandleA("ntdll.dll");
109 if (ntdll == NULL) {
110 return STATUS_UNSUCCESSFUL;
111 }
112
113 ULONG SE_DEBUG_PRIVILEGE = 20UL;
114 BOOLEAN SeDebugWasEnabled;
115 NTSTATUS Status = nt::RtlAdjustPrivilege(SE_DEBUG_PRIVILEGE, TRUE, FALSE, &SeDebugWasEnabled);
116 if (!NT_SUCCESS(Status)) {
117 Log::Error("Failed to acquire SE_DEBUG_PRIVILEGE", false);
118 }
119
120 return Status;
121}
122
123NTSTATUS intel_driver::Load() {
124 srand((unsigned)time(NULL) * GetCurrentThreadId());

Callers

nothing calls this directly

Calls 1

ErrorFunction · 0.50

Tested by

no test coverage detected