高稳定性的网站设计制作,比稿网站,域名注册官网免费,做网站搜索如何显示官网http://hi.baidu.com/_achillis/item/8b33ead8ccac28ea3cc2cb17 简单说#xff0c;即调用第11号功能#xff0c;枚举一下内核中已加载的模块。部分代码如下#xff1a;//功能号为11#xff0c;先获取所需的缓冲区大小ZwQuerySystemInformation(SystemModuleInformation,NUL… http://hi.baidu.com/_achillis/item/8b33ead8ccac28ea3cc2cb17 简单说即调用第11号功能枚举一下内核中已加载的模块。部分代码如下//功能号为11先获取所需的缓冲区大小ZwQuerySystemInformation(SystemModuleInformation,NULL,0,needlen);//申请内存ZwAllocateVirtualMemory(NtCurrentProcess(),(PVOID*)pBuf,0,needlen,MEM_COMMIT,PAGE_READWRITE);//再次调用ZwQuerySystemInformation(SystemModuleInformation,(PVOID)pBuf,truelen,needlen);......//最后释放内存ZwFreeVirtualMemory(NtCurrentProcess(),(PVOID*)pBuf,needlen,MEM_RELEASE);突出过程省略了错误判断和调用其它的功能时操作并没有什么区别。关键在返回的内容中缓冲区pBuf的前四个字节是已加载的模块总数记为ModuleCnt,接下来就是共有ModuleCnt个元素的模块信息数组了。该结构如下typedef struct _SYSTEM_MODULE_INFORMATION {ULONG Count;SYSTEM_MODULE_INFORMATION_ENTRY Module[1];} SYSTEM_MODULE_INFORMATION, *PSYSTEM_MODULE_INFORMATION;模块详细信息结构如下typedef struct _SYSTEM_MODULE_INFORMATION_ENTRY {HANDLE Section;PVOID MappedBase;PVOID Base;ULONG Size;ULONG Flags;USHORT LoadOrderIndex;USHORT InitOrderIndex;USHORT LoadCount;USHORT PathLength;CHAR ImageName[256];} SYSTEM_MODULE_INFORMATION_ENTRY, *PSYSTEM_MODULE_INFORMATION_ENTRY;一个for循环循环ModuleCnt次就OK了。基于此写了三个简单的函数。void ShowAllModules(char *pBuf){//函数功能输出所有模块信息//参数pBufZwQuerySystemInformation返回的缓冲区首址PSYSTEM_MODULE_INFORMATION_ENTRY pSysModuleInfo;DWORD Modcnt0;Modcnt*(DWORD*)pBuf;pSysModuleInfo(PSYSTEM_MODULE_INFORMATION_ENTRY)(pBufsizeof(DWORD));for (DWORD i0;iModcnt;i){ printf(%d\t0x%08X 0x%08X %s\n,pSysModuleInfo-LoadOrderIndex,pSysModuleInfo-Base,pSysModuleInfo-Size,pSysModuleInfo-ImageName); pSysModuleInfo;} }void GetOSKrnlInfo(char *pBuf,DWORD *KernelBase,char *szKrnlPath){//函数功能返回系统内核(ntoskrnl.exe或ntkrnlpa.exe)的基址和路径//参数pBufZwQuerySystemInformation返回的缓冲区首址//参数KernelBase接收返回的系统内核的基址//参数szKrnlPath接收返回的内核文件的路径PSYSTEM_MODULE_INFORMATION_ENTRY pSysModuleInfo;DWORD Modcnt0;*KernelBase0;Modcnt*(DWORD*)pBuf;pSysModuleInfo(PSYSTEM_MODULE_INFORMATION_ENTRY)(pBufsizeof(DWORD));//其实第一个模块就是了还是验证一下吧if (strstr((strlwr(pSysModuleInfo-ImageName),pSysModuleInfo-ImageName),nt)){ *KernelBase(DWORD)pSysModuleInfo-Base; GetSystemDirectory(szKrnlPath,MAX_PATH); lstrcat(szKrnlPath,strrchr(pSysModuleInfo-ImageName,\\));}} void DetectModule(char *pBuf,DWORD dwAddress,char *ModulePath){//函数功能找出给定地址所在的模块//参数pBuf缓冲区地址同上//参数dwAddress要查询的内核地址//参数ModulePath接收返回的模块路径PSYSTEM_MODULE_INFORMATION_ENTRY pSysModuleInfo;DWORD Modcnt0;Modcnt*(DWORD*)pBuf;pSysModuleInfo(PSYSTEM_MODULE_INFORMATION_ENTRY)(pBufsizeof(DWORD));for (DWORD i0;iModcnt;i){ if ((dwAddress(DWORD)pSysModuleInfo-Base)(dwAddress(DWORD)pSysModuleInfo-BasepSysModuleInfo-Size)) { lstrcpy(ModulePath,pSysModuleInfo-ImageName); } pSysModuleInfo;}} 该功能是通过遍历PsLoadedModuleList实现的所以要隐藏的话最简单的方法还是断链~~更高级的方法比如抹DriveObject抹PE信息等等以后再玩~ 转载于:https://www.cnblogs.com/himessage/archive/2013/01/22/2872032.html