Introduction

Static code analysis and decompilation snippets have transformed vulnerability research and malware analysis, but they share a fundamental flaw: they lack dynamic execution context. Static analysis cannot observe live heap allocations, inspect unbacked thread return addresses in real time, or verify how registers evolve across loop iterations.

To bridge this gap, we built WinDbgX-MCP, an open source Model Context Protocol (MCP) server that connects AI assistants (Google Antigravity, VS Code Cline, Claude Desktop, Cursor, Codex, and local LLMs) directly into live WinDbg and WinDbgX (DbgX.Shell.exe) debugging sessions across usermode binaries, kernel drivers, remote debug servers, and crash dumps.

[NOTE]

WinDbgX-MCP packages both Python server management and pre-compiled 64bit and 32bit native extension DLLs (de.dll) into a single, zero configuration pip wheel with automatic binary path discovery.


Architecture & Communication Protocols

WinDbgX-MCP acts as an intermediary bridge between Model Context Protocol host clients and native Windows debugging binaries (cdb.exe and kd.exe).

+-----------------------+        JSON-RPC (Stdio / SSE)        +------------------------+
|   AI Assistant Host   |  <=================================>  |    WinDbgMCP Server    |
| (Cline, Antigravity)  |                                      |    (Python / FastMCP)  |
+-----------------------+                                      +------------------------+
                                                                           ||
                                                                   IPC Pipe / Popen
                                                                           ||
                                                                           \/
+-----------------------+         TCP Remote Debug Protocol     +------------------------+
|  WinDbg GUI (WinDbgX) |  <=================================>  |   cdb.exe / kd.exe     |
| (Live Desktop Window) |      tcp:Port=5005,Server=localhost   |   + DebugExt (de.dll)  |
+-----------------------+                                       +------------------------+

Transport Modes

  1. Stdio Mode (IPC): Launched automatically by IDE clients (Antigravity, Cursor, Cline) as a background process using standard input/output. Zero network exposure or firewall prompt requirements.
  2. SSE HTTP Network Mode (--sse): Listens on a TCP port (e.g. 8000) streaming events and JSON-RPC endpoints for remote AI execution or multi machine lab environments.

Live GUI Visual Stepping & Intent Streaming

A primary innovation of WinDbgX-MCP is Live GUI Visual Stepping. When attached to an interactive desktop WinDbg GUI (WinDbgX) server via tcp:Port=5005, the AI agent’s execution flow and reasoning are rendered live inside the user’s desktop debugger window.

