Back to skill

Security audit

Boot Resume

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed crash-recovery tool, but it installs persistent hooks that can automatically read session history and resume agent work without fresh user confirmation.

Install only if you explicitly want automatic recovery across OpenClaw agents after restarts or wake events. Inspect the systemd unit/drop-in files before enabling them, consider using manual invocation instead, and verify uninstall removes the user service, drop-in, copied script, and any partial files left by a failed install.

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
install.sh:52
Finding
Persistent Automatic Execution Through systemd Hooks and Scheduled Agent Events<![CDATA[ ## Vulnerability Details **File Location**: `install.sh:52-92`; related execution logic in `scripts/boot-resume-check.sh:185-200` **Vulnerability Type**: T06: System Persistence **Risk Level**: High ### Vulnerable Code ```bash # 2. Deploy systemd drop-in (Linux only) if [[ "$(uname)" == "Linux" ]]; then SYSTEMD_DROPIN_DIR="$HOME/.config/systemd/user/openclaw-gateway.service.d" DROPIN_TARGET="$SYSTEMD_DROPIN_DIR/boot-resume.conf" mkdir -p "$SYSTEMD_DROPIN_DIR" if [[ -f "$DROPIN_TARGET" ]]; then echo " boot-resume.conf already exists." read -rp " Overwrite? [y/N] " answer if [[ "${answer,,}" != "y" ]]; then echo " Skipped drop-in deployment." else cp "$SKILL_DIR/templates/boot-resume.conf" "$DROPIN_TARGET" echo "✓ Updated systemd drop-in" fi else cp "$SKILL_DIR/templates/boot-resume.conf" "$DROPIN_TARGET" echo "✓ Deployed systemd drop-in → $SYSTEMD_DROPIN_DIR/" fi # 2b. Deploy sleep/wake service (triggers on system resume from suspend/hibernate) WAKE_SERVICE_DIR="$HOME/.config/systemd/user" WAKE_SERVICE_TARGET="$WAKE_SERVICE_DIR/boot-resume-wake.service" if [[ -f "$WAKE_SERVICE_TARGET" ]]; then echo " boot-resume-wake.service already exists." read -rp " Overwrite? [y/N] " answer if [[ "${answer,,}" != "y" ]]; then echo " Skipped wake service deployment." else cp "$SKILL_DIR/templates/boot-resume-wake.service" "$WAKE_SERVICE_TARGET" echo "✓ Updated wake service" fi else cp "$SKILL_DIR/templates/boot-resume-wake.service" "$WAKE_SERVICE_TARGET" echo "✓ Deployed wake service → $WAKE_SERVICE_DIR/" fi # Reload systemd and enable wake service systemctl --user daemon-reload 2>/dev/null && echo "✓ Reloaded systemd" || echo "⚠ systemctl daemon-reload failed" systemctl --user enable boot-resume-wake.service 2>/dev/null && echo "✓ Enabled wake service" || echo "⚠ Could not enable wake service" ``` The persistently invoked script the ...[truncated 4074 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Make manual, non-persistent invocation the default behavior. 2. Require explicit, separate consent before installing each systemd component or enabling any service. 3. Include the referenced systemd unit files in the package so their exact commands, environment, and security properties can be audited. 4. Display the complete unit contents and target paths before installation. 5. Verify ownership and restrictive permissions for the installed script, systemd files, workspace directories, and parent directories. 6. Configure systemd hardening where compatible, including filesystem restrictions, private temporary storage, restricted address families, and minimal environment exposure. 7. Pin the service to a protected script path and validate the script's integrity before every execution. 8. Limit session scanning to an explicit allowlist of agents rather than all agent directories. 9. Require confirmation or an authenticated pending-recovery marker before injecting a continuation event. 10. Implement reliable deduplication and record which interruption has already been processed to prevent repeated or unintended injections. 11. Provide an uninstall command that disables and removes every persistent component before reloading systemd. 12. Fail installation before making any changes when required templates or dependencies are absent, and roll back partial modifications on failure. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (16)

Tool Parameter Abuse

High
Category
Tool Misuse
Content
## Uninstall

```bash
rm ~/.config/systemd/user/openclaw-gateway.service.d/boot-resume.conf
systemctl --user disable boot-resume-wake.service 2>/dev/null
rm ~/.config/systemd/user/boot-resume-wake.service
systemctl --user daemon-reload
Confidence
85% 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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
```bash
rm ~/.config/systemd/user/openclaw-gateway.service.d/boot-resume.conf
systemctl --user disable boot-resume-wake.service 2>/dev/null
rm ~/.config/systemd/user/boot-resume-wake.service
systemctl --user daemon-reload
rm ~/.openclaw/workspace/scripts/boot-resume-check.sh
rm -rf ~/.openclaw/workspace/skills/boot-resume
Confidence
85% 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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
systemctl --user disable boot-resume-wake.service 2>/dev/null
rm ~/.config/systemd/user/boot-resume-wake.service
systemctl --user daemon-reload
rm ~/.openclaw/workspace/scripts/boot-resume-check.sh
rm -rf ~/.openclaw/workspace/skills/boot-resume
```
Confidence
85% 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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
rm ~/.config/systemd/user/boot-resume-wake.service
systemctl --user daemon-reload
rm ~/.openclaw/workspace/scripts/boot-resume-check.sh
rm -rf ~/.openclaw/workspace/skills/boot-resume
```
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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
rm ~/.config/systemd/user/boot-resume-wake.service
systemctl --user daemon-reload
rm ~/.openclaw/workspace/scripts/boot-resume-check.sh
rm -rf ~/.openclaw/workspace/skills/boot-resume
```
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).

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The README explicitly describes automatically injecting resume events into prior sessions after a restart or wake, but it does not clearly warn users that this modifies conversation state autonomously. In a recovery skill that scans historical session artifacts and triggers actions without user confirmation, lack of disclosure increases the risk of unintended actions, duplicate operations, or resuming sensitive workflows unexpectedly.

Session Persistence

Medium
Category
Rogue Agent
Content
```bash
cp scripts/boot-resume-check.sh ~/.openclaw/workspace/scripts/
chmod +x ~/.openclaw/workspace/scripts/boot-resume-check.sh
mkdir -p ~/.config/systemd/user/openclaw-gateway.service.d
cp templates/boot-resume.conf ~/.config/systemd/user/openclaw-gateway.service.d/
cp templates/boot-resume-wake.service ~/.config/systemd/user/
systemctl --user daemon-reload
Confidence
84% confidence
Finding
The installation instructions create user-level systemd service directories and place configuration files that hook into gateway startup behavior, which is a persistence mechanism. In the context of a tool that scans session files and injects resume events automatically, this persistence increases risk because it causes autonomous behavior to survive restarts and user logins without a fresh trust decision.

Session Persistence

Medium
Category
Rogue Agent
Content
cp templates/boot-resume.conf ~/.config/systemd/user/openclaw-gateway.service.d/
cp templates/boot-resume-wake.service ~/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable boot-resume-wake.service
```

## Test
Confidence
87% confidence
Finding
The README instructs users to enable a persistent user-level systemd service that will run automatically on wake/restart, creating durable execution behavior. Persistence mechanisms are security-relevant because they make the skill continue operating beyond the initiating session and can repeatedly trigger autonomous session recovery, magnifying the effects of misconfiguration or abuse.

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill clearly instructs the agent/user to execute shell commands and install persistent systemd hooks, but it declares no explicit tool scope such as permissions or allowed-tools. That mismatch weakens policy enforcement and informed consent, making it easier for an agent runtime to invoke shell-capable behavior without an upfront capability declaration.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The install and uninstall sections direct modification of user systemd units, service enablement, and file deletion, but they do not prominently warn that these actions create persistence and alter startup behavior. In a skill context, omission of that warning increases the chance of unsafe execution by users or agents who may treat the instructions as routine setup.

Session Persistence

Medium
Category
Rogue Agent
Content
cp {baseDir}/scripts/boot-resume-check.sh ~/.openclaw/workspace/scripts/
chmod +x ~/.openclaw/workspace/scripts/boot-resume-check.sh

mkdir -p ~/.config/systemd/user/openclaw-gateway.service.d
cp {baseDir}/templates/boot-resume.conf ~/.config/systemd/user/openclaw-gateway.service.d/
cp {baseDir}/templates/boot-resume-wake.service ~/.config/systemd/user/
Confidence
93% confidence
Finding
Copying drop-in configuration into ~/.config/systemd/user/openclaw-gateway.service.d/ alters the startup behavior of another service so the recovery script runs automatically after gateway start. This is a persistence mechanism and increases attack surface because future gateway restarts will trigger whatever script path is configured there.

Session Persistence

Medium
Category
Rogue Agent
Content
cp {baseDir}/templates/boot-resume-wake.service ~/.config/systemd/user/

systemctl --user daemon-reload
systemctl --user enable boot-resume-wake.service
```

## Verify
Confidence
96% confidence
Finding
Enabling a user systemd service establishes persistence across future logins/restarts, causing the skill's recovery logic to run automatically outside the immediate user invocation. Persistence is security-sensitive because a compromised or modified script would continue executing repeatedly with the user's privileges.

Session Persistence

Medium
Category
Rogue Agent
Content
echo "✓ Deployed wake service → $WAKE_SERVICE_DIR/"
  fi

  # Reload systemd and enable wake service
  systemctl --user daemon-reload 2>/dev/null && echo "✓ Reloaded systemd" || echo "⚠ systemctl daemon-reload failed"
  systemctl --user enable boot-resume-wake.service 2>/dev/null && echo "✓ Enabled wake service" || echo "⚠ Could not enable wake service"
Confidence
80% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Session Persistence

Medium
Category
Rogue Agent
Content
# Reload systemd and enable wake service
  systemctl --user daemon-reload 2>/dev/null && echo "✓ Reloaded systemd" || echo "⚠ systemctl daemon-reload failed"
  systemctl --user enable boot-resume-wake.service 2>/dev/null && echo "✓ Enabled wake service" || echo "⚠ Could not enable wake service"

elif [[ "$(uname)" == "Darwin" ]]; then
  echo ""
Confidence
88% confidence
Finding
Enabling a user service establishes persistence so the recovery logic runs automatically in future sessions, which matches the skill's stated purpose of automatic resume after restart or wake. While not inherently malicious, persistence mechanisms are security-relevant because they cause code to execute automatically on later logins/starts and could be abused if the deployed script is modified or untrusted.

Session Persistence

Medium
Category
Rogue Agent
Content
elif [[ "$(uname)" == "Darwin" ]]; then
  echo ""
  echo "⚠ macOS detected. Systemd is not available."
  echo "  To run the script on gateway start, add this to your launchd plist"
  echo "  or use a wrapper script that calls:"
  echo ""
  echo "    $SCRIPT_TARGET >> /tmp/openclaw/boot-resume.log 2>&1 &"
Confidence
75% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Natural-Language Policy Violations

Low
Confidence
73% confidence
Finding
The file includes a full Chinese section in addition to English, but it does not explicitly state language-selection behavior or whether users can choose their preferred locale. Because the policy calls for flagging language/locale constraints unless choice or justification is documented, the bilingual presentation should clarify that language is optional and user-selected.

Static analysis

No suspicious patterns detected.