代码拉取完成,页面将自动刷新
#include "SSDT.h"
VOID SSDT::SSDT_Init()
{
GetKeServiceDescriptorTableAddrX64();
}
ULONG64 SSDT::GetSSDTFuncCurAddrByIndex(ULONG index)
{
LONG dwtmp = 0;
ULONGLONG addr = 0;
PULONG ServiceTableBase = NULL;
if (KeServiceDescriptorTable != NULL) {
ServiceTableBase = (PULONG)KeServiceDescriptorTable->ServiceTableBase;
dwtmp = ServiceTableBase[index];
dwtmp = dwtmp >> 4;
addr = ((LONGLONG)dwtmp + (ULONGLONG)ServiceTableBase);//&0xFFFFFFF0;
}
return addr;
}
VOID SSDT::Un_SSDTClass()
{
this->KeServiceDescriptorTable = nullptr;
}
void SSDT::GetKeServiceDescriptorTableAddrX64()
{
PUCHAR StartSearchAddress = (PUCHAR)__readmsr(0xC0000082);
PUCHAR EndSearchAddress = StartSearchAddress + 0x500;
PUCHAR i = NULL;
UCHAR b1 = 0, b2 = 0, b3 = 0;
ULONGLONG templong = 0;
ULONGLONG addr = 0;
for (i = StartSearchAddress; i < EndSearchAddress; i++)
{
if (MmIsAddressValid(i) && MmIsAddressValid(i + 1) && MmIsAddressValid(i + 2))
{
b1 = *(i);
b2 = *(i + 1);
b3 = *(i + 2);
if (b1 == 0x4c && b2 == 0x8d && b3 == 0x15)
{
memcpy(&templong, i + 3, 4);
addr = (ULONGLONG)templong + (ULONGLONG)i + 7;
break;
}
}
}
KeServiceDescriptorTable = (PSYSTEM_SERVICE_TABLE)addr;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。