SSH-based remote debugging tool for CTF challenges with GDB integration, heap analysis, and CTF program interaction
Server has 32 tools with mostly complete schemas and descriptions, but significant quality gaps limit production readiness. Naming is generally clear (verb_noun pattern), but descriptions vary widely in quality, some are excellent (ctf_send, gdb_command), others are vague or in Chinese without English translation. Many parameters lack proper constraints (enums, ranges). Error handling is minimal; most tools return generic error strings without recovery guidance. No tool annotations (readOnlyHint, destructiveHint) despite clear risk levels. Output schemas are undocumented, LLMs cannot predict response structure. Critical issue: descriptions in Chinese (gdb_start, gdb_run, etc.) are inaccessible to English-speaking LLMs and violate the pattern:tool-description requirement for clarity.
关闭与 CTF 程序的连接。
通过 SSH 端口转发连接远程 CTF 服务。 连接到远程 Linux 上运行的 CTF 程序的网络端口。 通常 CTF 程序通过 socat 或自身绑定到某个端口。
执行一个菜单式交互操作(选择菜单项并填写所有 prompt)。 这是一个组合工具,自动完成:发送菜单选择 → 等待每个 prompt → 填写对应值。 适用于典型的 CTF 堆题菜单交互。
接收 CTF 程序的响应数据。
接收数据直到匹配指定模式。
向 CTF 程序发送数据。
向 CTF 程序发送一行数据(自动追加换行符)。
12 GDB tools have descriptions entirely in Chinese, making them inaccessible to English-speaking LLMs and violating pattern:tool-description clarity requirement. Examples: gdb_start ('启动 GDB 调试会话...'), gdb_run ('在 GDB 中运行...'), gdb_continue, gdb_interrupt, gdb_pause, gdb_restart, gdb_stop, and others.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint) despite clear risk levels. Tools like ssh_exec, gdb_run, ctf_send are marked WRITE but lack destructiveHint annotation. Read-only tools like gdb_memory, ctf_recv lack readOnlyHint. This prevents LLMs from reasoning about safety and retry logic.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 66 | <=2025-11-25 | v2 |
查看 glibc malloc chunk header 和附近内存。 对 i386 常用: chunk_addr 指向 chunk header,user 指针通常是 chunk_addr+0x8。工具会打印 prev_size/size 字段、chunk 附近内存, 并可尝试调用 pwndbg 的 malloc_chunk/vis/heap 命令。
发送任意 GDB/pwndbg 命令并返回输出。 可以执行任何 GDB 命令,如 'info functions', 'break main', 'heap', 'bins' 等。 命令执行后等待 GDB prompt 返回完整输出。
继续执行被暂停的程序。等同于 GDB 的 'continue' 命令。
让 GDB 后台继续执行目标程序,立即返回 prompt。 用于请求粒度 heaplog:先设置请求完成断点,然后调用本工具让程序 继续运行;随后发送网络请求,等断点命中后再 heap_end_action。 内部执行: set target-async on continue&
中断正在运行的程序(发送 Ctrl-C)。用于暂停程序以执行 GDB 命令。
查看指定内存区域,适合模型检查 source/next chunk/victim 附近内容。 会执行 GDB 的 x 命令输出字节和按 word_size 分组的数值。地址支持 表达式/十六进制,如 "0x57eebce8"、"$esp"、"0x57eebce8+0x40"。
临时暂停正在运行的调试目标,等价于 gdb_interrupt。 用于堆布局过程中在关键包发送后暂停程序,然后调用 gdb_memory / gdb_chunk / gdb_command("x/..") 查看指定内存区域。 注意:本项目大量使用 ``continue&`` 让 inferior 后台运行,此时 GDB 已经返回 prompt。对 prompt 发送 Ctrl-C 只会中断 GDB 自身输入,未必 会暂停后台 inferior;因此这里优先执行 GDB 的 ``interrupt`` 命令, 只有在 foreground continue 无 prompt 的场景下才回退到 PTY Ctrl-C。
重启目标程序(kill 当前进程后重新 run)。
在 GDB 中运行目标程序。等同于 GDB 的 'run' 命令。
启动 GDB 调试会话,加载目标二进制程序和可选的 GDB Python 插件。
退出 GDB 会话,关闭调试连接。
标记一个堆操作阶段的开始。 在发送 payload 到 CTF 程序之前调用此工具。 配合 heap_end_action 使用,记录这一步操作引起的所有堆变化。
结束当前请求/堆操作阶段,返回该请求创建的 chunk 记录。 在单个网络请求或单个 connect/close 操作处理完毕、GDB 暂停后调用。 默认输出按请求粒度映射的 heaplog 风格记录,例如: [calloc] nmemb=0x1 size=0x46 total=0x46 user=... chunk_addr=... chunk_sz=... caller=... [malloc] size=0xec user=... chunk_addr=... chunk_sz=... caller=... 同时附带 Raw Delta JSON,供后续自动分析。
获取当前堆状态概览(不生成文件,直接从 GDB 获取)。 快速查看当前活跃 chunk 数量和累计统计。
查询最近一次 heap-end 产生的 /tmp/heap_delta.json,可按 caller/地址过滤。 适合只关注布局后的 source 点相关日志,例如: - caller_contains="SLPParseSrvUrl" - around_addr="0x57eebce8", around_size=0x400 - event_types="free"
获取完整的堆状态快照。 在关键步骤后调用以验证完整堆布局。 返回所有活跃 chunk 的地址、大小和来源信息。
在 IDA 扫描结果中按函数名正则/子串查找函数。
获取指定函数的反编译伪代码和地址。
获取指定函数的 xrefs_to 和 calls_from 摘要。
用 IDA headless 重新分析 ELF,并输出 JSON 扫描结果。
Establish an SSH connection to a remote host. Connect to a remote server for CTF debugging. Supports both key-based and password-based authentication.
Disconnect from the current SSH session. Close the active SSH connection and release all resources.
Download and read a file from the remote host via SFTP. Retrieve the text content of a file from the connected remote server.
Execute a command on the remote host via SSH. Run a shell command on the connected remote server and return the combined output including stdout, stderr, and exit code.
Upload a local file to the remote host via SFTP. Transfer a file from the local machine to the connected remote server.
Output schemas are completely undocumented. No tool documents what fields it returns or their types. LLMs cannot predict response structure, forcing them to guess at field names for downstream tool calls. Example: heap_end_action returns 'heaplog style records' but no schema is provided.
Error handling is generic and non-actionable. Most tools return 'Error: {e}' or 'Error: Not connected...' without recovery guidance. Pattern:recovery-guide requires errors to tell LLMs what to do next. Example: ctf_send returns 'Error: Invalid hex string' but does not suggest how to fix it.
Parameter constraints are missing. Many parameters lack enums, ranges, or format specifications. Example: gdb_command 'timeout' has no min/max; 'word_size' in gdb_memory accepts 1/2/4/8 but is not declared as an enum. This invites invalid LLM inputs.