Warp-net/warpnet

Add Anti-Debugging Support for macOS and Windows

Geschlossen

#9 geöffnet am 20.05.2025

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Go (12 Forks)auto 404
enhancementhelp wantedmacossecuritywindows

Repository-Metriken

Stars
 (137 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 2h 4m) (68 gemergte PRs in 30 T)

Beschreibung

Currently, the anti-debugging logic is implemented only for Linux. It includes checks such as:

  • Disabling core dumps via prctl(PR_SET_DUMPABLE, 0),
  • Checking /proc/self/status for TracerPid,
  • Detecting presence of GDB or LLDB via /proc/self/cmdline.

However, this logic does not apply to other platforms like macOS and Windows, leaving those builds unprotected against runtime inspection, debugging, or tampering.

So the goal is to Implement cross-platform anti-debugging support for:

  1. macOS:
  • Detect ptrace() with PT_DENY_ATTACH,
  • Check for known debuggers (lldb, gdb) via process list (sysctl),
  • Block core dumps if applicable.
  1. Windows:
  • Use IsDebuggerPresent() and CheckRemoteDebuggerPresent() from WinAPI,
  • Use NtQueryInformationProcess for advanced checks,
  • Optionally: detect debugger windows or tools like x64dbg.

Please Note!

  • Some methods may require elevated permissions (macOS PT_DENY_ATTACH must be called early),
  • Anti-debugging is never bulletproof but raises the bar,
  • All features must be behind platform checks to maintain compatibility.

Looking for contributors with experience in low-level macOS or Windows system programming.

Contributor Guide