vc dll已注入,怎么修改目标进程的保护的内存
#include"stdafx.h"DWORDWINAPIMyThreadProc2(LPVOIDpParam);DWORDdwThreadId;OOLAPIENTRYD...
#include "stdafx.h"
DWORD WINAPI MyThreadProc2( LPVOID pParam );
DWORD dwThreadId;
OOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch ( ul_reason_for_call )
{
case DLL_PROCESS_ATTACH:
{
HANDLE myThread1 = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)MyThreadProc2, NULL, 0, &dwThreadId);
break;
}
}
return TRUE;
}
DWORD WINAPI MyThreadProc1( LPVOID pParam )
{
MessageBox( NULL, "DLL已进入线程2。", "信息", MB_ICONINFORMATION );
return 0;
} 展开
DWORD WINAPI MyThreadProc2( LPVOID pParam );
DWORD dwThreadId;
OOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch ( ul_reason_for_call )
{
case DLL_PROCESS_ATTACH:
{
HANDLE myThread1 = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)MyThreadProc2, NULL, 0, &dwThreadId);
break;
}
}
return TRUE;
}
DWORD WINAPI MyThreadProc1( LPVOID pParam )
{
MessageBox( NULL, "DLL已进入线程2。", "信息", MB_ICONINFORMATION );
return 0;
} 展开
若以下回答无法解决问题,邀请你更新回答
1个回答
展开全部
使用 WriteProcessMemory
追问
在MyThreadProc1这个函数里写的话,用WriteProcessMemory()的第一个参数为0的话,是不是也代表了操作的是宿主进程
追答
是的 ! 你最好看看msdn的解释
http://msdn.microsoft.com/en-us/library/windows/desktop/ms681674(v=vs.85).aspx
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询