T06 · System Persistence
- Location
SKILL.md:27- Finding
Installation of a Persistent launchd Scheduler Service
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 27–32
Vulnerability Type: Persistent startup service installation
Risk Level: HighVulnerable Code Snippet:
bash npm install -g openclaw-scheduler openclaw-scheduler init launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/ai.openclaw.scheduler.plist openclaw-scheduler jobs listTechnical Analysis
The installation procedure initializes a scheduler configuration and then registers
ai.openclaw.scheduler.plistwith the user's launchd domain. According to the surrounding documentation, initialization creates the plist under~/Library/LaunchAgents/, and the resulting scheduler operates independently of the OpenClaw gateway.Registering a LaunchAgent creates a cross-session execution mechanism. The service can subsequently process arbitrary shell commands and agent workflows, including commands that invoke
sudo. Although durable scheduling is the stated purpose of the Skill, the instructions establish persistence without first requiring explicit informed consent, presenting the generated plist for inspection, or documenting removal and rollback procedures.Attack Path
- An operator follows the installation instructions in
SKILL.md. openclaw-scheduler initcreates the scheduler database and launchd property list.launchctl bootstrapregisters the property list in the user's graphical launchd domain.- The scheduler continues operating across terminal sessions and gateway restarts.
- An attacker who compromises the installed package, scheduler configuration, database, or job-management interface can create or alter a shell job.
- The persistent service executes the attacker-controlled job under the service user's privileges whenever its trigger conditions are met.
Impact Assessment
Successful abuse provides durable command execution under the account running the LaunchAgent. This includes access to fi ...[truncated 442 chars]
- An operator follows the installation instructions in
- Remediation
View remediation
Remediation Suggestions
- Default to a foreground or session-scoped execution mode rather than automatically registering a LaunchAgent.
- Require explicit operator confirmation before creating or bootstrapping persistent services.
- Display the complete generated plist, executable path, arguments, environment, and permissions before registration.
- Ensure the plist and scheduler database are owned by the intended user and are not writable by other users.
- Restrict accepted shell commands through allowlists, execution policies, and least-privilege service accounts.
- Require strong authentication and authorization for job creation, modification, approval, and execution.
- Document and test complete rollback procedures, including:
bash launchctl bootout gui/$(id -u) ~/Library/LaunchAgents/ai.openclaw.scheduler.plist rm ~/Library/LaunchAgents/ai.openclaw.scheduler.plist - Preserve tamper-evident audit records for service registration, job changes, approvals, and executions.
