T07 · Tool Hijacking and Spoofing
- Location
scripts/full-backup.sh:4- Finding
Unverified External Backup Script Can Be Hijacked
- Content
View full analysis
&2 exit 1 fi "$BACKUP_SCRIPT" ``` ### Technical Analysis The bundled wrapper delegates all backup behavior to `/root/.openclaw/workspace/scripts/backup-local.sh`, which is located outside the audited Skill package. The only validation performed is the `-x` test, which confirms that the path resolves to an executable object. It does not verify: - The file's owner or group. - Whether the file or its parent directories are writable by untrusted users. - Whether the path resolves through a symbolic link. - The executable's cryptographic integrity. - Whether the target is a regular file. - Whether its behavior matches the backup safeguards claimed in `SKILL.md`. As a result, the effective behavior of this Skill can change independently of the reviewed package. If an attacker can replace the external script or redirect its path, invoking the legitimate-looking backup Skill will execute attacker-controlled commands. ### Attack Path 1. An attacker obtains write access to `/root/.openclaw/workspace/scripts/backup-local.sh` or a relevant parent directory through a separate permission weakness, compromised deployment process, or account access. 2. The attacker replaces the script or redirects the path using a symbolic link to an attacker-controlled executable. 3. The replacement is marked executable so that the `-x` check succeeds. 4. A user or Agent invokes the full-backup Skill. 5. `scripts/full-backup.sh` executes the substituted payload without ownership or integrity verification. 6. The payload runs with the same operating-system privileges and access available to the Skill proc ...[truncated 637 chars]- Remediation
View remediation
