Back to skill

Security audit

OpenClaw Windows Fix Scheduled Task Idle-Kill Bug Patch

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed Windows task fix, but it asks users to run an administrator batch command that force-replaces a persistent elevated scheduled task without enough scoping or safeguards.

Review this before installing on Windows. Prefer the manual Task Scheduler edits or a narrowly scoped script that backs up the existing task, verifies it is the expected OpenClaw task, changes only the needed idle and restart settings, avoids /rl HIGHEST unless required, and confirms the gateway command path is trusted and protected.

Vulnerability Patterns
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • 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)

T06 · System Persistence

Error
Location
SKILL.md:48
Finding

Elevated Logon Persistence Executes a Mutable User-Profile Script

Content
View full analysis
nul REM Create corrected task (runs at logon, no idle kill) schtasks /create /tn "OpenClaw Gateway" /tr "cmd /c cd /d \"%USERPROFILE%\.openclaw\" && gateway.cmd" /sc ONLOGON /rl HIGHEST /f ``` ### Technical Analysis The documented batch commands forcibly delete the existing `OpenClaw Gateway` scheduled task and recreate it with an `ONLOGON` trigger and the `HIGHEST` run level. This establishes execution that persists across sessions and requests the highest privileges available to the task principal. The task launches `gateway.cmd` indirectly through `cmd.exe` from `%USERPROFILE%\.openclaw`. The documentation does not validate the script's owner, access-control list, signature, or hash. Because a user-profile location is commonly writable by the account and potentially by processes operating under that account, any actor able to replace or alter `gateway.cmd` can influence what the scheduled task executes at the next logon. This design exceeds the minimum privileges necessary for the declared purpose. Correcting idle termination only requires changing the existing task's idle-related settings. It does not inherently require deleting the task, introducing a new logon trigger, requesting the highest run level, or launching a mutable batch file through a command interpreter. Forced replacement also discards the existing task definition, including its principal, action, conditions, access controls, failure behavior, and other security settings. The documentation claims that the replacement restarts on failure and operates regardless of battery state, but the provided `schtasks /create` command does not explicitly configure those properties. ### Attack Path ...[truncated 1931 chars]
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • 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
Findings (6)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% 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 · README.md (reported line 42)May include surrounding context.

md
echo.

REM Delete the old task
schtasks /delete /tn "OpenClaw Gateway" /f 2>nul

REM Create corrected task (runs at logon, no idle kill)
schtasks /create /tn "OpenClaw Gateway" /tr "cmd /c cd /d \"%USERPROFILE%\.openclaw\" && gateway.cmd" /sc ONLOGON /rl HIGHEST /f

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
84% confidence
Finding

The script force-deletes and recreates a scheduled task at high privilege using a fixed task name, which can overwrite an existing legitimate task without validation or backup. Because the README instructs users to manually create and run a .bat file as Administrator, the skill encourages privileged system modification with minimal safeguards, increasing the chance of destructive misconfiguration or unintended persistence.

Content

Scanner excerpt · SKILL.md (reported line 51)May include surrounding context.

md
echo.

REM Delete the old task
schtasks /delete /tn "OpenClaw Gateway" /f 2>nul

REM Create corrected task (runs at logon, no idle kill)
schtasks /create /tn "OpenClaw Gateway" /tr "cmd /c cd /d \"%USERPROFILE%\.openclaw\" && gateway.cmd" /sc ONLOGON /rl HIGHEST /f

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README promises that the fix disables idle-stop behavior, restarts on failure, and handles power conditions, but the provided batch command only recreates a task with an ONLOGON trigger and highest privileges. This mismatch can mislead administrators into believing resilience and task-condition hardening were applied when they were not, leaving the service unreliable and potentially easier to disrupt through normal idle/task settings.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The inline comment says the script creates a 'corrected task' that fixes idle-kill behavior, but the command shown does not explicitly configure those conditions. Misleading comments in administrative scripts can cause operators to trust an incomplete fix and skip manual verification, increasing the chance of persistent misconfiguration.

Content

No source excerpt is available for this finding.

Scope Creep

Low
Category
Excessive Agency
Confidence
70% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

Scanner excerpt · README.md (reported line 70)May include surrounding context.

md
**USE AT YOUR OWN RISK.**

- The author(s) are NOT liable for any damages, losses, or consequences arising from 
  the use or misuse of this software — including but not limited to financial loss, 
  data loss, security breaches, business interruption, or any indirect/consequential damages.
- This software does NOT constitute financial, legal, trading, or professional advice.
- Users are solely responsible for evaluating whether this software is suitable for

Scope Creep

Low
Category
Excessive Agency
Confidence
70% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

Scanner excerpt · SKILL.md (reported line 79)May include surrounding context.

md
**USE AT YOUR OWN RISK.**

- The author(s) are NOT liable for any damages, losses, or consequences arising from 
  the use or misuse of this software — including but not limited to financial loss, 
  data loss, security breaches, business interruption, or any indirect/consequential damages.
- This software does NOT constitute financial, legal, trading, or professional advice.
- Users are solely responsible for evaluating whether this software is suitable for

Static analysis

No suspicious patterns detected.