|
十五派(15PB)软件安全教育 ( 信安教育选品牌·十五派值得信赖 )
我想学,但觉得学费太高 |
|
[求助]一个加密系统,谁能分析出它的加密算法?
通常都需要跟踪吗? |
|
高手请进,非常郁闷的问题
呵呵,是在做挂吧? |
|
《Windows 核心编程》中的 LastMsgBoxInfo 示例程序是错误的!
最初由 ax5491 发布 两种选择: 一、在这里下载最新的平台SDK。 http://www.microsoft.com/downloads/details.aspx?FamilyID=a55b6b43-e24f-4ea3-a93e-40c0ec4f68e5&DisplayLang=en The Microsoft® Windows® Software Development Kit (SDK) provides the documentation, samples, header files, libraries, and tools you need to develop applications that run on Windows. 二、安装 Visual Studio 2005 Team Suit。它包含所有最新的东东。 我在猪猪乐园用BT上传了这个软件,需要的话可以去下载。 |
|
《Windows 核心编程》中的 LastMsgBoxInfo 示例程序是错误的!
最初由 ax5491 发布 你没有安装最新的 Platform SDK,才会出现有些函数没有声明的问题。请到MS的官网去下载最新版的SDK。 |
|
《Windows 核心编程》中的 LastMsgBoxInfo 示例程序是错误的!
最初由 孙行者 发布 我正在学习OD。 我的代码中对钩子过程所在的模块作了特殊处理,所以不会修改它的IAT。 |
|
《Windows 核心编程》中的 LastMsgBoxInfo 示例程序是错误的!
最初由 thebutterfly 发布 偶不会用OD! |
|
《Windows 核心编程》中的 LastMsgBoxInfo 示例程序是错误的!
一点小发现: 一、进行一点修改后,在 Windows 2000 下可以正常运行。 Jeffrey 也许是为了统一,把挂接函数取了与系统 API 相同的名字: // Used to trap when DLLs are newly loaded static HMODULE WINAPI LoadLibraryA(PCSTR pszModulePath) ; static HMODULE WINAPI LoadLibraryW(PCWSTR pszModulePath) ; static HMODULE WINAPI LoadLibraryExA(PCSTR pszModulePath, HANDLE hFile, DWORD dwFlags) ; static HMODULE WINAPI LoadLibraryExW(PCWSTR pszModulePath, HANDLE hFile, DWORD dwFlags) ; // Returns address of replacement function if hooked function is requested static FARPROC WINAPI GetProcAddress(HMODULE hmod, PCSTR pszProcName) ; 我进行了一些修改,在挂接函数的名字前面加了一个 Hook 前缀: // Used to trap when DLLs are newly loaded static HMODULE WINAPI Hook_LoadLibraryA(PCSTR pszModulePath) ; static HMODULE WINAPI Hook_LoadLibraryW(PCWSTR pszModulePath) ; static HMODULE WINAPI Hook_LoadLibraryExA(PCSTR pszModulePath, HANDLE hFile, DWORD dwFlags) ; static HMODULE WINAPI Hook_LoadLibraryExW(PCWSTR pszModulePath, HANDLE hFile, DWORD dwFlags) ; // Returns address of replacement function if hooked function is requested static FARPROC WINAPI Hook_GetProcAddress(HMODULE hmod, PCSTR pszProcName) ; 这样,在 Windows 2000 下就能完全正常的运行了。钩子函数所在DLL模块的IAT没有被修改。在挂接函数内对系统 API 的调用正确地跳转到了 kernel32.dll 中。 但是,这种方法在 Windows XP 下却行不通。即使为挂接函数加上 Hook 前缀问题依旧。 二、如果只为指定线程的消息队列安装消息钩子,那程序不管是在 Windows 2000 还是 XP 下,程序都能正常运行: LastMsgBoxInfo_HookAllApps(TRUE, dwThreadId) ; 如果为 dwThreadId 传递一个确定的值,也即只为指定线程的消息队列安装钩子,那程序就会正常运行。 // 假设 NOTEPAD.EXE 的主线程ID为 4319: LastMsgBoxInfo_HookAllApps(TRUE, 4319) ; 这个函数将为 NOTEPAD 进程的主线程安装一个消息钩子,当这个主线程所创建的窗口收到一个 Windows 消息时,系统会在调用 NOTEPAD 主窗口的窗口过程前会先调用我安装的钩子过程,这会导致系统把钩子过程所在的DLL加载到 NOTEPAD 的进程地址空间中。 DLL 一加载,在 DLL 模块中的C++全局对象将被构造,这将把除钩子过程所在的DLL模块之外的所有模块的IAT修改,以实现 HOOK API。运行过程与我们预想的完全一样,结果正确。 但是,在 Windows XP 下,如果想挂接系统中所有正在运行线程的消息队列: LastMsgBoxInfo_HookAllApps(TRUE, 0) ; 这会造成钩子过程所在DLL模块的IAT也被修改,在挂接函数内又会调用挂接,导致堆栈溢出错误进而终止进程。 |
|
《Windows 核心编程》中的 LastMsgBoxInfo 示例程序是错误的!
最初由 酷酷 发布 1、我没有任何的恶意。如果给你的心情造成了负面影响,我在此向你说一起对不起。 2、这个问题我刚调试了一下,ModuleFromAddress()每次调用都成功了,都返回了钩子模块的加载地址。 3、#ifdef ~ #endif 之间的代码完全可以注释掉。以这样的方式来调用: LastMsgBoxInfo_HookAllApps(TRUE,0); 也是对的。如果第二个参数(dwThreadID)为0,那就表示要挂接系统中的所有线程。如果为这个参数指定一个值,那就只挂接指定的线程。 问题不是出在这里,谢谢你的热心回复! |
|
《Windows 核心编程》中的 LastMsgBoxInfo 示例程序是错误的!
最初由 酷酷 发布 好像是错了! 包含 Hook_GerProcAddress 的模块作并没有处理: void CAPIHook::ReplaceIATEntryInAllMods(PCSTR pszCalleeModName, PROC pfnCurrent, PROC pfnNew, BOOL fExcludeAPIHookMod) { HMODULE hmodThisMod = fExcludeAPIHookMod ? ModuleFromAddress(ReplaceIATEntryInAllMods) : NULL; // Get the list of modules in this process CToolhelp th(TH32CS_SNAPMODULE, GetCurrentProcessId()); MODULEENTRY32 me = { sizeof(me) }; for (BOOL fOk = th.ModuleFirst(&me); fOk; fOk = th.ModuleNext(&me)) { // NOTE: We don't hook functions in our own module if (me.hModule != hmodThisMod) { // Hook this function in this module ReplaceIATEntryInOneMod( pszCalleeModName, pfnCurrent, pfnNew, me.hModule); } } } 给最后一个参数传递TRUE,就不会修改 LastMsgBoxInfoLib 模块的 IAT。 |
|
《Windows 核心编程》中的 LastMsgBoxInfo 示例程序是错误的!
最初由 酷酷 发布 你连我的帖子都没看完就回复了吧?我在帖子中说得很清楚了,代码确实没有修改 LastMsgBoxInfoLib 模块的输入节。但从运行事实看,它的输入节又好像被修改了。我想知道造成这个结果的原因。 感谢你的热心回复! |
|
今年南大硕士研究生入学考试计算机专业课第一题
>>简答:在C++中,什么情况下f(a)+g(a)的值不等于g(a)+f(a)的值. int f(int &a) { a += 1 ; return a ; } int g(int a) { return a ; } int a = 0 ; 此时( f(a) == g(a) ) ; int a = 0 ; 而 ( g(a) != f(a) ) ; |
|
A程序把B.dll插入到C程序中 应该从何入手?
使用钩子,就能把钩子过程所在的模块插入到目标进程中。 |
|
[求助]如何把自己加入WindowsXP自带防火墙的例外程序列表里?
最初由 hayate 发布 谁说的? 不管连入还是连出都要通过防火墙,你可以看MSDN: Platform SDK: Windows Management Instrumentation Connecting Through Windows Firewall |
|
[讨论]多线程编程中的ExitThread函数?
1、让一个线程终止运行最好的方法是让线程函数返回; 2、如果你的设计不能满足第一条,而你的程序使用C/C++编写,那你绝不应该调用ExitThread。应用使用Visual C++运行期库函数 _endthreadex。如果你不是使用 Visual C++ 编译器,你的编译器提供商有它自己的 ExitThread 的替代函数。不管这个函数是什么,都必须使用。 要获得一个线程的退出代码的操作必须在另一个线程中进行,使用的API是: BOOL GetExitCodeThread(HANDLE hThread, PDWORD pdwExitCode) ; |
|
新体验: ATL 方法建造 window 程序
不过现在的WINDOWS应用程序大部分还是用MFC开发,系统软件还是用SDK。 但从Visual Studio 2005的类库源代码来看,ATL可能是MS推荐。以前MFC中的类如 CString 现在是用ATL模板类来实现的: The topics in this section describe programming using CString, which is the default implementation of the template class CStringT. =================================================================== This class represents a CStringT object. template< typename BaseType, class StringTraits > class CStringT : public CSimpleStringT< BaseType, _CSTRING_IMPL_::_MFCDLLTraitsCheck< BaseType, StringTraits > ::c_bIsMFCDLLTraits 以上内容摘自MSDN For VS2005。 现在MS力推 .Net,我想MFC可能会淡出历史舞台,你们认为呢? |
|
|
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值