Visual AI Debugging Workflow
Step 1User opens target binary in WinDbg GUI and starts server: .server tcp:port=5005
Step 2AI agent attaches via MCP tool open_cdb_remote(“tcp:Port=5005,Server=localhost”)
Step 3AI Intent Banners (=== [AI INTENT]: <reasoning> ===) stream live into the debugger command window.
Step 4AI executes instruction steps (p, so, ret, !de.disasm) updating visual disassembly cursor and register panels in real time.
[Live Desktop WinDbg GUI Output Window]
0:001> .echo === [AI INTENT]: Stepping out to caller return address ===
=== [AI INTENT]: Stepping out to caller return address ===
0:001> ret
rax=00000061B50B3000 rbx=0000000000000000 rcx=0000000000000000 rdx=00007FFC0A31CAF0
rsi=0000000000000000 rdi=0000000000000000 rbp=0000000000000000 rsp=00000061B52FF718
rip=00007FFC0A2F10D0 efl=00000000
ntdll!DbgBreakPoint:
00007FFC0A2F10D0  cc                int      3
ntdll!DbgBreakPoint+0x1:
00007ffc`0a2f10d1 c3              ret

0:001> .echo === [AI INTENT]: Stepping over next instruction to update disassembly cursor in WinDbg GUI ===
=== [AI INTENT]: Stepping over next instruction to update disassembly cursor in WinDbg GUI ===
0:001> so
rip=00007FFC0A2F10D1 efl=00000000
ntdll!DbgUiRemoteBreakin+0x4e:
00007ffc`0a31cb3e eb00            jmp     ntdll!DbgUiRemoteBreakin+0x50 (00007ffc`0a31cb40)

0:001> !de.disasm L10
============================================================
 DISASSEMBLY: ntdll!DbgUiRemoteBreakin+0x4e (0x7FFC0A31CB3E)
============================================================
00007FFC0A31CB3E  eb00              jmp      ntdll!DbgUiRemoteBreakin+0x50 (00007ffc`0a31cb40)
00007FFC0A31CB40  33c9              xor      ecx,ecx
00007FFC0A31CB42  e8e920f8ff        call     ntdll!RtlExitUserThread (00007ffc`0a29ec30)
============================================================

DebugExt (de.dll) Analysis Engine

WinDbgX-MCP integrates native C++ extensions ported from DebugExt (de.dll), adding high level reverse engineering commands directly to standard cdb and kd instances:

CommandCategoryDescription
!de.disasmDisassemblyDML colorized disassembly with live register symbol dereferencing.
!de.strrefMemory ScanScans module sections for ASCII and UTF-16 string references.
!de.xrefsCross-RefLocates code cross-references (CALL, JMP, RIP-relative) to target addresses.
!de.pebSecurityAudits PEB structure, BeingDebugged, and NtGlobalFlag heap mitigations.
!de.memmapProtectionAudits virtual memory protection maps highlighting RWX regions.
!de.hooksIntegrityScans inline detour hooks, IAT patches, and unmapped executable memory pages.
!de.regsStateFormatted 64-bit register state grid with decimal conversions.
[DEBUGEXT - DISASSEMBLY & REGISTER DEREFERENCING]
00007FF641631370  486bc01f          imul     rax,rax,1Fh
00007FF641631374  490fbe09          movsx    rcx,byte ptr [r9] ds:00000000`00000000=??
00007FF641631378  4803c1            add      rax,rcx
00007FF64163137B  49ffc1            inc      r9
00007FF64163137E  4d3bc8            cmp      r9,r8
00007FF641631381  75ed              jne      GigaApp+0x1370 (00007ff6`41631370) [br=0]
00007FF641631383  488bc8            mov      rcx,rax
00007FF641631386  4885c0            test     rax,rax
00007FF641631389  7903              jns      GigaApp+0x138e (00007ff6`4163138e) [br=1]
00007FF64163138B  48f7d9            neg      rcx
00007FF64163138E  48394c2440        cmp      qword ptr [rsp+40h],rcx

Live Case Study: Reversing GigaApp.exe

To evaluate WinDbgX-MCP’s dynamic reasoning performance, we benchmarked an automated key validation reverse engineering task on GigaApp.exe.

📎
GigaApp.exe
PE32+ Executable (x64) 36.5 KB
SHA256: 32187014223d1e90e2c7bd137f51227b229cf3e1e5b5bb72660dac123456789a

Execution & Analysis Constraints

The AI agent was strictly restricted from reading source files or repository code on disk, forcing 100% pure assembly instruction tracing over the WinDbg MCP remote server interface.

Automated Reverse Engineering Sequence
0.0sAgent connects via open_cdb_remote(“tcp:Port=5005,Server=localhost”).
1.2sExecutes lm m GigaApp to locate base address (0x7FF641630000).
3.5sDisassembles keygen routine at 0x7FF641631370 using !de.disasm.
6.0sExtracts multiplicative string hash: key = (key * 31) + char_code.
9.8sComputes valid key for name nemotron (3119252081142) and generates executive report.
[FINDING]

Benchmark Result: The AI agent completed full assembly disassembly, algorithm extraction, key calculation for “nemotron” (3119252081142), scratchpad logging, and final report generation in under 10 seconds.

📊 [AI Reverse Engineering Scratchpad]Click to view full step by step assembly scratchpad log...
📊[AI Reverse Engineering Scratchpad]

Scratchpad: GigaApp.exe Binary Reverse Engineering

Target Information

  • Binary: GigaApp.exe
  • Architecture: x64 PE32+ (Console Application)
  • Target Name: nemotron

Disassembly Analysis (.text Section)

Disassembly of the key validation function (centered around 0x140001370):

0x140001370:	imul	rax, rax, 0x1f     ; key = key * 31
0x140001374:	movsx	rcx, byte ptr [r9] ; fetch character byte
0x140001378:	add	rax, rcx           ; key += char
0x14000137b:	inc	r9                 ; next pointer
0x14000137e:	cmp	r9, r8             ; check end of string
0x140001381:	jne	0x140001370        ; loop
0x140001383:	mov	rcx, rax
0x140001386:	test	rax, rax
0x140001389:	jns	0x14000138e        ; if positive
0x14000138b:	neg	rcx                ; ensure positive (key = -key)
0x14000138e:	cmp	qword ptr [rsp + 0x40], rcx ; compare against user input key

Calculation Trace for “nemotron”

Applying the algorithm derived from the binary:

  • n (110) -> 110
  • e (101) -> 3511
  • m (109) -> 108950
  • o (111) -> 3377561
  • t (116) -> 104704507
  • r (114) -> 3245839831
  • o (111) -> 100621034872
  • n (110) -> 3119252081142

Result

Key for nemotron: 3119252081142

📊 [GigaApp Executive Final Report]Click to view full AI-generated executive report (GigaApp_Final_Report.md)...
📊[GigaApp Executive Final Report]

1. Executive Overview

  • Target Name: GigaApp.exe
  • Objective: Reverse-engineer GigaApp.exe via binary disassembly analysis to determine the valid numeric key for the name nemotron.
  • Result: Successfully disassembled the binary, extracted the hashing routine, and computed the correct key: 3119252081142.

2. Target Specifications

  • File Type: Win32 Console Executable (PE32+)
  • Architecture: x64

3. Technical Reverse Engineering Analysis

Using Capstone disassembly of the .text section of GigaApp.exe:

  • Located key generation loop at 0x140001370.
  • Loop logic:
    1. Multiply accumulator rax by 0x1f (31 decimal): imul rax, rax, 0x1f.
    2. Load character byte from name buffer: movsx rcx, byte ptr [r9].
    3. Add character to accumulator: add rax, rcx.
    4. Repeat for length of string.
    5. Ensure result is positive: jns / neg rcx.
    6. Compare calculated hash with user-supplied key: cmp qword ptr [rsp + 0x40], rcx.

4. Key Calculation for “nemotron”

  • Key: 3119252081142

5. Automated Solver / Artifacts

  • Binary analysis and solver script located at: analysis/GigaApp/scripts/keygen_nemotron.py

Configuring VS Code (Cline) & AI Clients

WinDbgX-MCP integrates into VS Code via the Cline extension or any standard MCP client.

cline_mcp_settings.json Configuration

{
  "mcpServers": {
    "windbg-mcp": {
      "command": "windbg-mcp",
      "env": {
        "_NT_SYMBOL_PATH": "srv*C:\\Symbols*https://msdl.microsoft.com/download/symbols"
      }
    }
  }
}
[NOTE]

Because WinDbgX-MCP installs its executable binary globally during pip install, no hardcoded file paths are required in client settings.


Conclusion & Repository Access

WinDbgX-MCP demonstrates that combining live Windows debugger automation with LLM reasoning enables autonomous dynamic analysis, crash dump triage, and memory inspection without sacrificing accuracy or UI visibility.