- UID
- 25566
注册时间2006-10-4
阅读权限8
最后登录1970-1-1
初入江湖

该用户从未签到
|
发表于 2007-5-17 15:07:19
|
显示全部楼层
看来没人愿意去逆,放个源代码吧
- #include <windows.h>
- #include <stdio.h>
- #include "peb.h"
- #pragma comment(linker, "/subsystem:windows /entry:main")
- //#pragma comment(linker,"/FIXED:NO")
- #pragma comment(linker, "/SECTION:.text,REW" ) //设PE节:.text,可读可执行
- #pragma comment(linker, "/MERGE:.data=.text") //合并到.text
- #pragma comment(linker, "/MERGE:.rdata=.text")//合并到.text
- void anti_attach();
- BYTE isdebugger=0x94;
- void anti_attach()
- {
- PPEB peb;
- InitPeb(peb);
- while(true)
- {
- if (peb->BeingDebugged != isdebugger)
- TerminateProcess(GetCurrentProcess(),NULL);
- Sleep(10);
- }
- }
- int main()
- {
- PPEB peb;
- InitPeb(peb);
- peb->BeingDebugged = isdebugger;
- CloseHandle(CreateThread(NULL,NULL,(LPTHREAD_START_ROUTINE)anti_attach,NULL,NULL,NULL));
- MessageBox(NULL,"CAN YOU ATTACH ME?","HMMM....",NULL);
- TerminateProcess(GetCurrentProcess(),NULL);
- return 0;
- }
复制代码 |
|