|
[求助]获取win7下“动态加载”的kernel32
windbg多看下命令 我也是在这里被阻截了,有几个 内核没导出 但是内核dll导出的函数 现在我已经累瘫了 |
|
求助 关于 ssdt hook NtWriteVirtualMemory NtReadVirtualMemory NtOpenProcess
到这里下 http://bbs.pediy.com/showthread.php?p=899271#post899271 我发了代码在这里 |
|
求助 关于 ssdt hook NtWriteVirtualMemory NtReadVirtualMemory NtOpenProcess
经过不停的折腾 终于阻挡了疯狂的vce xxod and 兼容win7 ... ssdt inlinehook 过几天 继续折腾先暂停了。。太累了。。 |
|
|
|
|
|
|
|
|
|
|
|
什么函数可以得到NtWriteVirtualMemory函数地址?
查了下资料有点傻眼了。。 解析pdb文件得到未导出变量地址 对应驱动应该如何写 傻眼中 http://hi.baidu.com/sumcogito/blog/item/03e5685525114b58574e0052.html 程序要用到dbghelp.dll中的一些函数 http://msdn.microsoft.com/en-us/library/ms679291%28VS.85%29.aspx 要自己下载系统对应的符号文件 首先是一些初始化的东西: 设置符号选项,调用下面两个函数 DWORD Options = SymGetOptions(); Options = Options|SYMOPT_DEBUG; SymSetOptions(Options); 调用SymInitialize函数进行初始化(这是必须的) hProcess = GetCurrentProcess(); BOOL bRet = SymInitialize(hProcess,0,FALSE); if(!bRet) { printf("SymInitialize error ...\n"); } 可以用函数SymSetSearchPath(hProcess,SymbolPath);设置符号搜索路径 然后用SymLoadModule64加载模块,这里是ntoskrnl.exe char FileName[256] ; GetSystemDirectory(FileName,sizeof(FileName)); strcat(FileName,"\\ntoskrnl.exe"); BaseOfDll = SymLoadModule64(hProcess,NULL,FileName,NULL,0,0); BaseOfDll返回加载的基址 然后就可以调用SymEnumSymbols查询符号了 SymEnumSymbols(hProcess,BaseOfDll,0,EnumSymCallBack,0); 参数EnumSymCallBack是一个回调函数,在里面得到未导出函数的VA, BOOL CALLBACK EnumSymCallBack(PSYMBOL_INFO pSymInfo,ULONG SymbolSize,PVOID UserContext) /* 参数pSymInfo结构Name成员是符号名,Address是符号地址(The virtual address of the start of the symbol) */ { if(strcmp((pSymInfo->Name), "PspCreateProcessNotifyRoutine")==0) { printf("Oh,yeah! %s :%0x\n",pSymInfo->Name,pSymInfo->Address); } return TRUE; } 完整代码: [code] #include <stdio.h> #include <windows.h> #include "dbghelp.h" #pragma comment(lib,"dbghelp.lib") BOOL CALLBACK EnumSymCallBack(PSYMBOL_INFO pSymInfo,ULONG SymbolSize,PVOID UserContext); int main(int argc, char* argv[]) { HANDLE hProcess; DWORD64 BaseOfDll; PIMAGEHLP_SYMBOL pSymbol = NULL; DWORD Options = SymGetOptions(); Options = Options|SYMOPT_DEBUG; SymSetOptions(Options); hProcess = GetCurrentProcess(); BOOL bRet = SymInitialize(hProcess,0,FALSE); if(!bRet) { printf("SymInitialize error ...\n"); } char SymbolPath[256]; GetCurrentDirectory(sizeof(SymbolPath),SymbolPath); strcat(SymbolPath,"\\symbols"); SymSetSearchPath(hProcess,SymbolPath); char FileName[256] ; GetSystemDirectory(FileName,sizeof(FileName)); strcat(FileName,"\\ntoskrnl.exe"); BaseOfDll = SymLoadModule64(hProcess,NULL,FileName,NULL,0,0); if(BaseOfDll == 0) { DWORD nErr = GetLastError(); } SymEnumSymbols(hProcess,BaseOfDll,0,EnumSymCallBack,0); SymUnloadModule64(hProcess,BaseOfDll); SymCleanup(hProcess); for(;;); return 0; } BOOL CALLBACK EnumSymCallBack(PSYMBOL_INFO pSymInfo,ULONG SymbolSize,PVOID UserContext) { if(strcmp((pSymInfo->Name), "PspCreateProcessNotifyRoutine")==0) { printf("Oh,yeah! %s :%0x\n",pSymInfo->Name,pSymInfo->Address); } if(strcmp((pSymInfo->Name), "PspLoadImageNotifyRoutine")==0) { printf("Oh,yeah! %s :%0x\n",pSymInfo->Name,pSymInfo->Address); } if(strcmp((pSymInfo->Name), "PspCreateThreadNotifyRoutine")==0) { printf("Oh,yeah! %s :%0x\n",pSymInfo->Name,pSymInfo->Address); } if(strcmp((pSymInfo->Name), "CmpCallBackVector")==0) { printf("Oh,yeah! %s :%0x\n",pSymInfo->Name,pSymInfo->Address); } if(strcmp((pSymInfo->Name), "KeBugCheckCallBackListHead")==0) { printf("Oh,yeah! %s :%0x\n",pSymInfo->Name,pSymInfo->Address); } return TRUE; } |
|
|
|
|
|
|
|
求助 关于 ssdt hook NtWriteVirtualMemory NtReadVirtualMemory NtOpenProcess
代码 以后发 现在写的太粗糙了 很多安全检验都没 还有很多过滤都没。 发一个最新进展 两个函数ssdt hook 理论上兼容 2000以上所有系统 保护进程实现了 一部分 这个是win7虚拟机 下的截图 |
|
[求助]NtWriteVirtualMemory 在SSDT 中出现,但 ntoskrnl.exe 并没导出 应该怎么实现ssdthook
看来要分段实现你的想法了 驱动下 Attached到任意一个进程 得到PEB,遍历模块,找到ntdll 遍历ntdll的导出表, 找到函数ZwWriteVirtualMemory,读取函数开头,得到SSDT里面的下标(或者索引)指令 找资料了 |
|
[求助]NtWriteVirtualMemory 在SSDT 中出现,但 ntoskrnl.exe 并没导出 应该怎么实现ssdthook
主要还是要系统兼容。。。不兼容的办法有很多 不知道2l的办法是否兼容 2000以上系统 |
|
[求助]懂驱动的帮忙看下啊,谢谢了。3天3夜了 就错这里了
不知道代码怎么写。。 |
|
[求助]懂驱动的帮忙看下啊,谢谢了。3天3夜了 就错这里了
不是麻烦 主要是考虑系统兼容性 不考虑兼容的我写了一个 但是没用 因为win7下蓝屏 还有一个就是我去掉了硬件编码的部分之后 在win7下无法加载 如果不是考虑 系统兼容我也不需要 mdl这个办法了 也不会这么麻烦的去定位函数 你用win7测试下 会有收获的 |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值