T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:195- Finding
Mutable Remote Installer Executed Directly as Root
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This appears to be a real static hosting skill, but its install path asks users to run unverified internet scripts as root and creates a persistent service with excessive privileges.
Review carefully before installing. Do not run the one-line curl-to-sudo installer on a production or sensitive host unless you first download, inspect, and verify a pinned release. Prefer a dedicated low-privilege service account, locked-down .env permissions, pinned dependencies, and explicit backups or confirmation before delete or clean-deploy operations.
SKILL.md:195Mutable Remote Installer Executed Directly as Root
references/install.md:75Boot-Persistent Service Executes Repository-Controlled Application Code
references/install.md:22Bun Installer Downloaded and Executed Without Integrity Verification
references/install.md:33Unpinned Repository and Dependency Installation
scripts/sf-helper.sh:11Environment-Controlled Command Selection in Helper Script
Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
# Overwrite existing file
sf upload ./new-version.pdf mysite --overwrite
# Or delete and re-upload
Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
- `path`: File or directory to upload
- `site`: Target site name
- `subdir`: Optional subdirectory
- `--overwrite`: Replace existing files
- `--json`: Output JSON
### files
The 'curl | sudo bash' pattern combines remote content retrieval with immediate privileged execution, creating a high-risk chaining primitive that removes review barriers and amplifies compromise impact. In this skill's installation context, it is especially dangerous because users are explicitly told to run it once on the host, making full host compromise plausible if the fetched script is tampered with.
curl -fsSL https://raw.githubusercontent.com/498AS/kleo-static-files/main/install.sh | sudo bash
The installer outputs JSON with connection details between KLEO_SF_CONFIG_BEGIN and KLEO_SF_CONFIG_END markers. Parse this to get api_url and api_key.
Piping remote content directly into sudo bash combines external fetching, shell interpretation, and root privilege in a single step, eliminating opportunities for review or verification. This materially increases the likelihood and blast radius of supply-chain compromise, enabling full system takeover.
curl -fsSL https://raw.githubusercontent.com/498AS/kleo-static-files/main/install.sh | sudo bash
The Bun installer is fetched from the internet and piped directly to bash without integrity verification. Even without sudo on this specific line, compromise of the installer source can lead to arbitrary code execution in the installing user's context and potentially further privilege escalation.
# Bun
curl -fsSL https://bun.sh/install | bash
# Caddy (Ubuntu/Debian)
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
Piping a remotely fetched installer into bash allows arbitrary code execution without review or integrity checks. Although it runs as the current user rather than via sudo, it still gives the remote script full control over that user's environment and can be a stepping stone to broader compromise.
# Bun
curl -fsSL https://bun.sh/install | bash
# Caddy (Ubuntu/Debian)
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
curl -fsSL https://bun.sh/install | bash
# Caddy (Ubuntu/Debian)
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update && sudo apt install caddy
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
curl -fsSL https://bun.sh/install | bash
# Caddy (Ubuntu/Debian)
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update && sudo apt install caddy
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list sudo apt update && sudo apt install caddy
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list sudo apt update && sudo apt install caddy
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list sudo apt update && sudo apt install caddy
### 2. Clone Repository
The service consumes secrets from /opt/kleo-static-files/.env, but the guide does not specify restrictive permissions or a dedicated service account. On multi-user systems, weak file permissions could expose API configuration and other secrets to local users or processes, and the same unit also runs Bun from /root, suggesting an unnecessarily privileged deployment model.
[Service]
Type=simple
WorkingDirectory=/opt/kleo-static-files
EnvironmentFile=/opt/kleo-static-files/.env
ExecStart=/root/.bun/bin/bun run server/index.ts
ExecStartPost=/opt/kleo-static-files/scripts/sync-caddy.ts --reload
Restart=on-failure
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
cd /opt/kleo-static-files
source .env
bun run scripts/create-key.ts "admin"
# Save the key!
This markdown file documents sf files ... delete and sf sites delete operations, including that site deletion removes all files, but it does not provide any explicit warning or caution about irreversibility or potential data loss. Under the markdown-file criteria, destructive behaviors that can affect user data should be accompanied by clear warnings.
The skill explicitly instructs users to upload sensitive files and share both the URL and credentials, but it does not warn about plaintext credential handling, credential reuse, or the limits of basic auth for protecting sensitive data. This can lead to accidental exposure of confidential material or insecure secret-sharing practices, especially if users copy weak or reused passwords into chat, shells, or logs.
Piping a remotely fetched script directly into sudo bash executes untrusted network content as root without an opportunity to inspect or verify it. If the source repository, network path, or hosting account is compromised, this becomes an immediate root-level remote code execution path on the host.
curl -fsSL https://raw.githubusercontent.com/498AS/kleo-static-files/main/install.sh | sudo bash
The installer outputs JSON with connection details between KLEO_SF_CONFIG_BEGIN and KLEO_SF_CONFIG_END markers. Parse this to get api_url and api_key.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
curl -fsSL https://raw.githubusercontent.com/498AS/kleo-static-files/main/install.sh | sudo bash
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
curl -fsSL https://raw.githubusercontent.com/498AS/kleo-static-files/main/install.sh | sudo bash
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
curl -fsSL https://raw.githubusercontent.com/498AS/kleo-static-files/main/install.sh | sudo bash
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
curl -fsSL https://raw.githubusercontent.com/498AS/kleo-static-files/main/install.sh | sudo bash
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
curl -fsSL https://raw.githubusercontent.com/498AS/kleo-static-files/main/install.sh | sudo bash
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
curl -fsSL https://raw.githubusercontent.com/498AS/kleo-static-files/main/install.sh | sudo bash
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
curl -fsSL https://raw.githubusercontent.com/498AS/kleo-static-files/main/install.sh | sudo bash
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
curl -fsSL https://raw.githubusercontent.com/498AS/kleo-static-files/main/install.sh | sudo bash
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
curl -fsSL https://raw.githubusercontent.com/498AS/kleo-static-files/main/install.sh | sudo bash
No suspicious patterns detected.