name: anti-debug description: Anti-debugging detection and bypass — ptrace, debugger detection, timing checks, breakpoint detection. Trigger: anti debug, debugger detect, bypass debug, ptrace, anti-debugging, 反调试.
Anti-Debugging Bypass
Detection Patterns
Linux
- ptrace(PTRACE_TRACEME) — if fails, debugger attached
- /proc/self/status → TracerPid field
- LD_PRELOAD hook detection
- Timing checks: rdtsc before/after operations
Windows
- IsDebuggerPresent() / CheckRemoteDebuggerPresent()
- NtQueryInformationProcess(ProcessDebugPort)
- NtGlobalFlag in PEB
- CloseHandle with invalid handle → exception if debugged
- Timing: QueryPerformanceCounter / rdtsc
macOS
- ptrace(PT_DENY_ATTACH)
- sysctl kinfo_proc → p_flag & P_TRACED
- task_info(TASK_FLAGS_INFO)
Bypass Techniques
- LD_PRELOAD hook to intercept ptrace/IsDebuggerPresent
- Patch PEB directly (NtGlobalFlag = 0, BeingDebugged = 0)
- Frida hook: Interceptor.attach to return false
- SMC (Self-Modifying Code) to hide breakpoints
- Nanomites/timing: normalize rdtsc deltas
- TLS callback to run before debugger init
Execution
When triggered by "anti debug" or "debugger bypass":
- Identify target platform and anti-debug technique used
- Generate platform-specific bypass code
- Verify bypass works
- Write patched binary / hook script to disk
Skills similaires
Auditeur de Securite
Premium
Securite
Analyse le code pour detecter les vulnerabilites OWASP Top 10.
Claude Codeadvanced
210
87
1,007
Checklist de Sécurité OWASP
Securite
Génère des checklists de sécurité applicative basées sur l'OWASP Top 10.
claudeCursorWindsurfintermediate
148
41
552
Modélisation de Menaces
Securite
Génère des documents de modélisation de menaces avec analyse STRIDE.
claudeCursoradvanced
78
23
390