I'm going to publish a library which guarded by anti-debug ,(ptrace_trackme for Linux and isDebuggerPresent for windows). The down side of this library is: users would be abled to debug their own programs while the program is linked to my guarded library.

What anti-debug techniques should be adopted ?Provided that the users are able to debug their programs and my library is not comprised.

By the way, my friend has a proprietary software which licensed through a software license, (anti-debug of course). If he wants to debug his program while using the software, He has to buy an extra dongle and replace the lib with the version which coupled with the dongle.


  • Anti debugging measures usually work on process level, I don't know if it is possible at all limiting it to a library. The only workaround I see would be to run your library in a separate process and provide as library just a sub the communicates with this external process using an IPC/RPC technique of your choice.
    – Robert
    May 31, 2023 at 20:31


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.