Back to skill

Security audit

Win Control

Security checks for vulnerabilities and agentic risk

Overview

This skill needs review because it tells users to run missing PowerShell automation scripts with execution-policy bypass, including examples that can send real DingTalk messages.

Install only if you understand that this skill is intended to control the active Windows desktop and may send real messages. Do not run the documented commands unless you have verified the exact PowerShell scripts, removed or justified execution-policy bypass, and confirmed the target window and recipient before any action.

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

PowerShell Execution Policy Is Disabled for Referenced Automation Scripts

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:10-19; README.md:27-29, 48-58, 65-80
Vulnerability Type: Unsafe PowerShell execution configuration
Risk Level: Medium

Vulnerable Code Snippets

SKILL.md:10-19:

powershell
# Click the mouse
powershell -ExecutionPolicy Bypass -File skills/win-control/scripts/mouse-click.ps1 -X 500 -Y 300 -ClickType Left
powershell
# Send text
powershell -ExecutionPolicy Bypass -File skills/win-control/scripts/send-keys.ps1 -Text "Hello World"

# Send shortcut keys
powershell -ExecutionPolicy Bypass -File skills/win-control/scripts/send-keys.ps1 -Keys "CTRL+C,CTRL+V"

README.md:27-29:

powershell
powershell -ExecutionPolicy Bypass -File "C:\Users\xl\.openclaw\workspace\skills\win-control\scripts\rpa-dingtalk-smart.ps1" `
  -Recipient "韩文瀚" `
  -Message "你好,我是通过 RPA 给你发的消息"

README.md:48-58:

powershell
# Basic usage with default parameters
powershell -ExecutionPolicy Bypass -File scripts/rpa-dingtalk-smart.ps1

# Custom recipient and message
powershell -ExecutionPolicy Bypass -File scripts/rpa-dingtalk-smart.ps1 `
  -Recipient "张三" `
  -Message "下午 3 点开会"

# Send a long message
powershell -ExecutionPolicy Bypass -File scripts/rpa-dingtalk-smart.ps1 `
  -Recipient "李四" `
  -Message "关于明天会议的安排:1. 准备材料 2. 预定会议室 3. 通知参会人员"

README.md:65-80:

powershell
# Click specified coordinates
powershell -ExecutionPolicy Bypass -File scripts/mouse-click.ps1 -X 500 -Y 300 -ClickType Left
powershell
# Send text
powershell -ExecutionPolicy Bypass -File scripts/send-keys.ps1 -Text "Hello World"

# Send shortcut keys
powershell -ExecutionPolicy Bypass -File scripts/send-keys.ps1 -Keys "CTRL+C,CTRL+V,ENTER"
powershell
# Test mouse movement
powershell -ExecutionPolicy Bypass -File scripts/test-control.ps1 -TestMouse

# Test keyboard input
powershell -ExecutionPolicy Bypass -File sc
...[truncated 3107 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove -ExecutionPolicy Bypass from every documented invocation.
  2. Package all referenced scripts so their implementation can be reviewed together with the documentation.
  3. Digitally sign released PowerShell scripts and use an appropriate policy such as AllSigned or RemoteSigned.
  4. If a process-scoped override is operationally unavoidable, use the least permissive setting that works, document why it is required, and do not default to Bypass.
  5. Use canonical, resolved paths rooted in a trusted installation directory rather than paths dependent on the current working directory.
  6. Before execution, verify each script against a publisher signature or a cryptographic hash distributed through a trusted channel.
  7. Restrict write permissions on the installation and scripts directories so untrusted users and processes cannot replace script files.
  8. Run the automation as a non-administrative account with only the permissions required for UI automation.
  9. Add an explicit confirmation step before sensitive UI actions, particularly sending messages or issuing keyboard shortcuts to the active window.
  10. Replace user-specific paths, usernames, personal recipient names, and personal message examples with neutral placeholders.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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 (3)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The README explicitly promotes UI automation for sending messages and simulating keyboard input using PowerShell with ExecutionPolicy Bypass, which can trigger actions in the active window and transmit data to recipients without strong safeguards or explicit warnings about misdelivery, accidental activation, or irreversible user-facing actions. In the context of an agent skill, this is dangerous because generic automation primitives can be repurposed to send unintended messages, interact with the wrong application, or manipulate user data if window focus or targeting is incorrect.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The markdown content, including the title, feature description, and safety guidance, is presented only in Chinese. This can constitute a language policy violation when the skill forces a specific language without user opt-in or justification for a region-specific audience.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The troubleshooting guidance tells users to switch to an English input method as the prescribed fix for input issues. This imposes a specific language/locale requirement in natural-language instructions without user opt-in or a clearly justified region-specific constraint.

Content

No source excerpt is available for this finding.