Back to skill

Security audit

Network Monitor

Security checks for vulnerabilities and agentic risk

Overview

This is a plausible network utility, but it contains a real command input bug that can execute arbitrary Python and it under-discloses some outbound network activity.

Review before installing. The main blocker is the DNS command's input handling, which should be fixed before use because a crafted domain can run Python code as the user running the skill. Users should also expect local network metadata inspection and outbound diagnostics, including a speed test to a third-party HTTP host.

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

Error
Location
scripts/network_monitor.sh:83
Finding

Arbitrary Python Code Execution Through Unsanitized DNS Input

Content
View full analysis

Vulnerability Details

File Location: scripts/network_monitor.sh, lines 83โ€“91
Vulnerability Type: Python code injection caused by unsafe source-code construction
Risk Level: High

Vulnerable Code

bash
dns)
    domain="${1:-}"; [ -z "$domain" ] && { echo "Usage: dns <domain>"; exit 1; }
    python3 -c "
import socket
domain = '$domain'
print('DNS: {}'.format(domain))
for info in socket.getaddrinfo(domain, None):
    fam = 'IPv4' if info[0] == socket.AF_INET else 'IPv6'
    print('  {} {}'.format(fam, info[4][0]))
";;

Technical Analysis

The user-controlled domain argument is interpolated directly into source code passed to python3 -c. Although the shell variable is visually placed between single quotation marks, those quotation marks belong to the generated Python program and do not safely quote the value during source-code construction.

An attacker can supply a value containing a single quote and Python syntax. This can terminate the intended Python string and insert additional statements. When the generated program remains syntactically valid, Python executes those statements with the privileges and environment of the skill process.

Quoting "$domain" at the shell layer would not resolve this vulnerability because the unsafe operation is interpolation into Python source, not shell word splitting.

Attack Path

  1. The attacker invokes the dns command with a crafted domain argument containing Python syntax.
  2. The shell assigns the argument to domain.
  3. Variable expansion inserts the untrusted value into the program supplied to python3 -c.
  4. The crafted value closes the intended Python string and injects additional Python statements.
  5. Python parses and executes the injected statements under the identity of the user running the skill.
  6. Injected Python can access files, invoke subprocesses, alter user-writable data, or communicate over the network subject t ...[truncated 639 chars]
Remediation
View remediation

Remediation Suggestions

Do not interpolate untrusted data into dynamically generated Python source. Pass the domain as a positional argument and retrieve it through sys.argv:

bash
dns)
    domain="${1:-}"
    [ -z "$domain" ] && { echo "Usage: dns &lt;domain&gt;"; exit 1; }

    python3 - "$domain" &lt;&lt;'PYEOF'
import socket
import sys

domain = sys.argv[1]
print("DNS: {}".format(domain))
for info in socket.getaddrinfo(domain, None):
    family = "IPv4" if info[0] == socket.AF_INET else "IPv6"
    print("  {} {}".format(family, info[4][0]))
PYEOF
    ;;

Additional hardening measures:

  1. Validate the input against the hostname formats the command intends to support, including explicit length limits.
  2. Reject control characters and unexpected whitespace before resolution.
  3. Keep the Python program in a quoted heredoc so shell expansion cannot alter its source.
  4. Run the skill with least privilege and without unnecessary access to secrets or sensitive files.
  5. Add regression tests using arguments containing quotes, semicolons, newlines, command-substitution syntax, and Python expressions to verify that every value is handled only as data.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (11)

Tp1

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Zero-width Unicode characters are invisible to humans but detectable by AI. When followed by visible text, they indicate hidden content injection.

Content

No source excerpt is available for this finding.

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

Scanner excerpt ยท SKILL.md (reported line 3)May include surrounding context.

md
---
name: Network Monitor
description: "Comfortably monitor your Internet traffic ๐Ÿ•ต๏ธโ€โ™‚๏ธ Based on GyulyVGC/sniffnet (32,966+ GitHub stars). network monitor, rust, application, gui, iced, linux, macos"
version: 1.0.0
license: Apache-2.0
runtime: python3
---

# Network Monitor

Comfortably monitor your Internet traffic ๐Ÿ•ต๏ธโ€โ™‚๏ธ

Inspired by [GyulyVGC/sniffnet](https://github.com/GyulyVGC/sniffnet) (32,966+ GitHub stars).

## Commands

- `help` - Help
- `run` - Run
- `info` - Info
- `status` - Status

## Features

- Core functionality from GyulyVGC/sniffnet

## Usage

Run any command: `network-monitor <c

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
81% confidence
Finding

The skill advertises capabilities consistent with file reading and network access but does not declare any explicit tool scope or permissions boundaries. In an agent ecosystem, missing scope declarations can allow broader-than-expected execution or make review and enforcement of least privilege impossible.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This skill monitors Internet traffic, which can expose sensitive metadata or contents, yet the description provides no warning about privacy, consent, or legal considerations. In context, the absence of such notice makes accidental or uninformed use more dangerous because network monitoring is inherently sensitive.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Command triggers like 'help', 'run', 'info', and 'status' are overly generic and can collide with ordinary user language or other skills. In agent routing contexts, this can cause accidental invocation of a network-monitoring skill when the user intended a benign conversational request, increasing the chance of unintended tool execution.

Content

No source excerpt is available for this finding.

Unrestricted Tool Access

Medium
Category
Excessive Agency
Confidence
86% confidence
Finding

The phrase 'Run any command' encourages unconstrained execution semantics and does not define safe command boundaries. Even though this is documentation text, such wording in a skill manifest can normalize unrestricted command execution and increase the chance that downstream implementations expose arbitrary command paths or argument injection surfaces.

Content

Scanner excerpt ยท SKILL.md (reported line 28)May include surrounding context.

md
## Usage

Run any command: `network-monitor <command> [args]`

---
> **Disclaimer**: This skill is an independent, original implementation. It is not affiliated with, endorsed by, or derived from the referenced open-source project. No code was copied. The reference is for context only.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest description frames the skill as a network monitor focused on observing traffic, which aligns with local interface, connection, port, and bandwidth inspection. However, the documented and implemented commands also initiate active probes and external service interactions, expanding the behavior from monitoring into network testing and remote information retrieval.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The speed test performs an outbound HTTP download from a third-party host, causing external network traffic and data exchange beyond local monitoring. While user-triggered and not obviously malicious, it can surprise users, leak usage metadata to the remote host, and violate expectations in restricted or privacy-sensitive environments.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

WHOIS retrieval gathers domain registration information rather than monitoring local traffic, interfaces, or connectivity state. While network-adjacent, it is an informational enrichment feature that is not an obvious requirement of a network monitor as described in the manifest.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code invokes a WHOIS lookup against external registration data sources, which is distinct from observing network traffic or local network conditions. The capability appears ancillary and is not clearly supported by the manifest's stated purpose.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The speed test silently contacts an external host and transfers data without a user-facing warning, which is a transparency and privacy issue. In environments with metered bandwidth, egress controls, or strict privacy requirements, this can create unexpected network activity and policy violations.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.