Back to skill

Security audit

windows-screenshot-ocr

Security checks for vulnerabilities and agentic risk

Overview

This is a local Windows screenshot and OCR helper with disclosed screen capture and file saving, and I found no hidden upload, persistence, or destructive behavior.

Install only if you are comfortable with a tool that captures your full screen and saves screenshots and OCR output to disk. Avoid running it while passwords, tokens, private messages, or confidential documents are visible; consider changing the fixed output path, deleting captures when done, using a non-admin virtual environment, and pinning dependency versions before installation.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:21
Finding
Unpinned Third-Party Dependencies Installed Without Integrity Verification## Vulnerability Details **File Location**: `SKILL.md:21-22`; `README.md:32-33` **Vulnerability Type**: T08: Insecure Dependencies **Risk Level**: Medium ### Vulnerable Code `SKILL.md:21-22`: ```bash pip install mss pyautogui Pillow pip install winrt ``` `README.md:32-33`: ```bash pip install mss pyautogui Pillow pip install winrt ``` ### Technical Analysis The installation instructions retrieve mutable third-party packages without pinning reviewed versions or verifying package hashes. The project also lacks a dependency lock file or requirements file that records exact versions and expected artifact digests. Consequently, different package releases may be installed at different times. If a dependency release or the configured package index is compromised, installation hooks or imported package code could execute attacker-controlled code. This is especially relevant because `mss` and `pyautogui` are used to access screen and pointer information. The reviewed instructions use conventional package names and do not specify an untrusted package source. Therefore, this finding represents supply-chain exposure rather than evidence that any listed package is currently malicious. ### Attack Path 1. An attacker compromises a listed package, its publisher account, its distribution artifact, or the package index used by the victim. 2. The attacker publishes or substitutes a malicious package release under a dependency name used by the project. 3. A user follows the documented unpinned `pip install` commands. 4. Package installation hooks or malicious code loaded during subsequent imports execute with the privileges of the Python or `pip` process. 5. The malicious dependency accesses user-level resources and may capture or disclose screen content, files, environment data, or other information available to that process. ### Impact Assessment Exploitation could provide arbitrary code execution with the privilege ...[truncated 465 chars]
Remediation
## Remediation Suggestions 1. Create a reviewed `requirements.txt` or equivalent lock file containing exact dependency versions. 2. Record SHA-256 hashes for every permitted distribution artifact and install with `pip install --require-hashes -r requirements.txt`. 3. Explicitly document the trusted Python package index and prohibit fallback to arbitrary or user-controlled indexes. 4. Review package ownership, release history, transitive dependencies, and installation behavior before updating pinned versions. 5. Perform dependency updates through a controlled review process with vulnerability scanning and tests. 6. Recommend installation inside a dedicated virtual environment under a non-administrative account. 7. Keep screenshot and OCR execution non-elevated to limit the impact of a compromised dependency.
Vulnerability Patterns
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
A second mismatch exists because the English description claims full-screen screenshot capture and mouse marking, while the analyzed behavior is limited to OCR on a hardcoded image path rather than the stated workflow. This can mislead users and reviewers, and hardcoded local paths further increase the risk of unintended access to or processing of sensitive files.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
A second mismatch exists because the English description claims full-screen screenshot capture and mouse marking, while the analyzed behavior is limited to OCR on a hardcoded image path rather than the stated workflow. This can mislead users and reviewers, and hardcoded local paths further increase the risk of unintended access to or processing of sensitive files.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The README explicitly describes full-screen capture and saving screenshots to disk, but it does not warn users that the tool may capture passwords, personal messages, tokens, internal documents, or other sensitive on-screen content. In this skill context, the feature is legitimate, but the absence of a privacy/security warning increases the risk of accidental collection and retention of sensitive data.

Lp3

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding
The skill advertises functionality that writes files to disk, but the manifest does not declare any tool scope or permissions that would make that behavior explicit and reviewable. Undeclared file-write capability is dangerous because it reduces transparency, weakens policy enforcement, and can enable unexpected data capture or persistence on the local system.

Description-Behavior Mismatch

Medium
Confidence
98% confidence
Finding
The manifest description explicitly includes '原生OCR文字识别', implying local text recognition capability in addition to screenshot capture. This file implements full-screen capture, mouse-position marking, and local file saving only; it performs no OCR import, invocation, or text extraction anywhere in the code.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The script silently captures the full screen and writes the image to disk, which can include passwords, private chats, tokens, internal documents, or other sensitive data. In this skill context, screenshot capture is expected, but the lack of an explicit warning, consent prompt, or safer defaults increases the chance of unintentional privacy exposure.

Description-Behavior Mismatch

Medium
Confidence
98% confidence
Finding
The manifest describes a combined capability: taking a Windows full-screen screenshot, automatically marking the mouse position, and then performing local OCR. In this file, the code only opens a preexisting image path, runs Windows OCR on it, and saves recognized text; there is no screenshot capture or mouse-position annotation logic.

Natural-Language Policy Violations

Low
Confidence
78% confidence
Finding
The natural-language instructions and usage guidance are presented in Chinese throughout the README, and the file does not indicate that this language choice is optional or region-specific. Under SQP-3, forcing a specific language without user opt-in can be a policy violation.

Natural-Language Policy Violations

Low
Confidence
78% confidence
Finding
The file's human-readable headers and usage-facing output are written only in Chinese, which imposes a specific language without offering a user choice or documenting a justified locale constraint. This matches the policy category for language or locale restrictions lacking opt-in.

Intent-Code Divergence

Low
Confidence
77% confidence
Finding
The file header documents the script as an OCR utility for image text recognition, which matches the code's behavior. This conflicts with the broader claimed skill intent of full-screen screenshot capture with automatic mouse marking, indicating the documented intent in code is narrower than the advertised skill behavior.

Static analysis

No suspicious patterns detected.