How notrequiem/antidbg works
AntiDBG is a Windows x64 user-mode anti-debugging library. A host process invokes its single public protection entry point; that entry point runs detection routines, which inspect process state, exceptions, memory, handles, timing, and debugger artifacts. On a detected violation, the documented response is to terminate the protected process. The README describes the broad checks and protections; the sampled source confirms selected implementations and the syscall interface, but most detection-to-check wiring is not visible in the excerpts, so those links rely on the README rather than inferred calls.
Main entry points: adbg.c Protection entry · syscall.h Direct syscall interface · dbgobj.c Debug objects · memory Memory probes
Components 21
Protection entry
- Protection entry
antidebug/adbg.c
Detection checks
- Process state
antidebug/api - Exception probes
antidebug/asm - Kernel/debug queries
antidebug/api - Debug objects
antidebug/object/dbgobj.c - Handle and job checks
antidebug/flags - Memory probes
antidebug/memory - Page exception checks
antidebug/exceptions/pgexcbp.c - Timing checks
antidebug/flags - Debugger UI checks
antidebug/flags
Runtime hardening
- Code integrity monitor
antidebug/core/handler.c - Process protections
antidebug/core/guard.c - Thread monitoring
antidebug/core/monitor.c - Global exception handler
antidebug/core/handler.c
Internal primitives
- Direct syscall interface
antidebug/core/syscall.h - Syscall implementation
antidebug/core/syscall.c - Check randomization
antidebug/core/random.c
Violation response
- Fail-fast termination
antidebug/adbg.c
Other components
- Protected host
- Protected process
- Potential debugger
Connections 24
- Protected host → Protection entry: invokes
README.md - Protection entry → Process state: runs checks
README.md - Protection entry → Exception probes: runs checks
README.md - Protection entry → Kernel/debug queries: runs checks
README.md - Protection entry → Debug objects: runs checks
README.md - Protection entry → Handle and job checks: runs checks
README.md - Protection entry → Memory probes: runs checks
README.md - Protection entry → Page exception checks: runs checks
README.md - Protection entry → Timing checks: runs checks
README.md - Protection entry → Debugger UI checks: runs checks
README.md - Protection entry → Code integrity monitor: starts protection
README.md - Protection entry → Process protections: enforces policies
README.md - Protection entry → Thread monitoring: starts monitoring
README.md - Protection entry → Global exception handler: registers handler
README.md - Code integrity monitor → Potential debugger: compares code
antidebug/core/handler.c - Global exception handler → Exception probes: handles exceptions
- Protection entry → Check randomization: randomizes checks
README.md - Memory probes → Direct syscall interface: calls syscall interface
antidebug/memory/vrtalloc.c - Page exception checks → Direct syscall interface: queries memory
antidebug/exceptions/pgexcbp.c - Debug objects → Direct syscall interface: queries objects
antidebug/object/dbgobj.c - Direct syscall interface → Syscall implementation: dispatches syscalls
- Protection entry → Fail-fast termination: fails on violation
README.md - Fail-fast termination → Protected process: terminates
README.md - Potential debugger → Protected process: may intercept
README.md