Back to skill

Security audit

Sshot

Security checks for vulnerabilities and agentic risk

Overview

This screenshot skill is disclosed, but it should be reviewed because it runs an unaudited PowerShell script with execution-policy bypass on a hard-coded Windows node.

Install only in an environment where you control and trust the named Windows node and the referenced `sshot.ps1` file. Expect `/sshot` to capture the entire screen, including private messages, documents, passwords, or dashboards if visible. Before use, verify or package the script, remove the execution-policy bypass where possible, restrict who can modify the script path, and add an explicit confirmation step for captures.

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
SKILL.md:10
Finding
Execution of an Unverified External PowerShell Script with Execution Policy Bypass<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:10-14` and duplicated in `clawhub/SKILL.md:10-14` **Vulnerability Type**: Unverified external script execution with PowerShell security controls bypassed **Risk Level**: Medium ### Vulnerable Code ```text Use `system.run` on node `My Windows Node`. Execute: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "C:\Users\AlenZhu\.openclaw\scripts\sshot.ps1" Wait until the command finishes and return stdout (screenshot file path). ``` ### Technical Analysis The Skill delegates its substantive behavior to `C:\Users\AlenZhu\.openclaw\scripts\sshot.ps1`, which is outside the audited package. The PowerShell script was not included in the project, so its contents, integrity, and actual behavior cannot be verified. The command also uses `-ExecutionPolicy Bypass`. Although PowerShell execution policy is not a complete security boundary, bypassing it removes a defense-in-depth control that might otherwise prevent an unsigned or untrusted script from running. The script resides under a user profile and no signature, cryptographic hash, trusted installation procedure, or restrictive permission requirement is specified. The same unsafe instruction is duplicated in `SKILL.md` and `clawhub/SKILL.md`. No evidence establishes that the referenced script is currently malicious; the vulnerability is that the Skill unconditionally trusts mutable code outside the reviewed package. ### Attack Path 1. An attacker or compromised local process obtains write access to `C:\Users\AlenZhu\.openclaw\scripts\sshot.ps1`. 2. The attacker replaces or modifies the script so that it performs additional commands beyond taking a screenshot. 3. A user invokes `/sshot`. 4. The Agent calls `system.run` on the hard-coded node named `My Windows Node`. 5. PowerShell launches the modified script using `-ExecutionPolicy Bypass`. 6. The injected commands execute with the permissions of the account run ...[truncated 883 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Include `sshot.ps1` inside the reviewed Skill package so its implementation is versioned and auditable. 2. Remove `-ExecutionPolicy Bypass`. Use the organization's configured PowerShell execution policy and require appropriately signed scripts where possible. 3. Verify the script before every execution using an approved Authenticode signature or a pinned cryptographic hash. 4. Install the script in a protected application directory rather than a mutable user-profile path, and restrict write permission to trusted administrators or the deployment mechanism. 5. Execute the screenshot operation using a dedicated least-privileged account with only the filesystem and desktop-session access required for screenshot capture. 6. Avoid hard-coded user-specific paths and node names. Resolve a trusted package-relative path or use validated configuration. 7. Return only the expected screenshot path and validate that stdout conforms to an approved local path format before presenting or consuming it. 8. Keep the duplicate Skill definitions synchronized or consolidate them into a single authoritative file to prevent security fixes from being applied to only one copy. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (2)

Missing User Warnings

Medium
Confidence
97% confidence
Finding
This skill silently captures a full-screen screenshot of the user's environment, which may expose sensitive information such as passwords, private messages, internal documents, or security dashboards. Because the description and invocation flow do not clearly warn the user that a screenshot will be taken, the skill creates a meaningful privacy and data-exposure risk, especially on a remote Windows node.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
This skill is explicitly designed to capture a full-screen screenshot on a Windows node, which can collect highly privacy-sensitive information such as passwords, private messages, documents, or other on-screen secrets. The skill text provides no explicit user warning, confirmation step, scope limitation, or guidance to ensure informed consent before collecting and returning the screenshot path, making accidental or unauthorized sensitive-data capture more likely.

Static analysis

No suspicious patterns detected.