这段代码可以直接使用,举例如下:
在Ring0下HOOK Ntdll.dll的Nt*函数的方法DWORD functionAddress;
在Ring0下HOOK Ntdll.dll的Nt*函数的方法Unicode_String dllName;
在Ring0下HOOK Ntdll.dll的Nt*函数的方法RtlInitUnicodeString(
&dllName, L"\\Device\\HarddiskVolume1\\Windows\\System32\\ntdll.dll");
在Ring0下HOOK Ntdll.dll的Nt*函数的方法functionAddress 
= GetDllFunctionAddress("ZwCreateProcessEx"&dllName);
在Ring0下HOOK Ntdll.dll的Nt*函数的方法position 
= *((WORD*)(functionAddress+1));
在Ring0下HOOK Ntdll.dll的Nt*函数的方法DbgPrint(
"ZwCreateProcessEx's Id:%d\n", position);
在Ring0下HOOK Ntdll.dll的Nt*函数的方法
上面的代码从驱动层加载NTDLL,再从输出表中找出函数地址,从而进行挂钩。
比如可以通过hook ZwCreateProcessEx来监控进程的创建,hook ZwQuerySystemInformation来实现进程的隐藏等等。

相关文章:

  • 2021-12-26
  • 2022-02-17
  • 2021-06-06
  • 2022-12-23
  • 2021-09-14
  • 2022-12-23
  • 2021-09-19
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-20
  • 2021-09-25
  • 2022-12-23
相关资源
相似解决方案