Back to skill

Security audit

系统命令

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed Windows command runner, but it grants broad host command execution with weak controls and inconsistent safety claims, so users should review it carefully before installing.

Install only if you intentionally want an OpenClaw skill that can run Windows shell commands with the same permissions as the hosting agent. Avoid using it in shared, remote-support, or privileged environments unless you can restrict who invokes it, run it under a low-privilege account, and tolerate exposure of host, network, process, and system details.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/system_cmd_v4.js:372
Finding

Shell Command Injection Bypasses High-Risk Command Confirmation

Content
View full analysis
1000) { throw new Error(`Command is too long`); } let fullCommand; if (isCmdSpecificCommand(userCommand)) { fullCommand = `cmd /c "chcp 65001 >nul && ${userCommand}"`; } else { fullCommand = `powershell -Command "& {chcp 65001 > $null; ${userCommand}}"`; } const options = { maxBuffer: 1024 * 1024 * 5, encoding: 'utf8', timeout: isHighRisk ? 30000 : 15000 }; const { stdout, stderr } = await execAsync(fullCommand, options); } ``` ### Technical Analysis User-controlled command text is interpolated directly into a CMD or PowerShell command string and passed to `child_process.exec`, which executes through a shell. The high-risk check does not parse the command into executable and argument boundaries. Instead, `isHighRiskCommand` checks whether the entire normalized input starts with one of several known dangerous strings. Active version 4 does not reject shell control operators such as: - PowerShell statement separator: `;` - CMD command operators: `&` and `&&` - Pipelines - Subexpressions and variable expansion - Nested shell invocations - Destructive commands not included in the blacklist Consequently, an input can begin with a command that is not classified as high risk and append a destructive command. The complete string is subsequently evaluated by a shell. The `--yes` confirmation ...[truncated 2096 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/system_cmd_v4.js:645
Finding

Unknown Commands Are Automatically Executed With the Agent's Full OS Permissions

Content
View full analysis
Remediation
View remediation
` requests must never become arbitrary shell execution. 4. **Apply operating-system least privilege.** Run the Skill as a dedicated non-administrative account with no service-management, scheduled-task creation, sensitive registry-write, or protected-directory-write privileges. 5. **Create a separate administrative Skill if required.** Administrative commands should use narrowly scoped operations, command-specific schemas, explicit authorization, and auditable approvals rather than a generic shell. 6. **Align documentation and implementation.** Remove claims that only predefined safe commands are permitted unless the code actually enforces that restriction. Clearly disclose every system capability and its required privilege level. 7. **Add authorization and audit controls.** Restrict which users or sessions can invoke administrative operations and log the authenticated requester, validated operation, arguments, result, and approval event. ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (37)

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The README claims the skill is restricted to a safe command whitelist, yet it explicitly documents shell command chaining (&&) and output redirection (>). Those features typically require passing a string to a shell or permitting shell metacharacters, which can bypass whitelist assumptions and enable arbitrary command execution or unintended file modification if implemented as described.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/system_cmd_v2.js (reported line 48)May include surrounding context.

js
// 危险命令模式(正则表达式)
const DANGEROUS_PATTERNS = [
  /rm\s+-rf/i,           // rm -rf
  /del\s+\*\.\*/i,       // del *.*
  /format\s+[cdefg]/i,   // format c:
  /shutdown\s+[\/\-]/i,  // shutdown /s

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/system_cmd_v2.js (reported line 52)May include surrounding context.

js
/del\s+\*\.\*/i,       // del *.*
  /format\s+[cdefg]/i,   // format c:
  /shutdown\s+[\/\-]/i,  // shutdown /s
  /reg\s+(add|delete)/i, // reg add/delete
  /net\s+user/i,         // net user
  /wmic\s+/i,            // wmic
  /taskkill\s+/i         // taskkill

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The help text states that custom commands run in a restricted environment, but the implementation passes user-controlled input directly to cmd.exe or PowerShell on the host via child_process.exec. This is dangerous because operators may trust the safety claim and allow arbitrary host command execution under false assumptions, increasing the likelihood of system compromise or data exposure.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The header claims the script has permission controls, but the implementation still allows arbitrary user-supplied commands to reach exec() via PowerShell or CMD, with only brittle blacklist/high-risk gating. This is dangerous because blacklist-based command filtering is easy to bypass and creates a false sense of safety around unrestricted OS command execution.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/system_cmd_v3.js (reported line 58)May include surrounding context.

js
/^format\s+[cdefg]:/i,         // format c:
  /^taskkill\s+\/f/i,            // taskkill /f
  /^net\s+stop/i,                // net stop
  /^sc\s+delete/i,               // sc delete
  /^reg\s+delete/i,              // reg delete
  /^shutdown\s+[\/\-]/i,         // shutdown /s
  /rm\s+-rf/i                    // rm -rf

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/system_cmd_v4.js (reported line 103)May include surrounding context.

js
/^format\s+[cdefg]:/i,         // format c:
  /^taskkill\s+\/f/i,            // taskkill /f
  /^net\s+stop/i,                // net stop
  /^sc\s+delete/i,               // sc delete
  /^reg\s+delete/i,              // reg delete
  /^shutdown\s+[\/\-]/i,         // shutdown /s
  /rm\s+-rf/i                    // rm -rf

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/system_cmd_v3.js (reported line 59)May include surrounding context.

js
/^taskkill\s+\/f/i,            // taskkill /f
  /^net\s+stop/i,                // net stop
  /^sc\s+delete/i,               // sc delete
  /^reg\s+delete/i,              // reg delete
  /^shutdown\s+[\/\-]/i,         // shutdown /s
  /rm\s+-rf/i                    // rm -rf
];

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/system_cmd_v4.js (reported line 104)May include surrounding context.

