Back to skill

Security audit

Netstat Tool

Security checks for vulnerabilities and agentic risk

Overview

This skill is a simple network diagnostics helper that runs a fixed local netstat command and does not show hidden, persistent, destructive, or exfiltrating behavior.

Install this only if you are comfortable with the agent viewing local listening ports and network socket information. The skill appears narrow, but its documented options overstate what the bundled script actually does.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill documents invocation of a shell-capable command (netstat-tool [options]) but does not declare any tool scope such as permissions or allowed-tools. That creates an authorization gap: an agent or runtime may permit shell execution more broadly than intended, making it easier for this skill to run commands without explicit least-privilege boundaries. In this context, the command is for diagnostics, but it can still expose sensitive network state such as listening ports, routes, and process-to-socket mappings.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/netstat.py (reported line 4)May include surrounding context.

python
#!/usr/bin/env python3
"""Netstat Tool - Network stats."""
import subprocess
subprocess.run(['netstat', '-tuln'])

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The script executes a local system command without any user-facing notice or consent mechanism. While netstat -tuln is a common diagnostic command, it enumerates listening ports and network state, which can expose sensitive environment details to a user who did not expect subprocess execution or system inspection.

Content

No source excerpt is available for this finding.