Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions http/exposures/apis/exposed-mcp-server.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
id: exposed-mcp-server

info:
name: Exposed MCP JSON-RPC 2.0 API Detection
author: ivan_wallarm
severity: unknown
description: |
Detects exposed Machine Control Protocol (MCP) servers through JSON-RPC 2.0 API endpoints.
MCP servers often provide administrative access to AI tools, LLM systems, or other automation infrastructure.
Exposed MCP interfaces can lead to unauthorized access, information disclosure, and potential system compromise.
This template tests multiple detection methods including tools/list, rpc.discover, resources/list, and prompts/list.
metadata:
verified: true
max-request: 10
reference:
- https://jsonrpc.org/specification
- https://github.com/anthropics/anthropic-tools/tree/main/mcp
- https://lab.wallarm.com/wallarm-research-nuclei-template-counter-threats-targeting-llm-apps/
tags: mcp,jsonrpc,devtools,exposure,api,ai,llm

http:
- method: POST
path:
- "{{BaseURL}}"

headers:
Content-Type: application/json

payloads:
method:
- rpc.discover
- rpc.describe
- rpc.listTools
- tools/list
- resources/list
- prompts/list
- tool.status
- tool.help
- tool.version
- tool.list

attack: pitchfork

body: |
{
"jsonrpc": "2.0",
"method": "{{method}}",
"params": [],
"id": 1
}

matchers-condition: and
matchers:
- type: word
part: body
words:
- "jsonrpc"
- "result"
condition: and

- type: regex
part: body
regex:
- "\"available_tools\"\\s*:\\s*\\["
- "\"name\"\\s*:\\s*\"get_tools\""
- "\"server_status\"\\s*:\\s*\\{"
- "\"observatories_by_type\""
- "\"parameters\"\\s*:\\s*\\{"
- "\"tools\"\\s*:\\s*\\[.*?\\]"
- "\"resources\"\\s*:\\s*\\[.*?\\]"
- "\"prompts\"\\s*:\\s*\\[.*?\\]"

extractors:
- type: regex
part: body
regex:
- "\"name\"\\s*:\\s*\"([^\"]+)\""