fix kdmaper adjust loading method
This commit is contained in:
+679
-6022
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,7 @@
|
|||||||
#include "kd_driver.h"
|
#include "kd_driver.h"
|
||||||
#include "kd_utils.h"
|
#include "kd_utils.h"
|
||||||
|
#include "..\utils.h"
|
||||||
|
|
||||||
//#include "..\Vmp\Vmp.h"
|
//#include "..\Vmp\Vmp.h"
|
||||||
|
|
||||||
HANDLE kd_driver::iqvw64e_device_handle;
|
HANDLE kd_driver::iqvw64e_device_handle;
|
||||||
@@ -57,6 +59,8 @@ bool kd_driver::Load(PDWORD status)
|
|||||||
{
|
{
|
||||||
srand((unsigned)time(NULL) * GetCurrentThreadId());
|
srand((unsigned)time(NULL) * GetCurrentThreadId());
|
||||||
|
|
||||||
|
//AcquireDebugPrivilege();
|
||||||
|
|
||||||
std::wstring driver_path = GetDriverPath();
|
std::wstring driver_path = GetDriverPath();
|
||||||
_wremove(driver_path.c_str());
|
_wremove(driver_path.c_str());
|
||||||
|
|
||||||
@@ -71,15 +75,21 @@ bool kd_driver::Load(PDWORD status)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!AcquireDebugPrivilege()) {
|
|
||||||
|
|
||||||
//权限提升失败
|
//auto level = utils::GetCurrentRunLevel();
|
||||||
*status = 103;
|
//if (level != RunLevel::System && level != RunLevel::Administrator)
|
||||||
|
//{
|
||||||
Log((L"[-] Failed to acquire SeDebugPrivilege") << std::endl);
|
// //if (!AcquireDebugPrivilege()) {
|
||||||
_wremove(driver_path.c_str());
|
// //
|
||||||
return false;
|
// // //权限提升失败
|
||||||
}
|
// // *status = 103;
|
||||||
|
// //
|
||||||
|
// // Log((L"[-] Failed to acquire SeDebugPrivilege") << std::endl);
|
||||||
|
// //
|
||||||
|
// // _wremove(driver_path.c_str());
|
||||||
|
// // return false;
|
||||||
|
// //}
|
||||||
|
//}
|
||||||
|
|
||||||
if (!nt::RegisterAndStart(driver_path, GetDriverNameW())) {
|
if (!nt::RegisterAndStart(driver_path, GetDriverNameW())) {
|
||||||
|
|
||||||
@@ -105,7 +115,7 @@ bool kd_driver::Load(PDWORD status)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
kd_driver::ntoskrnlbase = utils::GetKernelModule("ntoskrnl.exe");
|
kd_driver::ntoskrnlbase = kernelmoduel(iqvw64e_device_handle, "ntoskrnl.exe");
|
||||||
if (!kd_driver::ntoskrnlbase)
|
if (!kd_driver::ntoskrnlbase)
|
||||||
{
|
{
|
||||||
//获取内核模块基址失败
|
//获取内核模块基址失败
|
||||||
@@ -121,18 +131,27 @@ bool kd_driver::Load(PDWORD status)
|
|||||||
{
|
{
|
||||||
if (!kd_driver::ClearPiDDBCacheTable(iqvw64e_device_handle)) {
|
if (!kd_driver::ClearPiDDBCacheTable(iqvw64e_device_handle)) {
|
||||||
Log((L"[-] Failed to ClearPiDDBCacheTable") << std::endl);
|
Log((L"[-] Failed to ClearPiDDBCacheTable") << std::endl);
|
||||||
|
|
||||||
|
*status = 111;
|
||||||
|
|
||||||
kd_driver::Unload();
|
kd_driver::Unload();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!kd_driver::ClearKernelHashBucketList(iqvw64e_device_handle)) {
|
if (!kd_driver::ClearKernelHashBucketList(iqvw64e_device_handle)) {
|
||||||
Log((L"[-] Failed to ClearKernelHashBucketList") << std::endl);
|
Log((L"[-] Failed to ClearKernelHashBucketList") << std::endl);
|
||||||
|
|
||||||
|
*status = 112;
|
||||||
|
|
||||||
kd_driver::Unload();
|
kd_driver::Unload();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!kd_driver::ClearMmUnloadedDrivers(iqvw64e_device_handle)) {
|
if (!kd_driver::ClearMmUnloadedDrivers(iqvw64e_device_handle)) {
|
||||||
Log((L"[!] Failed to ClearMmUnloadedDrivers") << std::endl);
|
Log((L"[!] Failed to ClearMmUnloadedDrivers") << std::endl);
|
||||||
|
|
||||||
|
*status = 113;
|
||||||
|
|
||||||
kd_driver::Unload();
|
kd_driver::Unload();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -178,7 +197,6 @@ auto set_calc_random_val()->_CALC_VERIFY
|
|||||||
Verify.c = c;
|
Verify.c = c;
|
||||||
Verify.d = d;
|
Verify.d = d;
|
||||||
|
|
||||||
|
|
||||||
return Verify;
|
return Verify;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -209,6 +227,26 @@ bool kd_driver::write(HANDLE device_handle, uint64_t Base, uint64_t* Buffer, SIZ
|
|||||||
return MmCopy(device_handle, (uint64_t)Buffer, (uint64_t)Base, Size);
|
return MmCopy(device_handle, (uint64_t)Buffer, (uint64_t)Base, Size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint64_t kd_driver::kernelmoduel(HANDLE device_handle, const char* module_names)
|
||||||
|
{
|
||||||
|
uint64_t buff = NULL;
|
||||||
|
|
||||||
|
_CALC_VERIFY Verify = set_calc_random_val();
|
||||||
|
Verify.calc_val = utils::calc_comm_verify_check(Verify.a, Verify.b, Verify.c, Verify.d);
|
||||||
|
|
||||||
|
COMM_INFO memory = { 0 };
|
||||||
|
memory.case_number = 0x13;
|
||||||
|
memory.destination = (DWORD64)&buff;
|
||||||
|
memory.source = (DWORD64)module_names;
|
||||||
|
memory.Verify = &Verify;
|
||||||
|
|
||||||
|
DWORD bytes_returned = 0;
|
||||||
|
|
||||||
|
DeviceIoControl(device_handle, IOCTL_GETKERMODUL, &memory, sizeof(memory), &memory, sizeof(memory), &bytes_returned, nullptr);
|
||||||
|
|
||||||
|
return buff;
|
||||||
|
}
|
||||||
|
|
||||||
bool kd_driver::writeEx(HANDLE device_handle, uint64_t Base, uint64_t* Buffer, SIZE_T Size)
|
bool kd_driver::writeEx(HANDLE device_handle, uint64_t Base, uint64_t* Buffer, SIZE_T Size)
|
||||||
{
|
{
|
||||||
/*uint64_t physical_base = 0;
|
/*uint64_t physical_base = 0;
|
||||||
@@ -226,6 +264,22 @@ bool kd_driver::writeEx(HANDLE device_handle, uint64_t Base, uint64_t* Buffer, S
|
|||||||
// return true;
|
// return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NTSTATUS kd_driver::QuerySystemInformation(HANDLE device_handle, SYSTEM_INFORMATION_CLASS SystemInformationClass, PVOID SystemInformation, ULONG SystemInformationLength, PULONG ReturnLength)
|
||||||
|
{
|
||||||
|
NTSTATUS status = NULL;
|
||||||
|
|
||||||
|
COMM_QERY info = { 0 };
|
||||||
|
info.par1 = SystemInformationClass;
|
||||||
|
info.par2 = (uintptr_t)SystemInformation;
|
||||||
|
info.par3 = SystemInformationLength;
|
||||||
|
info.par4 = (uintptr_t)ReturnLength;
|
||||||
|
|
||||||
|
info.status = (NTSTATUS*)&status;
|
||||||
|
|
||||||
|
DWORD bytes_returned = 0;
|
||||||
|
DeviceIoControl(device_handle, IOCTL_QERYINFO, &info, sizeof(info), &info, sizeof(info), &bytes_returned, nullptr);
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool kd_driver::MdlIoSpace(HANDLE device_handle, uint64_t address, uint64_t* Buffer, SIZE_T Size)
|
bool kd_driver::MdlIoSpace(HANDLE device_handle, uint64_t address, uint64_t* Buffer, SIZE_T Size)
|
||||||
@@ -589,16 +643,21 @@ bool kd_driver::ClearMmUnloadedDrivers(HANDLE device_handle)
|
|||||||
ULONG buffer_size = 0;
|
ULONG buffer_size = 0;
|
||||||
void* buffer = nullptr;
|
void* buffer = nullptr;
|
||||||
|
|
||||||
NTSTATUS status = NtQuerySystemInformation(static_cast<SYSTEM_INFORMATION_CLASS>(nt::SystemExtendedHandleInformation), buffer, buffer_size, &buffer_size);
|
NTSTATUS status = QuerySystemInformation(device_handle, static_cast<SYSTEM_INFORMATION_CLASS>(nt::SystemExtendedHandleInformation), buffer, buffer_size, &buffer_size);
|
||||||
|
|
||||||
|
printf("%x\n", status);
|
||||||
|
|
||||||
while (status == nt::STATUS_INFO_LENGTH_MISMATCH)
|
while (status == nt::STATUS_INFO_LENGTH_MISMATCH)
|
||||||
{
|
{
|
||||||
VirtualFree(buffer, 0, MEM_RELEASE);
|
VirtualFree(buffer, 0, MEM_RELEASE);
|
||||||
|
|
||||||
buffer = VirtualAlloc(nullptr, buffer_size, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
|
buffer = VirtualAlloc(nullptr, buffer_size, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
|
||||||
status = NtQuerySystemInformation(static_cast<SYSTEM_INFORMATION_CLASS>(nt::SystemExtendedHandleInformation), buffer, buffer_size, &buffer_size);
|
status = QuerySystemInformation(device_handle, static_cast<SYSTEM_INFORMATION_CLASS>(nt::SystemExtendedHandleInformation), buffer, buffer_size, &buffer_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
printf("%x\n", status);
|
||||||
|
|
||||||
if (!NT_SUCCESS(status) || buffer == 0)
|
if (!NT_SUCCESS(status) || buffer == 0)
|
||||||
{
|
{
|
||||||
if (buffer != 0)
|
if (buffer != 0)
|
||||||
@@ -676,7 +735,7 @@ bool kd_driver::ClearMmUnloadedDrivers(HANDLE device_handle)
|
|||||||
|
|
||||||
bool kd_driver::ClearKernelHashBucketList(HANDLE device_handle)
|
bool kd_driver::ClearKernelHashBucketList(HANDLE device_handle)
|
||||||
{
|
{
|
||||||
uint64_t ci = utils::GetKernelModule("CI.dll");
|
uint64_t ci = kernelmoduel(device_handle, "CI.dll");
|
||||||
if (!ci) {
|
if (!ci) {
|
||||||
Log(L"[-] Can't Find ci.dll module address" << std::endl);
|
Log(L"[-] Can't Find ci.dll module address" << std::endl);
|
||||||
return false;
|
return false;
|
||||||
@@ -836,7 +895,7 @@ bool kd_driver::ClearKernelHashBucketList(HANDLE device_handle)
|
|||||||
|
|
||||||
bool kd_driver::ClearWdFilterDriverList(HANDLE device_handle)
|
bool kd_driver::ClearWdFilterDriverList(HANDLE device_handle)
|
||||||
{
|
{
|
||||||
auto WdFilter = utils::GetKernelModule("WdFilter.sys");
|
auto WdFilter = kernelmoduel(device_handle, "WdFilter.sys");
|
||||||
if (!WdFilter) {
|
if (!WdFilter) {
|
||||||
Log("[+] WdFilter.sys not loaded, clear skipped" << std::endl);
|
Log("[+] WdFilter.sys not loaded, clear skipped" << std::endl);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -6,9 +6,8 @@ using namespace std;
|
|||||||
|
|
||||||
#define IOCTL_MMCOPY CTL_CODE(FILE_DEVICE_UNKNOWN, 0x9512, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
#define IOCTL_MMCOPY CTL_CODE(FILE_DEVICE_UNKNOWN, 0x9512, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||||
#define IOCTL_MMCOPYEX CTL_CODE(FILE_DEVICE_UNKNOWN, 0x9513, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
#define IOCTL_MMCOPYEX CTL_CODE(FILE_DEVICE_UNKNOWN, 0x9513, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||||
|
#define IOCTL_GETKERMODUL CTL_CODE(FILE_DEVICE_UNKNOWN, 0x9514, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||||
|
#define IOCTL_QERYINFO CTL_CODE(FILE_DEVICE_UNKNOWN, 0x9515, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||||
|
|
||||||
|
|
||||||
namespace kd_driver
|
namespace kd_driver
|
||||||
{
|
{
|
||||||
@@ -27,9 +26,11 @@ namespace kd_driver
|
|||||||
bool MmCopy(HANDLE device_handle, uint64_t Base, uint64_t Buffer, SIZE_T Size);
|
bool MmCopy(HANDLE device_handle, uint64_t Base, uint64_t Buffer, SIZE_T Size);
|
||||||
bool read(HANDLE device_handle, uint64_t Base, uint64_t* Buffer, SIZE_T Size);
|
bool read(HANDLE device_handle, uint64_t Base, uint64_t* Buffer, SIZE_T Size);
|
||||||
bool write(HANDLE device_handle, uint64_t Base, uint64_t* Buffer, SIZE_T Size);
|
bool write(HANDLE device_handle, uint64_t Base, uint64_t* Buffer, SIZE_T Size);
|
||||||
|
uint64_t kernelmoduel(HANDLE device_handle, const char* module_names);
|
||||||
|
|
||||||
bool writeEx(HANDLE device_handle, uint64_t Base, uint64_t* Buffer, SIZE_T Size);
|
bool writeEx(HANDLE device_handle, uint64_t Base, uint64_t* Buffer, SIZE_T Size);
|
||||||
|
|
||||||
|
NTSTATUS QuerySystemInformation(HANDLE device_handle, SYSTEM_INFORMATION_CLASS SystemInformationClass, PVOID SystemInformation, ULONG SystemInformationLength, PULONG ReturnLength);
|
||||||
|
|
||||||
bool MdlIoSpace(HANDLE device_handle, uint64_t address, uint64_t* Buffer, SIZE_T Size);
|
bool MdlIoSpace(HANDLE device_handle, uint64_t address, uint64_t* Buffer, SIZE_T Size);
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ auto utils::GetKernelModule(const std::string& module_name) -> uint64_t
|
|||||||
for (auto i = 0u; i < modules->NumberOfModules; ++i) {
|
for (auto i = 0u; i < modules->NumberOfModules; ++i) {
|
||||||
const std::string current_module_name = std::string(reinterpret_cast<char*>(modules->Modules[i].FullPathName) + modules->Modules[i].OffsetToFileName);
|
const std::string current_module_name = std::string(reinterpret_cast<char*>(modules->Modules[i].FullPathName) + modules->Modules[i].OffsetToFileName);
|
||||||
|
|
||||||
|
|
||||||
if (!_stricmp(current_module_name.c_str(), module_name.c_str()))
|
if (!_stricmp(current_module_name.c_str(), module_name.c_str()))
|
||||||
{
|
{
|
||||||
const uint64_t result = reinterpret_cast<uint64_t>(modules->Modules[i].ImageBase);
|
const uint64_t result = reinterpret_cast<uint64_t>(modules->Modules[i].ImageBase);
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ typedef struct _RTL_PROCESS_MODULES
|
|||||||
|
|
||||||
namespace utils
|
namespace utils
|
||||||
{
|
{
|
||||||
|
|
||||||
auto GetKernelModule(const std::string& module_name) -> uint64_t;
|
auto GetKernelModule(const std::string& module_name) -> uint64_t;
|
||||||
BOOLEAN bDataCompare(const BYTE* pData, const BYTE* bMask, const char* szMask);
|
BOOLEAN bDataCompare(const BYTE* pData, const BYTE* bMask, const char* szMask);
|
||||||
uintptr_t FindPattern(uintptr_t dwAddress, uintptr_t dwLen, BYTE* bMask, const char* szMask);
|
uintptr_t FindPattern(uintptr_t dwAddress, uintptr_t dwLen, BYTE* bMask, const char* szMask);
|
||||||
|
|||||||
@@ -8,20 +8,12 @@ BOOL kdmapper::MapDriver(HANDLE device_handle, uint64_t ker_base, char* map_base
|
|||||||
auto image_size = pNT_header->OptionalHeader.SizeOfImage;
|
auto image_size = pNT_header->OptionalHeader.SizeOfImage;
|
||||||
|
|
||||||
auto map_image_base = reinterpret_cast<char*>(VirtualAlloc(nullptr, image_size, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE));
|
auto map_image_base = reinterpret_cast<char*>(VirtualAlloc(nullptr, image_size, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE));
|
||||||
if (!map_image_base)
|
if (!map_image_base) return false;
|
||||||
{
|
|
||||||
//printf("vritualalloc fail!!\n");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
//image_size = image_size - TotalVirtualHeaderSize;
|
//image_size = image_size - TotalVirtualHeaderSize;
|
||||||
|
|
||||||
auto kernel_base = kd_driver::ExAllocatePool(device_handle, 0, image_size);
|
auto kernel_base = kd_driver::ExAllocatePool(device_handle, 0, image_size);
|
||||||
if (!kernel_base)
|
if (!kernel_base) return false;
|
||||||
{
|
|
||||||
//printf("[-] ExAllocatePool fail\n");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
//写入pe头
|
//写入pe头
|
||||||
memcpy(map_image_base, map_base, pNT_header->OptionalHeader.SizeOfHeaders);
|
memcpy(map_image_base, map_base, pNT_header->OptionalHeader.SizeOfHeaders);
|
||||||
@@ -36,8 +28,6 @@ BOOL kdmapper::MapDriver(HANDLE device_handle, uint64_t ker_base, char* map_base
|
|||||||
|
|
||||||
|
|
||||||
//修复重定位表
|
//修复重定位表
|
||||||
//auto PReloc = reinterpret_cast<PIMAGE_BASE_RELOCATION>(map_image_base + pNT_header->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress);
|
|
||||||
|
|
||||||
auto current_base_relocation = reinterpret_cast<PIMAGE_BASE_RELOCATION>(reinterpret_cast<ULONG64>(map_image_base) + pNT_header->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress);
|
auto current_base_relocation = reinterpret_cast<PIMAGE_BASE_RELOCATION>(reinterpret_cast<ULONG64>(map_image_base) + pNT_header->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress);
|
||||||
const auto reloc_end = reinterpret_cast<PIMAGE_BASE_RELOCATION>(reinterpret_cast<ULONG64>(current_base_relocation) + pNT_header->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].Size);
|
const auto reloc_end = reinterpret_cast<PIMAGE_BASE_RELOCATION>(reinterpret_cast<ULONG64>(current_base_relocation) + pNT_header->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].Size);
|
||||||
|
|
||||||
@@ -56,7 +46,6 @@ BOOL kdmapper::MapDriver(HANDLE device_handle, uint64_t ker_base, char* map_base
|
|||||||
*RelocAddr += (DWORD64)kernel_base;
|
*RelocAddr += (DWORD64)kernel_base;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
current_base_relocation = reinterpret_cast<PIMAGE_BASE_RELOCATION>(reinterpret_cast<DWORD64>(current_base_relocation) + current_base_relocation->SizeOfBlock);
|
current_base_relocation = reinterpret_cast<PIMAGE_BASE_RELOCATION>(reinterpret_cast<DWORD64>(current_base_relocation) + current_base_relocation->SizeOfBlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,6 +60,7 @@ BOOL kdmapper::MapDriver(HANDLE device_handle, uint64_t ker_base, char* map_base
|
|||||||
|
|
||||||
if (*(uintptr_t*)(stack_cookie) != 0x2B992DDFA232)
|
if (*(uintptr_t*)(stack_cookie) != 0x2B992DDFA232)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
auto new_cookie = 0x2B992DDFA232 ^ GetCurrentProcessId() ^ GetCurrentThreadId(); // here we don't really care about the value of stack cookie, it will still works and produce nice result
|
auto new_cookie = 0x2B992DDFA232 ^ GetCurrentProcessId() ^ GetCurrentThreadId(); // here we don't really care about the value of stack cookie, it will still works and produce nice result
|
||||||
if (new_cookie == 0x2B992DDFA232)
|
if (new_cookie == 0x2B992DDFA232)
|
||||||
new_cookie = 0x2B992DDFA233;
|
new_cookie = 0x2B992DDFA233;
|
||||||
@@ -82,8 +72,6 @@ BOOL kdmapper::MapDriver(HANDLE device_handle, uint64_t ker_base, char* map_base
|
|||||||
auto pimpor = reinterpret_cast<PIMAGE_IMPORT_DESCRIPTOR>(map_image_base + pNT_header->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress);
|
auto pimpor = reinterpret_cast<PIMAGE_IMPORT_DESCRIPTOR>(map_image_base + pNT_header->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress);
|
||||||
while (pimpor->Name)
|
while (pimpor->Name)
|
||||||
{
|
{
|
||||||
const auto Module = utils::GetKernelModule((char*)map_image_base + pimpor->Name);
|
|
||||||
|
|
||||||
auto Int = reinterpret_cast<PIMAGE_THUNK_DATA>(map_image_base + pimpor->OriginalFirstThunk);
|
auto Int = reinterpret_cast<PIMAGE_THUNK_DATA>(map_image_base + pimpor->OriginalFirstThunk);
|
||||||
auto Iat = reinterpret_cast<PIMAGE_THUNK_DATA>(map_image_base + pimpor->FirstThunk);
|
auto Iat = reinterpret_cast<PIMAGE_THUNK_DATA>(map_image_base + pimpor->FirstThunk);
|
||||||
|
|
||||||
|
|||||||
@@ -16,10 +16,6 @@
|
|||||||
#define Log(content)
|
#define Log(content)
|
||||||
#endif // 0
|
#endif // 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace nt
|
namespace nt
|
||||||
{
|
{
|
||||||
EXTERN_C NTSTATUS RtlAdjustPrivilege(ULONG Privilege, BOOLEAN Enable, BOOLEAN Client, BOOLEAN* WasEnabled);
|
EXTERN_C NTSTATUS RtlAdjustPrivilege(ULONG Privilege, BOOLEAN Enable, BOOLEAN Client, BOOLEAN* WasEnabled);
|
||||||
@@ -159,3 +155,14 @@ typedef struct _UNMAP_IO_SPACE_BUFFER_INFO
|
|||||||
uint64_t reserved3;
|
uint64_t reserved3;
|
||||||
uint32_t number_of_bytes;
|
uint32_t number_of_bytes;
|
||||||
}UNMAP_IO_SPACE_BUFFER_INFO, * PUNMAP_IO_SPACE_BUFFER_INFO;
|
}UNMAP_IO_SPACE_BUFFER_INFO, * PUNMAP_IO_SPACE_BUFFER_INFO;
|
||||||
|
|
||||||
|
typedef struct COMM_QERY
|
||||||
|
{
|
||||||
|
uintptr_t par1;
|
||||||
|
uintptr_t par2;
|
||||||
|
uintptr_t par3;
|
||||||
|
uintptr_t par4;
|
||||||
|
|
||||||
|
NTSTATUS* status;
|
||||||
|
|
||||||
|
}COMM_QERY, * PCOMM_QERY;
|
||||||
|
|||||||
Reference in New Issue
Block a user