js
/^taskkill\s+\/f/i,            // taskkill /f
  /^net\s+stop/i,                // net stop
  /^sc\s+delete/i,               // sc delete
  /^reg\s+delete/i,              // reg delete
  /^shutdown\s+[\/\-]/i,         // shutdown /s
  /rm\s+-rf/i                    // rm -rf
];

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
100% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/system_cmd_v3.js (reported line 66)May include surrounding context.

js
// 完全禁止的命令模式
const FORBIDDEN_PATTERNS = [
  /rm\s+-rf\s+[\/\\]/i,          // rm -rf /
  /del\s+\*\.\*\s+[\/\\]/i,      // del *.* /
  /format\s+[cdefg]:\s+\/y/i,    // format c: /y
  /reg\s+delete\s+HKLM/i,        // reg delete HKLM

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
100% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/system_cmd_v4.js (reported line 111)May include surrounding context.

js
// 完全禁止的命令模式
const FORBIDDEN_PATTERNS = [
  /rm\s+-rf\s+[\/\\]/i,          // rm -rf /
  /del\s+\*\.\*\s+[\/\\]/i,      // del *.* /
  /format\s+[cdefg]:\s+\/y/i,    // format c: /y
  /reg\s+delete\s+HKLM/i,        // reg delete HKLM

YARA rule 'agent_skill_destructive_autonomous_actions': Autonomous destructive filesystem, shell history, or repository actions in AI agent skills [agent_skills]

High
Category
YARA Match
Confidence
75% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · scripts/system_cmd_v3.js (reported line 66)May include surrounding context.

js
,         // format c:
  /^taskkill\s+\/f/i,            // taskkill /f
  /^net\s+stop/i,                // net stop
  /^sc\s+delete/i,               // sc delete
  /^reg\s+delete/i,              // reg delete
  /^shutdown\s+[\/\-]/i,         // shutdown /s
  /rm\s+-rf/i                    // rm -rf
];

// 完全禁止的命令模式
const FORBIDDEN_PATTERNS = [
  /rm\s+-rf\s+[\/\\]/i,          // rm -rf /
  /del\s+\*\.\*\s+[\/\\]/i,      // del *.* /
  /format\s+[cdefg]:\s+\/y/i,    // format c: /y
  /reg\s+delete\s+HKLM/i,        // reg delete HKLM
  /net\s+user\s+administrator/i  // net user administrator
];

/**
 * 检查命令是否完全禁止
 * @param {string} command - 要检查的命令
 * @returns {boolean} - 是否完全禁止
 */
function isForbiddenCommand(command) {
  const cmdLower = command.toLowerCase().trim();
  
  // 检查完全禁止的命令
  for (const forbiddenCmd of FORBIDDEN_COMMANDS) {
    if (cmdLower.includes(forbiddenCmd.toLowerCase())) {
      return tru

YARA rule 'agent_skill_destructive_autonomous_actions': Autonomous destructive filesystem, shell history, or repository actions in AI agent skills [agent_skills]

High
Category
YARA Match
Confidence
75% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · scripts/system_cmd_v4.js (reported line 111)May include surrounding context.

js
,         // format c:
  /^taskkill\s+\/f/i,            // taskkill /f
  /^net\s+stop/i,                // net stop
  /^sc\s+delete/i,               // sc delete
  /^reg\s+delete/i,              // reg delete
  /^shutdown\s+[\/\-]/i,         // shutdown /s
  /rm\s+-rf/i                    // rm -rf
];

// 完全禁止的命令模式
const FORBIDDEN_PATTERNS = [
  /rm\s+-rf\s+[\/\\]/i,          // rm -rf /
  /del\s+\*\.\*\s+[\/\\]/i,      // del *.* /
  /format\s+[cdefg]:\s+\/y/i,    // format c: /y
  /reg\s+delete\s+HKLM/i,        // reg delete HKLM
  /net\s+user\s+administrator/i  // net user administrator
];

/**
 * 检查命令是否完全禁止
 * @param {string} command - 要检查的命令
 * @returns {boolean} - 是否完全禁止
 */
function isForbiddenCommand(command) {
  const cmdLower = command.toLowerCase().trim();
  
  // 检查完全禁止的命令
  for (const forbiddenCmd of FORBIDDEN_COMMANDS) {
    if (cmdLower.includes(forbiddenCmd.toLowerCase())) {
      return tru

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill executes user-controlled shell commands through child_process.exec using cmd or PowerShell, providing broad host-level command execution. In an agent skill context, this enables arbitrary system inspection, persistence changes, service control, and destructive actions with only weak blacklist-based checks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The guide prominently encourages use of commands like ipconfig, netstat, and systeminfo, which reveal hostnames, IP addresses, DNS servers, gateways, active connections, installed system details, and process information. In an agent skill context, normalizing collection and display of this data without any privacy or sensitivity warning increases the risk of unintended disclosure to the model, logs, or downstream users.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill is designed to collect host, user, process, and network data such as systeminfo, netstat, whoami, and net user, but the README does not clearly warn that these outputs may expose sensitive environment details. In a shared assistant or remote-support setting, this can leak internal IPs, usernames, installed patches, running services, and other reconnaissance data useful to attackers.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The README advertises process termination and output redirection without prominent warnings about service disruption, data loss, or filesystem modification. In an agent context, users may treat these commands as routine diagnostics, but they can terminate critical processes or write sensitive files when invoked carelessly or by prompt manipulation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The documentation describes the skill as limited to read-only or diagnostic commands, but elsewhere includes administrative/destructive commands such as taskkill and file-writing via redirection. This mismatch can cause operators and downstream agents to trust the skill too broadly, increasing the chance of unsafe use or privilege misuse.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly allows arbitrary custom system commands, which can reveal sensitive host and user data (whoami, directory listings, network configuration, system inventory) or perform system changes, yet the documentation does not clearly foreground these risks. In an agent context, this broad command-execution surface is inherently dangerous because simple user prompts can be translated into host-level actions and data disclosure.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The text states that all output is processed to ensure Chinese displays correctly, and elsewhere emphasizes Chinese-friendly behavior and Chinese aliases. This natural-language requirement appears to enforce a specific language/locale experience without user opt-in or a documented region-specific justification.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation makes a materially misleading safety claim ('only allows predefined safe commands') while the same skill explicitly supports arbitrary command execution via /system_cmd exec <命令> and even permits destructive operations with a --yes confirmation. This mismatch can cause users, reviewers, or downstream agents to trust the skill more than warranted, increasing the chance that sensitive or destructive commands are invoked under a false sense of safety.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

该 markdown 文档说明 ipconfig /all 会显示主机名、DNS 后缀、IP 地址、默认网关和 DNS 服务器等敏感网络配置;后文 systeminfo 还会显示产品 ID、域和登录服务器等系统信息。这些内容可能影响用户隐私或系统暴露面,但文档仅说明权限、执行时间和输出大小,没有任何用户警示或数据披露提醒。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

ipconfig /release、/renew 和 /flushdns 不只是查询操作,可能导致网络连接短暂中断、地址变更或 DNS 缓存被清除。当前文档只描述参数功能和权限要求,没有提醒用户这些操作会影响当前系统网络状态。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

tasklist 的 /S system、/U username 和 /P password 参数涉及远程系统访问和口令使用,属于会影响隐私与系统安全边界的行为。文档仅列出参数用途,没有提醒避免在命令行明文使用密码或说明远程查询的安全注意事项。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The examples demonstrate commands and outputs that reveal hostnames, local IPs, process lists, listening ports, OS build details, installed hotfixes, and other environment data, but they do not warn users that running these commands can expose sensitive system and network information. In an agent skill context, this increases the risk of inadvertent reconnaissance and privacy leakage because users may copy, run, or share the outputs without understanding their sensitivity.

Content

No source excerpt is available for this finding.