anti-debugging-techniques

Detect and bypass anti-debugging checks in Linux and Windows binaries during reverse engineering.

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/lNwNl/Praxis --skill anti-debugging-techniques-lnwnl
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: anti-debugging-techniques
Source: https://github.com/lNwNl/Praxis/tree/main/skills/_disabled/anti-debugging-techniques
Command: npx skills add https://github.com/lNwNl/Praxis --skill anti-debugging-techniques-lnwnl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Protected binaries often refuse to run under a debugger, exiting or crashing when they detect ptrace, PEB flags, timing anomalies, or exception handlers, which blocks reverse engineering and CTF analysis. This Skill provides a systematic playbook to identify each anti-debug check and apply the correct bypass. ## Core Features & Use Cases - Linux and Windows coverage: Documents ptrace self-attach, /proc/self/status TracerPid, PEB.BeingDebugged, NtQueryInformationProcess, TLS callbacks, ThreadHideFromDebugger, and timing checks with concrete bypass methods for each. - Tool-specific guidance: Provides ready-to-use bypass configurations for GDB, x64dbg with ScyllaHide, WinDbg, Frida, LD_PRELOAD shims, TitanHide, and Qiling emulation. - Decision tree and reference matrix: A symptom-based decision tree maps crash behavior to the likely check, and the companion ANTI_DEBUG_MATRIX.md cross-references technique, reliability, false positives, and tool compatibility. - Use Case: A CTF binary exits immediately under GDB. Follow the decision tree to identify a ptrace(PTRACE_TRACEME) check, then apply the LD_PRELOAD shim one-liner to continue debugging. ## Quick Start Ask the agent to analyze why the target binary exits when run under a debugger and apply the appropriate anti-debug bypass for it.

Frequently Asked Questions about anti-debugging-techniques

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I bypass ptrace anti-debugging on Linux?▼

Bypass ptrace(PTRACE_TRACEME) by compiling an LD_PRELOAD shim that overrides ptrace to return 0, or by NOP-patching the call in the binary. In GDB, use catch syscall ptrace and set $rax to 0 on return.

How to hide a debugger from IsDebuggerPresent and PEB checks on Windows?▼

Use ScyllaHide with x64dbg to auto-patch PEB.BeingDebugged, NtGlobalFlag, and heap flags, and hook NtQueryInformationProcess. Alternatively, manually zero the BeingDebugged byte at PEB+0x02.

Why does a binary crash only when running under a debugger?▼

The binary likely contains anti-debug checks such as ptrace self-attach, PEB flag reads, timing comparisons, or exception-based tricks like INT 2D. Use the decision tree to match the crash behavior to the specific check type.

ScyllaHide vs TitanHide for anti-anti-debugging, which should I use?▼

ScyllaHide is a user-mode plugin covering PEB patches, NtQuery hooks, and timing spoofing, sufficient for most targets. TitanHide is a kernel driver needed when the target performs kernel-level debugger detection.

Can Frida bypass timing-based anti-debug checks like rdtsc?▼

Yes, Frida can replace timing sources such as rdtsc, clock_gettime, and QueryPerformanceCounter with controlled return values using Interceptor.replace. This defeats cumulative timing checks that single patches cannot fix.

What are the limitations of automated anti-debug bypass tools?▼

Automated tools like ScyllaHide cover roughly 80% of common checks but miss custom or multi-layer protections such as fork+ptrace watchdogs and nanomite INT3 patching. Those require manual tracing, Frida scripting, or full emulation with Qiling.