Back to skill

Security audit

Sts2 Vision

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly matches a game screen-monitoring purpose, but it also includes under-disclosed system-wide mouse click monitoring.

Install only if you are comfortable with a local game-monitoring tool that can capture the game window and write local reports. Review or disable monitor_v2.py before use because it records system-wide mouse clicks in memory without clear disclosure or window scoping.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
monitor_v2.py:31
Finding
Undisclosed System-Wide Mouse Click Monitoring## Vulnerability Details **File Location**: `monitor_v2.py`, lines 31–50; automatic activation at lines 158–163 **Vulnerability Type**: Global input monitoring beyond the documented task scope **Risk Level**: Medium The monitor installs a system-wide mouse listener and records the timestamp, absolute screen coordinates, and button associated with every mouse press. It does not restrict collection to the game window. The behavior is automatically enabled when the monitor starts and is not disclosed in `SKILL.md`. ```python def on_click(self, x, y, button, pressed): """点击事件""" if pressed: # 只记录按下 click_info = { "time": time.time(), "x": x, "y": y, "button": str(button) } self.clicks.append(click_info) self.last_click_time = click_info["time"] def start(self): """启动监听""" self.listener = mouse.Listener(on_click=self.on_click) self.listener.daemon = True self.listener.start() print("鼠标监听已启动") ``` The listener is started automatically as part of monitor initialization: ```python # 启动鼠标监听 try: self.mouse.start() except Exception as e: print(f"鼠标监听失败: {e}") ``` ### Technical Analysis `pynput.mouse.Listener` registers a global input listener rather than a listener scoped to one application. Consequently, `on_click()` receives mouse events generated while the user interacts with any visible application. The callback stores raw absolute coordinates and button values without checking whether the event occurred inside the selected game window. This exceeds the least-privilege requirements of the documented screen-capture, OCR, and DPS-monitoring functionality. A safer implementation is demonstrated elsewhere in the project by `online_monitor.py`, which checks events against the game-window rectangle before retaining them. The retained queue is bounded to 100 entries and no network t ...[truncated 1613 chars]
Remediation
## Remediation Suggestions 1. Remove mouse monitoring if it is not essential to the documented DPS-monitoring function. 2. If mouse monitoring is required, make it explicitly opt-in and clearly disclose that the underlying library creates a global operating-system listener. 3. Obtain and retain the selected game-window bounds before starting the listener. 4. Reject events outside those bounds before creating or storing an event record: ```python def on_click(self, x, y, button, pressed): if not pressed or not self.window_rect: return wx = self.window_rect["x"] wy = self.window_rect["y"] ww = self.window_rect["w"] wh = self.window_rect["h"] if not (wx <= x < wx + ww and wy <= y < wy + wh): return self.clicks.append({ "time": time.time(), "x": x - wx, "y": y - wy, "button": str(button) }) ``` 5. Prefer aggregate counts over raw timestamps, coordinates, and button details when precise event data is unnecessary. 6. Minimize retention and clear the queue when monitoring stops. 7. Ensure the listener is stopped through a `finally` block so exceptions cannot leave input monitoring active longer than intended. 8. Update `SKILL.md` to document the input-monitoring behavior, its purpose, collection scope, retention policy, and method for disabling it. 9. Add tests confirming that clicks outside the game-window rectangle are never retained.
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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (69)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
Window discovery and metadata enumeration expose information about the user's desktop environment that is not disclosed by the stated purpose. Although less severe than keylogging, enumerating visible windows and titles can reveal private application usage and should be treated as sensitive desktop inspection.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
Window discovery and metadata enumeration expose information about the user's desktop environment that is not disclosed by the stated purpose. Although less severe than keylogging, enumerating visible windows and titles can reveal private application usage and should be treated as sensitive desktop inspection.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding
Window discovery and metadata enumeration expose information about the user's desktop environment that is not disclosed by the stated purpose. Although less severe than keylogging, enumerating visible windows and titles can reveal private application usage and should be treated as sensitive desktop inspection.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding
Window discovery and metadata enumeration expose information about the user's desktop environment that is not disclosed by the stated purpose. Although less severe than keylogging, enumerating visible windows and titles can reveal private application usage and should be treated as sensitive desktop inspection.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
Window discovery and metadata enumeration expose information about the user's desktop environment that is not disclosed by the stated purpose. Although less severe than keylogging, enumerating visible windows and titles can reveal private application usage and should be treated as sensitive desktop inspection.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
Window discovery and metadata enumeration expose information about the user's desktop environment that is not disclosed by the stated purpose. Although less severe than keylogging, enumerating visible windows and titles can reveal private application usage and should be treated as sensitive desktop inspection.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
Window discovery and metadata enumeration expose information about the user's desktop environment that is not disclosed by the stated purpose. Although less severe than keylogging, enumerating visible windows and titles can reveal private application usage and should be treated as sensitive desktop inspection.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding
Window discovery and metadata enumeration expose information about the user's desktop environment that is not disclosed by the stated purpose. Although less severe than keylogging, enumerating visible windows and titles can reveal private application usage and should be treated as sensitive desktop inspection.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
Window discovery and metadata enumeration expose information about the user's desktop environment that is not disclosed by the stated purpose. Although less severe than keylogging, enumerating visible windows and titles can reveal private application usage and should be treated as sensitive desktop inspection.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding
Window discovery and metadata enumeration expose information about the user's desktop environment that is not disclosed by the stated purpose. Although less severe than keylogging, enumerating visible windows and titles can reveal private application usage and should be treated as sensitive desktop inspection.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding
Window discovery and metadata enumeration expose information about the user's desktop environment that is not disclosed by the stated purpose. Although less severe than keylogging, enumerating visible windows and titles can reveal private application usage and should be treated as sensitive desktop inspection.

