High-risk tools in GDB MCP Server
15 of the 31 tools in GDB MCP Server are classified as high risk. This page profiles those tools specifically, with recommended policy actions and the attack patterns that target them.
Every operation listed below is an action PolicyLayer recommends controlling at the transport layer. Open any tool to see the full profile, risk score, and YAML policy snippet.
Tools at high risk
-
gdb_commandExecute直接执行GDB Machine Interface (MI)命令。 参数: - command: MI命令 (以 - 开头,如 -break-list, -exec-run) - waitForDone (可选): 是否等待完成响应 (默认true) 示例: - gdb_command({command:
-
gdb_connectExecute通过TCP连接到目标板的gdbserver或QEMU。 参数: - target: 目标地址,格式为 host:port (例如 192.168.1.100:1234 或 localhost:1234) 示例: - gdb_connect({target:
-
gdb_continueExecute从当前位置继续执行程序。程序将运行直到遇到断点或异常。
-
gdb_disconnectExecute优雅地断开与目标板的连接并终止GDB进程。会先发送detach命令通知gdbserver。
-
gdb_enable_breakpointExecute启用指定编号的断点。
-
gdb_evaluate_expressionExecute计算并返回表达式的值。 参数: - expression: 要计算的表达式 (如 x, *ptr, sizeof(var), x+y) 示例: - gdb_evaluate_expression({expression:
-
gdb_finishExecute继续执行直到当前函数返回。在返回点暂停。
-
gdb_initExecute启动指定架构的GDB进程,默认使用aarch64交叉编译器。 参数: - gdbPath (可选): GDB可执行文件路径 - architecture (可选): 目标架构 (aarch64/arm/x86_64) 示例: - gdb_init() → 使用默认 aarch64-none-linux-gnu-gdb - gdb_init({arc...
-
gdb_interruptExecute中断正在运行的程序。程序将暂停在当前位置。
-
gdb_load_programExecute加载要调试的可执行文件及其符号表。 参数: - programPath: 可执行文件路径 必须在连接目标板后调用此命令。
-
gdb_nextExecute执行一行代码。如果当前行包含函数调用,将跳过该函数(不进入内部)。
-
gdb_runExecute从程序入口点开始执行。程序将运行直到遇到断点或异常。
-
gdb_select_threadExecute切换到指定线程进行调试。
-
gdb_stepExecute执行一行代码。如果当前行包含函数调用,将进入该函数内部。
-
gdb_write_registerExecute修改指定寄存器的值。 参数: - register: 寄存器名称 (如 r0, pc, sp) - value: 要写入的值 (如 0x1000 或 42) 警告: 此操作可能影响程序执行状态。
Attacks that target this class
High-risk tools in any server share these documented attack patterns. Each links to the full case and the defensive policy.