waliedassar

RaiseException(0x4000001f) Anti-Olly Trick

Jan 30th, 2013
407
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //http://waleedassar.blogspot.com
  2. //http://www.twitter.com/waleedassar
  3.  
  4. //Works against OllyDbg v1.10
  5.  
  6. #include "stdafx.h"
  7. #include "windows.h"
  8. #include "stdio.h"
  9.  
  10. int _cdecl Handler(EXCEPTION_RECORD* pRec,void* Est_Frame,unsigned char* pContext,void* Disp)
  11. {
  12.     printf("Exception %x Caught\r\n",pRec->ExceptionCode);
  13.     ExitProcess(0);
  14.     return ExceptionContinueSearch;
  15. }
  16.  
  17. int main()
  18. {
  19.     __asm
  20.     {
  21.         push offset Handler
  22.         push dword ptr fs:[0x0]
  23.         mov dword ptr fs:[0x0],esp
  24.     }
  25.     RaiseException(0x4000001f,0,0,0);
  26.     printf("Debugger detected!\r\n");
  27.     return 0;
  28. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×