T06 · System Persistence
Error
- Location
- references/commands.md:621
- Finding
- Persistent Cross-Session Automatic Backup Daemon<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:64`; `references/commands.md:621-650` **Vulnerability Type**: Persistent background service with continuing filesystem and network access **Risk Level**: High ### Vulnerable Code Snippet ```bash agentdrive claw-auto-backup enable --source-dir <path> --claw-name <name> [--event-log <path>] ``` The associated documentation states that this command starts a detached background daemon, writes a state file, monitors a local directory, and continues running after the terminal session closes. ### Technical Analysis The Skill permits an AI Agent to start a persistent daemon that monitors a local directory and continuously synchronizes changes to cloud storage. The process is deliberately detached from the current shell and survives the Agent session that created it. This crosses the boundary from a one-time cloud-storage operation into persistent system modification. The daemon retains filesystem-read and network-upload capabilities after the immediate task has completed. The Skill does not mandate an expiration time, session-bound shutdown, sensitive-path validation, or a confirmation explaining the continuing behavior. Although the feature is documented and includes a disable command, its cross-session behavior satisfies the definition of system persistence. ### Attack Path 1. A user asks the Agent to back up files or enable automatic backup. 2. The Agent invokes `claw-auto-backup enable` with a local source directory. 3. The CLI creates state and launches a detached background daemon. 4. The initiating terminal or Agent session ends. 5. The daemon continues monitoring the directory. 6. Files subsequently created or modified in that directory are uploaded to cloud storage. 7. If the selected path is overly broad or sensitive, later-created confidential data may be disclosed without further user interaction. ### Impact Assessment The persistent process obtains continuing read access to files ava ...[truncated 499 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Require explicit, informed confirmation before starting any persistent process. 2. Display the fully resolved local source path, cloud destination, expected persistence, and shutdown command before activation. 3. Reject filesystem roots, home-directory roots, system configuration directories, credential directories, and other sensitive locations by default. 4. Use a narrow allowlist for directories that may be monitored. 5. Make automatic backup session-bound or time-limited by default. 6. Require a separate explicit option to allow operation after the current session ends. 7. Provide prominent status output containing the daemon PID, monitored paths, cloud destinations, start time, and expiration time. 8. Automatically stop the daemon when authentication expires or when the configured destination becomes invalid. 9. Add a dry-run mode that enumerates files eligible for upload without starting the daemon. 10. Ensure that `disable` reliably terminates the process and removes all associated state. ]]>
