v1.1.4 — Now Open Source (Apache-2.0)

NinjaDBG

A stealth-aware native debugger for Linux x86-64, with experimental Windows & macOS support. Anti-detect at the userland and kernel level. Decompilation via RetDec. Scripting via Lua & Python.

Download v1.1.4 View Source
9,400+
Lines of C++
14
Modules
16
Anti-Detect Techniques
5
Languages (pretty print)

Everything you need to debug stealthily

From low-level ptrace control to high-level decompilation — all in one tool.

Anti-Detect Stealth

8 userland + 8 kernel-level techniques to hide from anti-debug checks. Mask TracerPid, hide 0xCC bytes, spoof parent names, intercept PTRACE_TRACEME, and more.

16 techniques

Native C Decompilation

Decompile functions in live processes or static binaries via Avast RetDec (native dlopen) or angr. Decompile at current RIP with one command.

RetDec + angr

Lua + Python Scripting

Automate debugging with full ndbg API in both Lua and Python. JSON-RPC subprocess bridge — no library dependencies, full isolation.

JSON-RPC

Pretty Printers

Interpret raw memory as language-specific types: C strings, std::string (SSO-aware), Rust String, Go string, CPython str, and structs.

NEW v1.1.4

CLI-only (GUI removed in v1.1.4)

Full-featured CLI REPL (the only interface; GUI was removed in v1.1.4) 30+ commands, batch mode, interactive TUI memory editor.

CLI-only

Binary Patching

Patch ELF/PE/Mach-O binaries in-place: NOP, JMP always/never, CALL→NOP, force-return-true, ASCII replace. Undo any patch. Save without overwriting source.

7 patch kinds

Cross-Platform

Debug Linux ELF (native ptrace), Windows PE (via Wine + gdbstub), and macOS Mach-O (via QEMU). Auto-detects target platform from magic bytes.

Linux + Win + Mac

Advanced Debugging

Conditional + temporary breakpoints, hardware watchpoints (DR0-DR3), step-over, step-out, syscall stepping, backtrace with symbol resolution.

Full feature set

Open Source (Apache-2.0)

Full source code available. Free for personal, academic, and commercial use. Fork it, modify it, contribute back. No restrictions.

NEW v1.1.4

16 anti-detect techniques

Hide from every common anti-debug check — at both userland and kernel level.

# Technique Defeats Layer
1Hardware Breakpoints (DR0-DR3)INT3 byte scans of .textUserland
2process_vm_readv/writevptrace-event observationUserland
3Mask /proc/self/statusTracerPid: field readUserland
4Hide NinjaDBG mmapsAddress-space enumerationUserland
5Timing normalizationRDTSC / clock_gettime checksUserland
6Parent name masquerade/proc/ppid/comm inspectionUserland
7Hide from psreaddir(/proc) enumerationUserland
8INT3 scan bypassSelf-.text scanning for 0xCCUserland
9Hide PID from /procKernel proc_readdir() hookKernel (LKM)
10Mask /proc/self/wchanwchan returning ptrace_stopKernel (LKM)
11Mask /proc/self/syscallSyscall field showing stopped nrKernel (LKM)
12Mask /proc/<pid>/commcomm field reading ninjadbKernel (LKM)
13Suppress tracer SIGCHLDTiming via extra SIGCHLDKernel (LKM)
14Force PR_SET_DUMPABLE=1prctl(PR_GET_DUMPABLE) returning 0Kernel (LKM)
15Intercept PTRACE_TRACEMETarget's self-TRACEME succeedingKernel (LKM)
16Hide our mmap regionsTarget enumerating /proc/<pid>/mapsKernel (LKM)

Decompile to C source

Wrap RetDec natively or use angr — decompile live processes or static binaries.

ninjadb
(ninjadb) decomp set angr (ninjadb) decomp file /tmp/test_factorial 0x401139 Decompiling function at 0x0000000000401139 in /tmp/test_factorial ... Backend: angr Elapsed: 1896 ms Function: sub_0x401139 ---- function factorial at 0x401139 ---- int factorial(int a0) { return (a0 <= 1 ? 1 : a0 * factorial(a0 - 1)); }

Verified working — angr func.normalize() fix applied in v1.1.4

Pretty Printers per language

Interpret raw memory as language-native types — no more hex dumps.

C
char*, structs
C++
std::string (SSO)
Rust
String, &str
Go
string, slices
Python
PyUnicodeObject
pretty print examples
(ninjadb) pretty set cpp (ninjadb) pretty cpp_string 0x7ffe1000 (std::string) 0x7ffe1000 = "Hello, world!" (len=13, SSO, data=0x7ffe1010) (ninjadb) pretty rust_string 0x7ffe2000 (String) 0x7ffe2000 = "Hello, world!" (len=13, cap=13, ptr=0x55aabbccdd00) (ninjadb) pretty struct 0x7ffe3000 i32,str,ptr,u64 struct at 0x7ffe3000: +0x0 i32 = 42 (0x2a) +0x8 ptr = 0x401234 -> "hello world" +0x10 ptr = 0x7ffe5678 +0x18 u64 = 139832 (0x22238)

Why NinjaDBG?

What you get with NinjaDBG vs. traditional debuggers.

With NinjaDBG

16 anti-detect techniques (userland + kernel)
Native C decompilation (RetDec + angr)
Lua + Python scripting
Pretty printers for 5 languages
Binary patching (ELF/PE/Mach-O)
Cross-platform (Linux/Win/Mac)
Interactive TUI memory editor
Open Source (Apache-2.0)

Traditional debuggers (gdb, lldb)

No anti-detect — easily spotted by targets
No built-in decompilation
Scripting limited to Python (gdb) or Lua (lldb)
No language-aware pretty printers
No binary patching
Platform-locked (gdb=Linux, lldb=Mac)
No interactive memory editor
GPL license (gdb) — restrictive for commercial use

Get started in 30 seconds

Download the prebuilt binary or build from source.

quick start
# Option 1: Download prebuilt binary wget https://github.com/ChapzoMods/NinjaDBG/releases/latest/download/ninjadb chmod +x ninjadb ./ninjadb # Option 2: Build from source git clone https://github.com/ChapzoMods/NinjaDBG.git cd NinjaDBG make -j4 ./build/ninjadb # Headless CLI (recommended for production) ./ninjadb --no-eula-check -c "attach 12345; disas; decomp; quit"

Ready to debug stealthily?

Star the repo, download v1.1.4, and start debugging like a ninja.

Star on GitHub Download v1.1.4