反调试专题笔记Windows下反调试123456789101112131415#include <iostream>#include <Windows.h>DWORD AntiDebugCallBack(LPVOID lpThreadParameter){ while(true) if(IsDebuggerPresent()){ MessageBox(NULL,"被调试了","Debug",MB_OK); //... };};int main(void){ HANDLE hThread=CreateThread(NULL,NULL,(LPTHREAD_START_ROUTINE)AntiDebugCallBack,NULL,NULL,NULL); WaitForSingleObject(hThread,-1); system("pause"); return 0;}; Linux下反调试1234#include <sys/ptrace.h>if(ptrace(PTRACE_TRACEME,0,0,0)==-1){ //被调试};