|
[分享]分享两份源码
先下载收藏备用,感谢分享 |
|
使用SetWindowsHookExA对特定进程注入DLL时,使用MessageBox出错
ALwalker 这个是获取进程PID的吧。 不要忽略返回值. 函数名字上就是 获取窗口线程进程ID 参数二 返回的是进程ID 函数返回值 是线程ID 编程不看MSDN的吗? DWORD GetWindowThreadProcessId( HWND hWnd, LPDWORD lpdwProcessId ); Parameters hWnd [in] Handle to the window. lpdwProcessId [out] Pointer to a 32-bit value that receives the process identifier. If this parameter is not NULL, GetWindowThreadProcessId copies the identifier of the process to the 32-bit value; otherwise, it does not. Return Values The return value is the identifier of the thread that created the window. |
|
[讨论]跟当初自己想做的事情感觉渐相渐远
PC就是 c/c++ 汇编 玩调试器 既然你学了java就去逆向安卓app吧. 破解安卓手机APP一样有成就感. |
|
使用SetWindowsHookExA对特定进程注入DLL时,使用MessageBox出错
你那个 获取线程ID纯属多此一举 //获取线程ID GetWindowThreadProcessId(hwnd, &dwPid); 这个函数的返回值就是返回的主线程的ID DWORD ThreadID = GetWindowThreadProcessId(hwnd, &dwPid); 获取的就是主线程ID |
|
[推荐] #有奖话题讨论# 元宵节祝大家圆圆满满!
其实回不回到过去都一样, 因为过去的事情已经体验一次了,回到过去也改变不了什么. 真回到过去还不是一样. 就好像现在,你现在就是从2050年突然到现在的,我告诉你已经轮回两次了,现在你是第三次看到本条信息,你现在能遇见未来吗? 知道如何改变吗? |
|
[求助]R0中调用ZwQueryVirtrualMemory失败,无法正常用,求正确写法
月生沧海 还是不可呀 蓝就对了 你的参数用错了啊. 错误一: nStatus = PsLookupProcessByProcessId(hProcessId, pEProcess); 修改 nStatus = PsLookupProcessByProcessId(hProcessId, &pEProcess); //加 &符号 错误二:
-------------------修改流程代码------------------ 第一步: ZwOpenProcess(hProcessId....); //获取 hProcess 第二步:
最后于 2021-2-27 11:45
被Mxixihaha编辑
,原因:
|
|
|
|
问题已解决,怎么删帖
https://bbs.pediy.com/forum-20.htm |
|
[求助]为什么不同调试器反汇编显示不一样?
ud_set_syntax(&ud_obj , UD_SYN_INTEL); |
|
[求助]一个加密文本,不知道什么加密方式,也不知道明文是什么,求解密
你这个问题有毛病知道吗? 你知道解密 解密 也得有过程啊. 比如我给你几个结果 6 21 55 137 你帮我把算式列出来... 看你能不能做到! 是简单的比喻,你知道软件有注册码这个东西吧????? 照您这说法,那不是我看到注册码就能写出注册机了? 那要调试器分析都是多余的了. |
|
已删除
NTSTATUS ZwQueryVirtualMemory( _In_ HANDLE ProcessHandle, _In_opt_ PVOID BaseAddress, _In_ MEMORY_INFORMATION_CLASS MemoryInformationClass, _Out_ PVOID MemoryInformation, _In_ SIZE_T MemoryInformationLength, _Out_opt_ PSIZE_T ReturnLength ); 参数一 是 hProcess 通过当前(PsGetCurrentProcess) 或者由 ZwOpenProcess 打开获得 您直接填一个 PID 是啥意思嘛.???? |
|
[求助]lea与mov汇编命令的用法
lea 是取地址,用于取数据指针 如 a = &b
最后于 2021-2-16 09:34
被Mxixihaha编辑
,原因:
|
|
[求助]西佳佳的代码如何改错啊
ye[0].c_str() |
|
|
|
[求助] 易语言编程 通配符的使用
易语言: 读环境变量 (“SystemRoot”) + “\System32\Taskmgr.exe” API DWORD WINAPI GetEnvironmentVariable( __in_opt LPCTSTR lpName, __out_opt LPTSTR lpBuffer, __in DWORD nSize); //获取系统目录 UINT WINAPI GetSystemDirectory( __out LPTSTR lpBuffer, __in UINT uSize); UINT WINAPI GetWindowsDirectory( __out LPTSTR lpBuffer, __in UINT uSize); ... 很多API都能获取到系统安装目录的盘. 包括 SHLWAPI也非常方便.
最后于 2021-2-8 12:03
被Mxixihaha编辑
,原因:
|
|
[求助]如何比较简单的获取C++接口的某个方法的地址?
sunbinjin [em_10] 你这是要疯啊。。。 我本意是求简单的,你搞这么大阵仗[em_2]。 你这代码我承认是能跑出想要的结果。 但是我就只是想求一种借编译器的自动结构取成员的位置而已,不是要这么算呀。 异常法也可以. 要通用的话这个构造异常肯定是可行的.
...... 方法总比困难多吧.因为虚函数不固定 可能考虑一些问题无法取得指针吧,需要变通的方法. 通过下面的汇编可以看到不让直接用 &d3d9Device->Present 的原因: 013B140B > 8B4424 04 MOV EAX,DWORD PTR SS:[ESP+0x4] ; & 只在这里.编译无法通过 *(*(&)+0x44) 013B140F 8B00 MOV EAX,DWORD PTR DS:[EAX] 013B1411 FF60 44 JMP DWORD PTR DS:[EAX+0x44] 因为那个接口是动态的 所以 & 符号做不到 MOV EAX,DWORD PTR DS:[EAX] 和 JMP DWORD PTR DS:[EAX+0x44] //即使&取到了这里 他也无法保证上面这行的地址
最后于 2021-2-8 00:25
被Mxixihaha编辑
,原因:
|
|
[求助]如何比较简单的获取C++接口的某个方法的地址?
还有另外一种异常获取方式 让其得到地址 = 0 + 偏移 的方式 配合反汇编引擎 auto p1 = &IDirect3DDevice9::Present; DWORD * pfc = (DWORD *)&p1; DWORD pthis = 0; typedef void (__stdcall *pfnBadCall)(DWORD *ZeroThis); pfnBadCall haha = (pfnBadCall)pfc[0]; __try { haha(&pthis); //随便构造 反正在 0+偏移要异常的! } __except (GetPresentfilter(GetExceptionCode(), GetExceptionInformation())) { printf("%d\n", g_RealPresentIdx);//在异常里面获取偏移 } int GetPresentfilter(unsigned int code, struct _EXCEPTION_POINTERS *ep) { puts("in filter."); if (code == EXCEPTION_ACCESS_VIOLATION) { printf("disasm(ep->ExceptionRecord->ExceptionAddress) %08X\n", ep->ExceptionRecord->ExceptionAddress); g_RealPresentIdx = disasm(ep->ExceptionRecord->ExceptionAddress); //分析当前异常指令得到 偏移! //如地址停在: JMP DWORD PTR DS:[EAX+0x44] EAX=0 所以会异常.反汇编引擎解析得到 0x44 return EXCEPTION_EXECUTE_HANDLER; } return EXCEPTION_CONTINUE_SEARCH; }
最后于 2021-2-7 23:59
被Mxixihaha编辑
,原因:
|