MCP server for PCILeech DMA attacks and memory access. Provides tools for physical and virtual memory reading/writing, memory searching/patching, process translation, kernel module injection, and FPGA configuration.
This MCP server exposes low-level hardware access tools (PCIe, DMA, memory operations, kernel modules) with critical security and operational gaps. While tool names follow verb_noun convention and schemas are present, descriptions lack operational context, parameter validation guidance is sparse, and error handling is minimal. The server exercises extreme privileges (kernel module loading, raw TLP sends, memory writes to arbitrary addresses) without documented permission gates, confirmation patterns, or recovery mechanisms. Most tools lack output schema documentation. Only 6 of 19 tools have descriptions exceeding 20 characters; many are bare-bones. Input parameters lack constraint documentation (e.g., address format validation, range checks for lengths/offsets). No evidence of per-tool permission checks, audit logging, or rate limiting. The codebase shows handler stubs but no visible error categorization (retryable vs fatal vs user-fixable). Critical security issue: tools like memory_write, kmd_load, kmd_execute, tlp_send are marked as WRITE/IRREVERSIBLE but have no dry-run, confirmation, or rollback patterns.
Tools (19)
benchmarkread onlysource verified65/100
Run performance benchmark test on DMA memory access
fpga_configwritesource verified65/100
Read or write FPGA configuration registers
kmd_executeirreversiblesource verified63/100
Execute kernel shell script using loaded kernel module
kmd_exitirreversiblesource verified62/100
Unload kernel module driver
kmd_list_scriptsread onlysource verified60/100
List available kernel shell scripts for the target platform
kmd_loadirreversiblesource verified65/100
Load kernel module driver for privileged operations
No output schemas documented. Tools describe inputs but do not specify what fields/types are returned. LLMs cannot plan downstream calls or extract return values reliably.
Destructive/irreversible tools (memory_write, memory_patch, kmd_load, kmd_execute, tlp_send, fpga_config) lack dry-run, confirmation, or rollback patterns. No guard against accidental system corruption.
Add explicit output schema for every tool. Document field names, types, and structure. Example for memory_read: {type: 'object', properties: {data: {type: 'string', description: 'Hex-encoded bytes read'}, size: {type: 'integer'}, address: {type: 'string'}}. This enables LLMs to extract and chain results.
Implement confirmation_required pattern for destructive tools. Add optional 'dry_run' boolean parameter (default false) to memory_write, memory_patch, kmd_load, kmd_execute, tlp_send, fpga_config. Return a preview of changes without applying them. Require explicit confirmation before irreversible operations.
Add permission scope checks. Each tool should declare required permissions (e.g., 'read:memory', 'write:memory', 'admin:kernel', 'admin:fpga'). Validate caller credentials before execution. Log all sensitive operations with timestamp, caller ID, tool name, parameters.
Expand parameter descriptions with concrete format and range guidance. E.g., for 'address': 'Memory address in hexadecimal format (e.g., 0x1000 to 0xFFFFFFFF for 32-bit systems, 0x0 to 0xFFFFFFFFFFFFFFFF for 64-bit). Must be page-aligned (multiple of 0x1000) for some operations.' For 'length': 'Number of bytes to read (1-1048576). Default 256. Larger reads may timeout; use memory_dump for bulk extraction.'
Document mutually exclusive parameters explicitly in each parameter's description. Example for pid parameter: 'Process ID for virtual memory access. Mutually exclusive with process_name, supply exactly one of these two parameters, not both. If both provided, tool will return error.'
Score history
Overall score trend
First recorded score · v2 rubric
53/100
Scored
Grade
Overall
Spec posture
Rubric
2026-09-22
D
53
2026-07-28+
v2
67/100
Format and display memory in multiple views (hex dump, ASCII, byte array, DWORD array)
memory_patchwritesource verified62/100
Patch memory by applying signature-based replacements
memory_proberead onlysource verified63/100
Probe and identify accessible memory regions (FPGA devices only)
memory_readread onlysource verified72/100
Read memory from physical or virtual address space
memory_searchread onlysource verified70/100
Search memory for specific patterns or signatures
memory_writewritesource verified72/100
Write data to physical or virtual memory
process_listread onlysource verified60/100
List running processes with PID and names
process_virt2physread onlysource verified63/100
Translate virtual address to physical address for a specific process
system_inforead onlysource verified63/100
Get system information including device type, FPGA status, and memory capacity
tlp_sendwritesource verified60/100
Send raw TLP (Transaction Layer Packet) for low-level PCIe operations
translate_phys2virtread onlysource verified65/100
Translate physical address to virtual address using CR3 value
translate_virt2physread onlysource verified65/100
Translate virtual address to physical address using CR3 value
No permission gates or scope declarations. Tools requiring root/FPGA access (kmd_load, kmd_execute, memory_write, tlp_send) do not verify caller authority. Missing audit logging for sensitive operations.
Parameter format/constraint documentation missing. 'address' parameters accept hex but no validation guidance given (e.g., '0x...', length limits, alignment). 'length' parameters unbounded or only loosely constrained (1 to 1MB stated but no guidance on practical limits or error behavior if exceeded).
Mutually exclusive parameters (pid vs process_name) documented in schema but descriptions do not explicitly state dependency or error behavior if both are supplied.
Error handling not visible in code. No error categorization (retryable vs user-fixable vs fatal). Error responses likely raw exceptions without recovery guidance.
Descriptions too terse for LLM understanding. Most descriptions 30-60 chars; ideal is 50-200. E.g., 'Get system information' tells LLM nothing about WHAT info is returned or WHEN to call it. process_list has only a 22-char description.
No rate limiting or runaway protection. Agents in retry loops could spawn thousands of DMA reads or memory writes without guards, risking system instability or resource exhaustion.
Missing tools for common workflows. No batch memory read/write, no snapshot/restore mechanism for kernel modules, no conflict detection when multiple agents access DMA concurrently.
Implement error categorization and recovery guidance. For 'address out of bounds', return: {error: 'Address 0xDEADBEEF out of bounds. Accessible range: 0x0 to 0xFFFFFF00. Try memory_probe to discover valid regions first.', retryable: false}. For 'permission denied', return guidance on escalation (e.g., 'Requires root or FPGA admin privileges').
Expand tool descriptions to 80-150 characters. Include WHEN to use and WHAT to expect. Example for memory_probe: 'Probe FPGA device to discover accessible memory regions. Returns list of valid address ranges. Call this first to identify safe read/write targets. FPGA-only; returns empty on non-FPGA systems.'
Add per-tool rate limits with per-agent quotas. E.g., memory_read max 1000 calls/minute, memory_write max 10 calls/minute. Fail fast with 'Rate limit exceeded' rather than hanging or corrupting state.
Wrap high-risk operations (kmd_load, memory_write on kernel ranges) with audit logging. Emit structured log entries: {timestamp, agent_id, tool_name, parameters (sanitized), result, error_if_any}. Log to stderr or external audit sink.
Add idempotency guidance. For memory_write: document that repeated calls with same address/data are safe (idempotent), but calling with different data is destructive. For kmd_load: clarify whether re-loading same KMD is allowed or returns error.
Return pagination and available alternatives in error responses. E.g., if process_name 'firefox' not found: {error: 'Process firefox not found. Available processes: chrome, firefox-bin, edge'}.
Add optional 'timeout_seconds' parameter to tools calling external hardware (memory_probe, benchmark, tlp_send, fpga_config). Default to 5s. Return timeout error with retry guidance instead of hanging indefinitely.
Document CR3/page table assumptions in translate_phys2virt and translate_virt2phys. State expected format (e.g., 'CR3 value from x86-64 MOV CR3 instruction; assumes PAE mode' or 'ARM TTBR0/TTBR1 format'). Include note that incorrect CR3 produces invalid translations without warning.