Principle:0xSteph Pentest ai MCP Iterative Probing Principle
| Knowledge Sources | |
|---|---|
| Domains | Security_Testing, LLM_Agents, MCP |
| Last Updated | 2026-10-23 12:00 GMT |
Overview
A probe-by-probe interaction pattern where an external LLM client discovers, selects, and runs individual security probes against a target through MCP tools, maintaining full control over the testing strategy.
Description
MCP Iterative Probing is the principle that an external LLM (the MCP host model) can drive a penetration test incrementally — selecting which probes to run, sending custom HTTP requests, and reading cumulative findings — rather than triggering a fire-and-forget engagement. It solves the problem that a fixed pipeline cannot leverage the LLM's reasoning about what to test next.
The MCP server exposes tools that form a complete probing loop:
- list_probes: Discover available probes with metadata (bug_class, severity, requires_auth, runtime budget)
- run_probe: Execute a named probe against a target with candidate endpoints and JS URLs
- http_request: Send a custom HTTP request with scope enforcement
- get_findings: Read cumulative findings with filters (severity, status, URL, since)
Scope enforcement is non-negotiable: the http_request tool validates the URL host:port against the engagement target and returns `{"error": "out_of_scope"}` for mismatches. Auth profiles are resolved securely — secrets never enter the MCP/LLM payload.
Usage
Use this principle when:
- An LLM client (Claude Code, Cursor) should control the testing strategy probe-by-probe
- The LLM discovers endpoints from JS bundles and wants to test specific paths
- You need both fire-and-forget engagements (start_engagement) and iterative control (run_probe)
- Auth-gated probes need credentials resolved without exposing secrets to the LLM
Theoretical Basis
The probe-by-probe loop is an LLM-driven search:
# Abstract interaction pattern (NOT real implementation)
engagement_id = start_engagement(target)
probes = list_probes(bug_class="sqli")
for probe in probes:
result = run_probe(probe["name"], target, engagement_id)
findings = get_findings(engagement_id)
# LLM reasons about findings to pick next probe
The probe registry uses a decorator-based registration system:
Failed to parse (syntax error): {\displaystyle \text{ProbeRegistry} = \{\text{name} \to \text{ProbeSpec}(\text{bug\_class}, \text{severity\_max}, \text{requires\_auth}, \text{handler})\} }
Related Pages
Implemented By
- Implementation:0xSteph_Pentest_ai_start_engagement_mcp
- Implementation:0xSteph_Pentest_ai_list_probes_mcp
- Implementation:0xSteph_Pentest_ai_run_probe_mcp
- Implementation:0xSteph_Pentest_ai_http_request_mcp
- Implementation:0xSteph_Pentest_ai_get_findings_mcp