启动方式一般有3种:
1,Explrer.exe(资源管理器启动)
2.cmd.exe(命令行启动)
3.Sercices.exe(系统服务)
还要防止用调试器打开软件
VOID ParentsTest()
{
MyNtQueryInformationProcess pZwQueryInformationProcess;
pZwQueryInformationProcess=(MyNtQueryInformationProcess)GetProcAddress(getModuleHan);
PROCESS_BASIC_INFORMATION stBasicInfo={NULL};
pZwQueryInformationProcess(GetCurrentProcess(),ProcessBasicInformation,&stBasicInfo);
DWORD dwPid=TWHFindProcess(TEXT("explorer.exe"));
if(dwPid!=stBasicInfo.InheritedFrowUniqueProcessId&&dwPid!=0)
{
MessageBoxA(0,"od启动",0,0);
}
代码的意思是先将ZwQueryInformationProcess函数提取出来,在调用,判断进程是否由explorer启动的;如果不是,就证明被调用;
方法很多,需要一双善于发现玄机的眼睛;