|
[求助]关于C++写内存补丁
我这样改的,不知道怎么错了,麻烦大哥帮我看下应该怎么修改 DWORD _stdcall buding1(LPVOID lParam) { HMODULE k = NULL; BYTE a[5] = {0xE8,0xBC,0x5E,0x2B,0x7C}; DWORD oldProtect=0; VirtualProtectEx(hProcess, (LPVOID)0x00566C51, dwPatchLen, PAGE_EXECUTE_READWRITE, &dwOldProt) WriteProcessMemory(hProcess, (LPVOID)0x00566C51, a, dwPatchLen, NULL) VirtualProtectEx(hProcess, (LPVOID)0x00566C51, dwPatchLen, dwOldProt, &dwNewProt) return 0; |
|
[求助]关于C++写内存补丁
编译出来出错。。 我把文件代码贴出来,麻烦大哥帮我帮看看怎么不行呢。 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 头文件 #include <Windows.h> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 #pragma comment(linker, "/EXPORT:WahCloseApcHelper=_AheadLib_WahCloseApcHelper,@1") #pragma comment(linker, "/EXPORT:WahCloseHandleHelper=_AheadLib_WahCloseHandleHelper,@2") #pragma comment(linker, "/EXPORT:WahCloseNotificationHandleHelper=_AheadLib_WahCloseNotificationHandleHelper,@3") #pragma comment(linker, "/EXPORT:WahCloseSocketHandle=_AheadLib_WahCloseSocketHandle,@4") #pragma comment(linker, "/EXPORT:WahCloseThread=_AheadLib_WahCloseThread,@5") #pragma comment(linker, "/EXPORT:WahCompleteRequest=_AheadLib_WahCompleteRequest,@6") #pragma comment(linker, "/EXPORT:WahCreateHandleContextTable=_AheadLib_WahCreateHandleContextTable,@7") #pragma comment(linker, "/EXPORT:WahCreateNotificationHandle=_AheadLib_WahCreateNotificationHandle,@8") #pragma comment(linker, "/EXPORT:WahCreateSocketHandle=_AheadLib_WahCreateSocketHandle,@9") #pragma comment(linker, "/EXPORT:WahDestroyHandleContextTable=_AheadLib_WahDestroyHandleContextTable,@10") #pragma comment(linker, "/EXPORT:WahDisableNonIFSHandleSupport=_AheadLib_WahDisableNonIFSHandleSupport,@11") #pragma comment(linker, "/EXPORT:WahEnableNonIFSHandleSupport=_AheadLib_WahEnableNonIFSHandleSupport,@12") #pragma comment(linker, "/EXPORT:WahEnumerateHandleContexts=_AheadLib_WahEnumerateHandleContexts,@13") #pragma comment(linker, "/EXPORT:WahInsertHandleContext=_AheadLib_WahInsertHandleContext,@14") #pragma comment(linker, "/EXPORT:WahNotifyAllProcesses=_AheadLib_WahNotifyAllProcesses,@15") #pragma comment(linker, "/EXPORT:WahOpenApcHelper=_AheadLib_WahOpenApcHelper,@16") #pragma comment(linker, "/EXPORT:WahOpenCurrentThread=_AheadLib_WahOpenCurrentThread,@17") #pragma comment(linker, "/EXPORT:WahOpenHandleHelper=_AheadLib_WahOpenHandleHelper,@18") #pragma comment(linker, "/EXPORT:WahOpenNotificationHandleHelper=_AheadLib_WahOpenNotificationHandleHelper,@19") #pragma comment(linker, "/EXPORT:WahQueueUserApc=_AheadLib_WahQueueUserApc,@20") #pragma comment(linker, "/EXPORT:WahReferenceContextByHandle=_AheadLib_WahReferenceContextByHandle,@21") #pragma comment(linker, "/EXPORT:WahRemoveHandleContext=_AheadLib_WahRemoveHandleContext,@22") #pragma comment(linker, "/EXPORT:WahWaitForNotification=_AheadLib_WahWaitForNotification,@23") //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 宏定义 #define EXTERNC extern "C" #define NAKED __declspec(naked) #define EXPORT __declspec(dllexport) #define ALCPP EXPORT NAKED #define ALSTD EXTERNC EXPORT NAKED void __stdcall #define ALCFAST EXTERNC EXPORT NAKED void __fastcall #define ALCDECL EXTERNC NAKED void __cdecl //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // AheadLib 命名空间 namespace AheadLib { HMODULE m_hModule = NULL; // 原始模块句柄 DWORD m_dwReturn[23] = {0}; // 原始函数返回地址 // 加载原始模块 inline BOOL WINAPI Load() { TCHAR tzPath[MAX_PATH]; TCHAR tzTemp[MAX_PATH * 2]; GetSystemDirectory(tzPath, MAX_PATH); lstrcat(tzPath, TEXT("\\ws2help1")); m_hModule = LoadLibrary(tzPath); if (m_hModule == NULL) { wsprintf(tzTemp, TEXT("无法加载 %s,程序无法正常运行。"), tzPath); MessageBox(NULL, tzTemp, TEXT("AheadLib"), MB_ICONSTOP); } return (m_hModule != NULL); } // 释放原始模块 inline VOID WINAPI Free() { if (m_hModule) { FreeLibrary(m_hModule); } } // 获取原始函数地址 FARPROC WINAPI GetAddress(PCSTR pszProcName) { FARPROC fpAddress; CHAR szProcName[16]; TCHAR tzTemp[MAX_PATH]; fpAddress = GetProcAddress(m_hModule, pszProcName); if (fpAddress == NULL) { if (HIWORD(pszProcName) == 0) { wsprintf(szProcName, "%d", pszProcName); pszProcName = szProcName; } wsprintf(tzTemp, TEXT("无法找到函数 %hs,程序无法正常运行。"), pszProcName); MessageBox(NULL, tzTemp, TEXT("AheadLib"), MB_ICONSTOP); ExitProcess(-2); } return fpAddress; } } using namespace AheadLib; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// DWORD _stdcall buding1(LPVOID lParam) { HMODULE k = NULL; BYTE a[5] = {0xE8,0xBC,0x5E,0x2B,0x7C}; DWORD oldProtect=0; VirtualProtect((LPVOID)((DWORD)0x00566C51),5,PAGE_READWRITE,&oldProtect); memcpy((LPVOID)((DWORD)0x00566C51),a,5); VirtualProtect((LPVOID)((DWORD)0x00566C51),5,oldProtect,&oldProtect); return 0; } 出错部分 -------------------------------------------------------- --------------------Configuration: ws2help - Win32 Release-------------------- Compiling... 123.cpp F:\C++系统函数源码\x\ws2help\123.cpp(128) : error C2065: 'hProcess' : undeclared identifier F:\C++系统函数源码\x\ws2help\123.cpp(128) : error C2065: 'dwOldProt' : undeclared identifier F:\C++系统函数源码\x\ws2help\123.cpp(131) : error C2146: syntax error : missing ';' before identifier 'WriteProcessMemory' F:\C++系统函数源码\x\ws2help\123.cpp(131) : error C2065: 'dwPatchLen' : undeclared identifier F:\C++系统函数源码\x\ws2help\123.cpp(134) : error C2146: syntax error : missing ';' before identifier 'VirtualProtectEx' F:\C++系统函数源码\x\ws2help\123.cpp(134) : error C2065: 'dwNewProt' : undeclared identifier F:\C++系统函数源码\x\ws2help\123.cpp(136) : error C2143: syntax error : missing ';' before 'return' 执行 cl.exe 时出错. 123.obj - 1 error(s), 0 warning(s) |
|
[求助][求助]OD无法下断,也不能直接跑起来,只能附加,VMP的壳,有没有大侠告诉下
看了下,还是没弄明白 |
|
|
|
[求助][求助]OD无法下断,也不能直接跑起来,只能附加,VMP的壳,有没有大侠告诉下
VMP是哪个版本没能查出来,用了几个查壳都没查出来 |
|
[求助][求助]OD无法下断,也不能直接跑起来,只能附加,VMP的壳,有没有大侠告诉下
什么2.0?传上来都运行不了,传的话要很久,有没有什么解决办法吗,我OD都试高了,什么GetWindowText检测什么的都不行 |
|
[原创]二哥的超经典教程,手动脱壳十八篇载点
好帖,就是看不到在哪下的啊。。。!!!! |
|
|
|
怎样写取DLL内存基址+偏移!
简单的说就是和我发图的那个软件一样打内存补丁,因为那个文件是可以直接给VA或是RVA打补丁,但生成的是EXE,有没有办法弄个DLL,因为那个软件是直接取动态DLL的基址的 |
|
怎样写取DLL内存基址+偏移!
不错,但是还是不会,能不能写一个出来啊,大哥 |
|
怎样写取DLL内存基址+偏移!
有没有懂的啊,谁传个上来 |
|
|
|
怎样写取DLL内存基址+偏移!
主要是不知道怎么写,斑竹能不能传个上来 |
|
怎样写取DLL内存基址+偏移!
没见过,大哥能不能传个上来 |
|
怎样写取DLL内存基址+偏移!
请问在哪看? |
|
怎样写取DLL内存基址+偏移!
请问应该怎么写? |
|
怎样写取DLL内存基址+偏移!
DLL名字不会变,但是内存基址要变 |
|
怎样写取DLL内存基址+偏移!
没有高人知道吗? |
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值