【转】VC 隐藏模块、MFC 改变窗口类名

【转】VC 隐藏模块

  1. void HideDll()
  2. {
  3. HMODULE hMod = ::GetModuleHandle("MyHook.dll");
  4. PLIST_ENTRY Head,Cur;
  5. PPEB_LDR_DATA ldr;
  6. PLDR_MODULE ldm;
  7. __asm
  8. {
  9. mov eax , fs:[0x30]
  10. mov ecx , [eax + 0x0c] //Ldr
  11. mov ldr , ecx
  12. }
  13. Head = &(ldr->InLoadOrderModuleList);
  14. Cur = Head->Flink;
  15. do
  16. {
  17. ldm = CONTAINING_RECORD( Cur, LDR_MODULE, InLoadOrderModuleList);
  18. //printf("EntryPoint [0x%X]/n",ldm->BaseAddress);
  19. if( hMod == ldm->BaseAddress)
  20. {
  21. ldm->InLoadOrderModuleList.Blink->Flink =
  22. ldm->InLoadOrderModuleList.Flink;
  23. ldm->InLoadOrderModuleList.Flink->Blink =
  24. ldm->InLoadOrderModuleList.Blink;
  25. ldm->InInitializationOrderModuleList.Blink->Flink =
  26. ldm->InInitializationOrderModuleList.Flink;
  27. ldm->InInitializationOrderModuleList.Flink->Blink =
  28. ldm->InInitializationOrderModuleList.Blink;
  29. ldm->InMemoryOrderModuleList.Blink->Flink =
  30. ldm->InMemoryOrderModuleList.Flink;
  31. ldm->InMemoryOrderModuleList.Flink->Blink =
  32. ldm->InMemoryOrderModuleList.Blink;
  33. break;
  34. }
  35. Cur= Cur->Flink;
  36. }while(Head != Cur);
  37. }

void HideDll()
{
HMODULE hMod = ::GetModuleHandle("MyHook.dll");
PLIST_ENTRY Head,Cur;
PPEB_LDR_DATA ldr;
PLDR_MODULE ldm;
__asm
{
mov eax , fs:[0x30]
mov ecx , [eax + 0x0c] //Ldr
mov ldr , ecx
}
Head = &(ldr->InLoadOrderModuleList);
Cur = Head->Flink;
do
{
ldm = CONTAINING_RECORD( Cur, LDR_MODULE, InLoadOrderModuleList);
//printf("EntryPoint [0x%X]/n",ldm->BaseAddress);
if( hMod == ldm->BaseAddress)
{
ldm->InLoadOrderModuleList.Blink->Flink =
ldm->InLoadOrderModuleList.Flink;
ldm->InLoadOrderModuleList.Flink->Blink =
ldm->InLoadOrderModuleList.Blink;
ldm->InInitializationOrderModuleList.Blink->Flink =
ldm->InInitializationOrderModuleList.Flink;
ldm->InInitializationOrderModuleList.Flink->Blink =
ldm->InInitializationOrderModuleList.Blink;
ldm->InMemoryOrderModuleList.Blink->Flink =
ldm->InMemoryOrderModuleList.Flink;
ldm->InMemoryOrderModuleList.Flink->Blink =
ldm->InMemoryOrderModuleList.Blink;
break;
}
Cur= Cur->Flink;
}while(Head != Cur);
}

【转】MFC 改变窗口类名

1,改变窗口类名:比如:MyClassName是自己想设置的类名
方法:打开资源视图,右击外挂窗口,属性改掉ClassName属性,若它为灰色,右击.rc文件改mfc Mode属性为false,再改
2,改变后在CTestCpp中的InitInstance()注册该窗口类名
WNDCLASS wc;

// 获取窗口类信息。MFC默认的所有对话框的窗口类名为 #32770
::GetClassInfo(AfxGetInstanceHandle(), _T("#32770"), &wc);

// 改变窗口类名
wc.lpszClassName = _T("MyClassName");

// 注册新窗口类,使程序能使用它
AfxRegisterClass(&wc);

jpg 改 rar 【转】VC 隐藏模块、MFC 改变窗口类名

上一篇:Asp.Net MVC3.0项目部署到Win7 64过程总结


下一篇:tensorflow笔记之softmax_cross_enropy