Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //http://waleedassar.blogspot.com
- //https://twitter.com/waleedassar
- //Thanks to https://twitter.com/nickeverdox
- //------64-Bit---------------
- #define ProcessInstrumentationCallback 0x28
- extern "C"
- {
- void DbgBreakPoint();
- int __stdcall ZwSetInformationProcess(HANDLE,unsigned long long,unsigned long long*,unsigned long long);
- }
- void* BeingDebugged()
- {
- unsigned long long Cano= 0;
- ZwSetInformationProcess(GetCurrentProcess(),ProcessInstrumentationCallback,&Cano,0x8);
- MessageBox(0,L"Being Debugged\r\n",L"waliedassar",0);
- ExitProcess(0);
- }
- int main()
- {
- unsigned long long Cano= (unsigned long long)&BeingDebugged;
- int ret=ZwSetInformationProcess(GetCurrentProcess(),ProcessInstrumentationCallback,&Cano,0x8);
- if(ret==0xC0000061) printf("Expected\r\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement