Back to skill

Security audit

Backup Full System

Security checks for vulnerabilities and agentic risk

Overview

This cloud backup skill should be reviewed because it collects broad local and privileged system data and uploads it to Google Drive without clear scoping, confirmation, or encryption.

Install only after narrowing the backup to explicit OpenClaw paths, confirming the cloud remote, adding encryption before upload, and removing or separately approving collection of ~/.config, shell profiles, crontab, Tailscale, systemd files, and unrelated home-directory files.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (2)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/backup_full_system.sh:18
Finding

Excessive Collection and Unencrypted Cloud Upload of Sensitive Configuration

Content
View full analysis
$TMP_DIR/apt_packages.txt pip list --format=freeze > $TMP_DIR/python_libraries.txt 2>/dev/null crontab -l > $TMP_DIR/crontab_bak.txt 2>/dev/null # 3. SAO LƯU FILE CẤU HÌNH NGƯỜI DÙNG (Biến môi trường) cp ~/.bashrc ~/.profile ~/.bash_logout $TMP_DIR/ 2>/dev/null cp -r ~/.config $TMP_DIR/user_configs 2>/dev/null # 4. SAO LƯU CẤU HÌNH HỆ THỐNG (Cần quyền sudo cho các file nhạy cảm) # Sao lưu cấu hình Tailscale (nếu có) if [ -d "/etc/tailscale" ]; then sudo cp -r /etc/tailscale $TMP_DIR/etc_tailscale 2>/dev/null fi # Sao lưu các file dịch vụ tự tạo (Systemd) sudo cp /etc/systemd/system/openclaw* $TMP_DIR/systemd_services 2>/dev/null # 5. SAO LƯU TẬP TIN TRONG THƯ MỤC NGƯỜI DÙNG (Không bao gồm thư mục và file log) echo "--- ĐANG SAO LƯU TẬP TIN NGƯỜI DÙNG ---" mkdir -p $TMP_DIR/user_files # Tìm các file (không phải thư mục), không chứa 'log' trong tên, nằm trực tiếp trong PARENT_DIR find "$PARENT_DIR" -maxdepth 1 -type f ! -iname "*log*" -exec cp {} "$TMP_DIR/user_files/" \; 2>/dev/null # 6. ĐÓNG GÓI TẤT CẢ (Dữ liệu Bot + Cấu hình hệ thống) echo "--- ĐANG NÉN DỮ LIỆU ---" sudo tar -czf $BACKUP_DIR/$FILENAME -C $PARENT_DIR $SOURCE_NAME full_system_info # 7. ĐẨY LÊN GOOGLE DRIVE echo "--- ĐANG TẢI LÊN GOOGLE DRIVE ---" rclone copy $BACKUP_DIR/$FILENAME gdrive:OpenClaw_Backups ``` ### Technical Analysis The script recursively collects the entire `~/.config` directory, Tailscale configuration, shell startup files, cron entries, systemd service definitions, top-level user files, and the complete `.openclaw` directory. Several of these locations commonly contain access tokens, cloud credentials, private keys, authentication state, environment variables, command ...[truncated 2476 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/backup_full_system.sh:4
Finding

Predictable Filesystem Paths Combined with Overbroad Privileged Operations

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (18)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill claims to back up OpenClaw data, but the analysis indicates behavior extending beyond that scope, including collecting broader system/user information and copying sensitive system configuration under /etc and systemd. That mismatch is dangerous because users may authorize a routine application backup without realizing it can exfiltrate host-level secrets and infrastructure details to cloud storage.

Content

No source excerpt is available for this finding.

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

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

bash
# Cài đặt công cụ nén và rclone
sudo apt update && sudo apt install -y tar zip rclone

Cấu hình Đám mây (Rclone)

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script collects and archives data well beyond an OpenClaw backup, including package inventories, cron jobs, shell profiles, user config directories, host service definitions, and top-level user files. In the skill context, this is more dangerous because the stated purpose is an OpenClaw backup, yet the implementation silently performs broad host reconnaissance and data collection, increasing the risk of unintended sensitive data exfiltration.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script copies user shell startup files, the entire ~/.config tree, Tailscale configuration, systemd service definitions, and arbitrary top-level files from the user's home directory. In context, these locations commonly contain tokens, credentials, network settings, and unrelated personal or operational data, making the backup materially broader and more sensitive than the skill description suggests.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The archive is uploaded to Google Drive without any meaningful warning, confirmation, or summary of the sensitive contents being transferred. Given the script's broad collection scope, this creates a high risk of silent off-host exfiltration of credentials, configuration secrets, and personal data to a potentially misconfigured or shared cloud destination.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description does not clearly warn that the backup may upload sensitive local data to third-party cloud providers. In a skill that archives system state and then transfers it off-host, lack of explicit disclosure undermines informed consent and increases the risk of accidental exposure of secrets, credentials, and private user data.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

bash
# Cài đặt công cụ nén và rclone
sudo apt update && sudo apt install -y tar zip rclone

Cấu hình Đám mây (Rclone)

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% 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.

Content

Scanner excerpt · scripts/backup_full_system.sh (reported line 11)May include surrounding context.

sh
DATE=$(date +%Y-%m-%d_%Hh%M)
FILENAME="Ultimate_Snapshot_$DATE.tar.gz"

mkdir -p $BACKUP_DIR $TMP_DIR

echo "--- ĐANG QUÉT TOÀN BỘ CẤU HÌNH HỆ THỐNG ---"

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Recording installed APT packages, Python libraries, and cron entries captures system inventory and persistence-related configuration that is not obviously necessary to restore OpenClaw itself. This information can expose the software stack, scheduled jobs, and operational details useful for follow-on attacks if the archive or cloud destination is accessed by an unauthorized party.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% confidence
Finding

Backing up crontab entries captures scheduled tasks that can reveal persistence mechanisms, automation secrets, maintenance jobs, and operational timing. Within an OpenClaw backup skill, this is outside the obvious minimum necessary scope and increases the sensitivity of the exported archive.

Content

Scanner excerpt · scripts/backup_full_system.sh (reported line 18)May include surrounding context.

sh
# 2. SAO LƯU DANH SÁCH PHẦN MỀM & CRON
apt-mark showmanual > $TMP_DIR/apt_packages.txt
pip list --format=freeze > $TMP_DIR/python_libraries.txt 2>/dev/null
crontab -l > $TMP_DIR/crontab_bak.txt 2>/dev/null

# 3. SAO LƯU FILE CẤU HÌNH NGƯỜI DÙNG (Biến môi trường)
cp ~/.bashrc ~/.profile ~/.bash_logout $TMP_DIR/ 2>/dev/null

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
90% confidence
Finding

Using sudo to copy /etc/tailscale elevates the script's access to sensitive network identity and VPN configuration material. In this skill context, privileged access is especially risky because the resulting archive is later uploaded off-host, amplifying the consequences of collecting root-readable secrets.

Content

Scanner excerpt · scripts/backup_full_system.sh (reported line 24)May include surrounding context.

sh
cp ~/.bashrc ~/.profile ~/.bash_logout $TMP_DIR/ 2>/dev/null
cp -r ~/.config $TMP_DIR/user_configs 2>/dev/null

# 4. SAO LƯU CẤU HÌNH HỆ THỐNG (Cần quyền sudo cho các file nhạy cảm)
# Sao lưu cấu hình Tailscale (nếu có)
if [ -d "/etc/tailscale" ]; then
    sudo cp -r /etc/tailscale $TMP_DIR/etc_tailscale 2>/dev/null

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
88% confidence
Finding

The script uses sudo to copy systemd service files matching openclaw*, which may contain environment variables, credentials, execution paths, and service-specific operational details. Privileged collection of these files is more dangerous here because the script does not clearly disclose the sensitivity of what will be uploaded externally.

Content

Scanner excerpt · scripts/backup_full_system.sh (reported line 27)May include surrounding context.

sh
# 4. SAO LƯU CẤU HÌNH HỆ THỐNG (Cần quyền sudo cho các file nhạy cảm)
# Sao lưu cấu hình Tailscale (nếu có)
if [ -d "/etc/tailscale" ]; then
    sudo cp -r /etc/tailscale $TMP_DIR/etc_tailscale 2>/dev/null
fi
# Sao lưu các file dịch vụ tự tạo (Systemd)
sudo cp /etc/systemd/system/openclaw* $TMP_DIR/systemd_services 2>/dev/null

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/backup_full_system.sh (reported line 30)May include surrounding context.

sh
sudo cp -r /etc/tailscale $TMP_DIR/etc_tailscale 2>/dev/null
fi
# Sao lưu các file dịch vụ tự tạo (Systemd)
sudo cp /etc/systemd/system/openclaw* $TMP_DIR/systemd_services 2>/dev/null

# 5. SAO LƯU TẬP TIN TRONG THƯ MỤC NGƯỜI DÙNG (Không bao gồm thư mục và file log)
echo "--- ĐANG SAO LƯU TẬP TIN NGƯỜI DÙNG ---"

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
93% confidence
Finding

Running tar with sudo creates a root-readable archive from mixed user and system content, potentially sweeping in files with elevated confidentiality into a portable package. In context, this is risky because the archive is then transferred to cloud storage, turning privileged local access into externalized exposure.

Content

Scanner excerpt · scripts/backup_full_system.sh (reported line 40)May include surrounding context.

sh
# 6. ĐÓNG GÓI TẤT CẢ (Dữ liệu Bot + Cấu hình hệ thống)
echo "--- ĐANG NÉN DỮ LIỆU ---"
sudo tar -czf $BACKUP_DIR/$FILENAME -C $PARENT_DIR $SOURCE_NAME full_system_info

# 7. ĐẨY LÊN GOOGLE DRIVE
echo "--- ĐANG TẢI LÊN GOOGLE DRIVE ---"

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
78% confidence
Finding

The script uses sudo for recursive deletion of the temporary directory, which introduces unnecessary risk if variables are changed, empty, or unexpected. Although likely intended only for cleanup, privileged deletion is hazardous because small path errors can become destructive.

Content

Scanner excerpt · scripts/backup_full_system.sh (reported line 53)May include surrounding context.

sh
fi

# 8. DỌN DẸP
sudo rm -rf $TMP_DIR
find $BACKUP_DIR -type f -name "*.tar.gz" -mtime +7 -delete

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The cleanup removes the temporary staging directory with sudo and deletes older archives automatically, with no confirmation or safety checks. While this appears intended as housekeeping rather than abuse, mistakes in path handling or user expectations could cause loss of forensic or recovery data.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The natural-language content is entirely in Vietnamese and addresses the user in that language without indicating that other languages are supported or optional. Under the language/locale policy, this can be a policy violation unless the locale restriction is explicitly justified or the user is given a choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script's status and error messages are written only in Vietnamese, which imposes a specific language on users without opt-in or explanation. This can violate language or locale policy when the skill is intended for broader use and does not document a justified region-specific constraint.

Content

No source excerpt is available for this finding.