Back to skill

Security audit

ida-reverse

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent for IDA reverse engineering, but it deserves Review because its helper can invoke arbitrary IDA MCP tools and can send analysis data to any configured HTTP MCP endpoint.

Install only if you expect the agent to actively control an IDA Pro MCP session. Keep IDA_MCP_URL unset or restricted to trusted loopback unless you have authenticated HTTPS transport, and review batch rename/comment/type operations before use because they persist in the IDA database and project notes.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/ida_mcp_client.py:31
Finding
Unrestricted plaintext MCP endpoint permits analysis-data disclosure and response spoofing<![CDATA[ ## Vulnerability Details **File Location**: `scripts/ida_mcp_client.py:31-51` **Vulnerability Type**: Unvalidated remote endpoint configuration and plaintext transport **Risk Level**: Medium ### Vulnerable Code ```python URL = os.environ.get("IDA_MCP_URL", "http://127.0.0.1:13337/mcp") _session_id = None _req_id = 0 def _rpc(method, params=None): """发一条 JSON-RPC,返回 (result, error)。自动处理 session 头。""" global _session_id, _req_id _req_id += 1 payload = {"jsonrpc": "2.0", "id": _req_id, "method": method} if params is not None: payload["params"] = params headers = { "Content-Type": "application/json", "Accept": "application/json, text/event-stream", } if _session_id: headers["Mcp-Session-Id"] = _session_id req = urllib.request.Request( URL, data=json.dumps(payload).encode(), headers=headers, method="POST" ) ``` ### Technical Analysis The client obtains its MCP destination directly from the `IDA_MCP_URL` environment variable without validating the URL scheme, hostname, port, or trust level. The resulting endpoint is used for JSON-RPC requests without transport authentication. The default loopback endpoint limits exposure during normal operation. However, an inherited, compromised, or incorrectly configured environment can redirect the client to any attacker-controlled HTTP server. Because remote plaintext HTTP endpoints are accepted, a network-positioned attacker can also inspect or alter traffic when the override points outside the local host. MCP request bodies can contain proprietary reverse-engineering information, including binary addresses, decompilation targets, comments, type information, names, and batch analysis operations. Responses are trusted as MCP results and displayed to the user without server identity verification. The unrestricted override is also documented in `README.md:38` and `SKILL.md:40`, making remote endpoint use part of the supported configur ...[truncated 1886 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Restrict the default trust boundary** - Permit only loopback destinations by default. - Resolve the hostname and verify that every resolved address is loopback. - Reject embedded credentials, unexpected schemes, URL fragments, and malformed ports. 2. **Require explicit opt-in for remote access** - Add a flag such as `--allow-remote-mcp`. - Fail closed when `IDA_MCP_URL` resolves to a non-loopback address unless that flag or a narrowly scoped configuration setting is present. - Emit a clear warning identifying the destination before transmitting analysis data. 3. **Require encrypted transport remotely** - Reject `http://` for non-loopback endpoints. - Require `https://` with normal certificate and hostname validation. - Where practical, pin an internal certificate authority or server certificate for sensitive environments. 4. **Authenticate the MCP server** - Support an authentication token or mutual TLS. - Keep credentials outside source code and avoid exposing them in command-line arguments or logs. - Bind authentication to the approved server identity. 5. **Use an allowlist** - Allow administrators to configure approved MCP hostnames and ports. - Validate redirects or disable them so an approved endpoint cannot redirect requests to an untrusted destination. 6. **Document the data exposure** - State that tool arguments and results may contain confidential reverse-engineering data. - Clarify that remote plaintext endpoints are unsupported and unsafe. A minimal policy should reject any non-loopback endpoint unless remote operation is explicitly enabled, and should then require HTTPS plus server authentication. ]]>
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

Tainted flow: 'req' from os.environ.get (line 87, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Content
req = urllib.request.Request(
        URL, data=json.dumps(payload).encode(), headers=headers, method="POST"
    )
    with urllib.request.urlopen(req, timeout=120) as resp:
        sid = resp.headers.get("Mcp-Session-Id")
        if sid:
            _session_id = sid
Confidence
90% confidence
Finding
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Tainted flow: 'req' from os.environ.get (line 87, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Content
headers["Mcp-Session-Id"] = _session_id
        req = urllib.request.Request(URL, data=json.dumps(payload).encode(),
                                     headers=headers, method="POST")
        urllib.request.urlopen(req, timeout=30)
    except Exception:
        pass
Confidence
90% confidence
Finding
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The declared purpose says this is a reverse-engineering workflow/norms skill, but the content instructs use of a generic client that can call arbitrary ida-pro-mcp tools, batch requests, and maintain a session over HTTP/JSON-RPC. That mismatch is dangerous because reviewers or orchestration policy may treat it as passive guidance while it actually enables broad operational control over a local analysis service.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
The entire skill description is written only in Chinese, and there is no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking context. This creates a language/locale policy concern because the skill effectively forces a specific language without opt-in.

Lp3

Medium
Category
MCP Least Privilege
Confidence
85% confidence
Finding
The skill references network access to a local unauthenticated MCP endpoint and environment-dependent local scripts, but it does not declare any explicit tool scope or allowed-tools boundary. That makes the effective capability broader than the metadata suggests and increases the chance an agent can invoke unintended tooling or access local resources without clear policy constraints.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The trigger condition is extremely broad: essentially any task involving IDA MCP, decompilation, crash analysis, malware analysis, protocol reversing, CTF, or internal audit causes the skill to load. Overbroad activation increases the chance the skill influences unrelated tasks, expands access to local MCP/networked capabilities by default, and makes accidental misuse more likely.

Static analysis

No suspicious patterns detected.