- Joined
- 11 yrs. 6 mth. 26 days
- Messages
- 5,381
- Reaction score
- 18,380
- Age
- 45
- Wallet
- 11,590$
- [email protected]
I am going to share a simple method for detecting whether your program (it may be viral code as well) is being debugged. Anti-debugging is an essential trick for survival of your malicious code.
Windows API provides a simple function isDebuggerPresent() but it can be bypassed too easily, and therefore should NOT be used. I will show you how to use Process Control Box to test debugging.
Process Control Box or PCB is a kernel level stuff, and therefore is accessible by Native API (not Win32 API). The following code shows how to do it. Code is self explanatory.
To use it in your code, simply call alert() function. You may want to modify it to return a value (true/false) instead of printing string.
Windows API provides a simple function isDebuggerPresent() but it can be bypassed too easily, and therefore should NOT be used. I will show you how to use Process Control Box to test debugging.
Process Control Box or PCB is a kernel level stuff, and therefore is accessible by Native API (not Win32 API). The following code shows how to do it. Code is self explanatory.
To use it in your code, simply call alert() function. You may want to modify it to return a value (true/false) instead of printing string.