Lp3

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding
The skill advertises capabilities that inherently involve local data access and output generation, but it declares no tool scope or permissions. In an agent ecosystem, missing capability declarations reduce transparency and can allow screen-derived data or generated reports to be accessed or written without informed user consent or proper sandboxing.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
A skill that captures screen content or performs OCR can unintentionally collect sensitive information such as notifications, chats, usernames, or unrelated applications visible on screen. Failing to warn users about these privacy implications undermines informed consent and increases the chance of accidental data exposure.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The file contains natural-language comments and printed messages in Chinese, including the user-visible strings on save and ROI listing. Under the language/locale policy rule, hard-coding a specific language without user opt-in or documented locale limitation is a policy concern.

Description-Behavior Mismatch

Medium
Confidence
91% confidence
Finding
The script captures screen regions and persists them as image files on disk, which expands data retention beyond transient real-time monitoring. Even if the intended content is game enemy HP regions, screen-capture workflows can inadvertently store more information than necessary, creating privacy and data-handling risk if files are later accessed, synced, or reused.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The module docstring presents the skill entirely in Chinese, and the rest of the script's user-facing messages also assume Chinese as the only interaction language. For a general-purpose monitoring script, this is a locale policy issue because it imposes a specific language without any user opt-in or documented regional justification.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The manifest describes a system that uses screen capture and OCR to recognize combat data in real time. In this implementation, HP extraction does not perform OCR; it thresholds the image, counts detected digit-like contours, and returns a simplified estimate of len(numbers) * 10, which is materially different from OCR-based recognition.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
Natural-language strings throughout the file, including the module docstring and command-line help, are presented only in Chinese. This forces a specific language for users without any opt-in, fallback, or explanation that the skill is intended only for a Chinese-speaking audience.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
When enabled, this feature writes captured screen contents to disk without any in-file user warning at the point of use. Because screen captures can include unintended sensitive information from the game window or overlapping UI, silent local persistence increases privacy and forensic exposure on shared or compromised systems.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The skill persistently writes combat telemetry and event history to a JSON file even though the described behavior is real-time visual monitoring. Persistent storage increases data retention and creates an undisclosed artifact on disk that could expose gameplay/session data to other local users, backup systems, or later collection by other software. In this context the data is not highly sensitive, but the behavior exceeds the stated scope and should be treated as a privacy and transparency issue.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The skill is described as a vision/OCR combat monitor, but it also installs a global mouse listener that records click time, coordinates, and button presses system-wide. That expands data collection beyond the stated purpose and can capture sensitive user behavior outside the game, creating an unnecessary privacy and surveillance risk.

Context-Inappropriate Capability

Medium
Confidence
96% confidence
Finding
The code starts a global mouse listener even though the stated function is screen capture and OCR-based monitoring. Because the listener is not constrained to in-game events, it can collect unrelated user input across the desktop, which is disproportionate to the feature and increases abuse potential.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
Global mouse capture is enabled without a clear warning or consent flow, so users may not realize their clicks are being recorded. In a desktop environment, undisclosed input capture is dangerous because it can collect behavioral or sensitive interaction data unrelated to the game.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The EasyOCR reader is initialized with ['en'], which forces English-only recognition behavior. This is a natural-language locale constraint, and the file does not offer user opt-in, configuration, or a documented region-specific justification for restricting OCR to English.

Description-Behavior Mismatch

Medium
Confidence
93% confidence
Finding
The skill metadata describes screen capture and OCR for combat monitoring, but the implementation also classifies player activity using mouse input. This is a scope mismatch that can mislead users about what telemetry is collected, reducing informed consent and increasing privacy risk.

Static analysis

No suspicious patterns detected.