T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:57- Finding
Unverified Remote Script Executed Directly by a Shell
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent server-hardening guide, but it asks agents to make high-impact system changes and run unverified install commands that users should review before use.
Install only if you are comfortable with an agent changing server-wide SSH, firewall, service, VPN, IPv6, and npm configuration. Before using it on a remote host, verify key-based non-root SSH access in a second session, keep console or provider recovery access available, prefer signed package-manager installation steps over curl-to-sh, pin and verify the OpenClaw npm package, and review each sudo command before execution.
SKILL.md:57Unverified Remote Script Executed Directly by a Shell
SKILL.md:92Unpinned Global npm Package Installation
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
# Disable Root Login
sudo sed -i 's/^#*PermitRootLogin .*/PermitRootLogin no/' /etc/ssh/sshd_config
# Reload SSH
sudo sshd -t && sudo systemctl reload ssh
```
2. **Default-deny Firewall**
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
# Disable Root Login
sudo sed -i 's/^#*PermitRootLogin .*/PermitRootLogin no/' /etc/ssh/sshd_config
# Reload SSH
sudo sshd -t && sudo systemctl reload ssh
```
2. **Default-deny Firewall**
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
# Disable Root Login
sudo sed -i 's/^#*PermitRootLogin .*/PermitRootLogin no/' /etc/ssh/sshd_config
# Reload SSH
sudo sshd -t && sudo systemctl reload ssh
```
2. **Default-deny Firewall**
curl -fsSL https://tailscale.com/install.sh | sh executes code fetched over the network immediately, creating a supply-chain and content-swapping risk. Because this is a privileged server setup guide, compromise of that script or transport trust would directly affect the target host.
- Goal: Create a private VPN mesh network.
- Commands:
```bash
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
```
- *Wait for user to authenticate the Tailscale link.*
The | sh chain causes immediate shell execution of network-fetched content, eliminating any review or verification barrier. This is a classic unsafe pattern and materially increases supply-chain compromise risk on the target server.
- Goal: Create a private VPN mesh network.
- Commands:
```bash
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
```
- *Wait for user to authenticate the Tailscale link.*
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
# Allow SSH over Tailscale
sudo ufw allow from 100.64.0.0/10 to any port 22 proto tcp
# Remove public SSH access (Adjust rule name/number as needed)
sudo ufw delete allow OpenSSH || sudo ufw delete allow 22/tcp
# Allow Web ports over Tailscale
sudo ufw allow from 100.64.0.0/10 to any port 443 proto tcp
sudo ufw allow from 100.64.0.0/10 to any port 80 proto tcp
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
# Allow SSH over Tailscale
sudo ufw allow from 100.64.0.0/10 to any port 22 proto tcp
# Remove public SSH access (Adjust rule name/number as needed)
sudo ufw delete allow OpenSSH || sudo ufw delete allow 22/tcp
# Allow Web ports over Tailscale
sudo ufw allow from 100.64.0.0/10 to any port 443 proto tcp
sudo ufw allow from 100.64.0.0/10 to any port 80 proto tcp
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- Commands:
```bash
chmod 700 ~/.openclaw/credentials 2>/dev/null || true
chmod 600 .env 2>/dev/null || true
```
10. **Final Audit**
The SSH hardening step disables password authentication and root login immediately, but it does not require verifying that a working non-root key-based session exists first. In a remote-only setup, this can lock the operator out of the host and create an availability incident during deployment or recovery.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
- Commands:
```bash
# Backup config
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
# Disable Password Auth
sudo sed -i 's/^#*PasswordAuthentication .*/PasswordAuthentication no/' /etc/ssh/sshd_config
# Disable Root Login
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
- Commands:
```bash
# Backup config
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
# Disable Password Auth
sudo sed -i 's/^#*PasswordAuthentication .*/PasswordAuthentication no/' /etc/ssh/sshd_config
# Disable Root Login
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
- Commands:
```bash
# Backup config
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
# Disable Password Auth
sudo sed -i 's/^#*PasswordAuthentication .*/PasswordAuthentication no/' /etc/ssh/sshd_config
# Disable Root Login
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
- Commands:
```bash
# Backup config
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
# Disable Password Auth
sudo sed -i 's/^#*PasswordAuthentication .*/PasswordAuthentication no/' /etc/ssh/sshd_config
# Disable Root Login
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
- Commands:
```bash
# Backup config
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
# Disable Password Auth
sudo sed -i 's/^#*PasswordAuthentication .*/PasswordAuthentication no/' /etc/ssh/sshd_config
# Disable Root Login
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
- Commands:
```bash
# Backup config
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
# Disable Password Auth
sudo sed -i 's/^#*PasswordAuthentication .*/PasswordAuthentication no/' /etc/ssh/sshd_config
# Disable Root Login
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
- Commands:
```bash
# Backup config
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
# Disable Password Auth
sudo sed -i 's/^#*PasswordAuthentication .*/PasswordAuthentication no/' /etc/ssh/sshd_config
# Disable Root Login
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
- Commands:
```bash
# Backup config
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
# Disable Password Auth
sudo sed -i 's/^#*PasswordAuthentication .*/PasswordAuthentication no/' /etc/ssh/sshd_config
# Disable Root Login
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
- Commands:
```bash
# Backup config
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
# Disable Password Auth
sudo sed -i 's/^#*PasswordAuthentication .*/PasswordAuthentication no/' /etc/ssh/sshd_config
# Disable Root Login
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
- Commands:
```bash
# Backup config
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
# Disable Password Auth
sudo sed -i 's/^#*PasswordAuthentication .*/PasswordAuthentication no/' /etc/ssh/sshd_config
# Disable Root Login
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
- Commands:
```bash
# Backup config
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
# Disable Password Auth
sudo sed -i 's/^#*PasswordAuthentication .*/PasswordAuthentication no/' /etc/ssh/sshd_config
# Disable Root Login
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
- Commands:
```bash
# Backup config
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
# Disable Password Auth
sudo sed -i 's/^#*PasswordAuthentication .*/PasswordAuthentication no/' /etc/ssh/sshd_config
# Disable Root Login
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
- Commands:
```bash
# Backup config
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
# Disable Password Auth
sudo sed -i 's/^#*PasswordAuthentication .*/PasswordAuthentication no/' /etc/ssh/sshd_config
# Disable Root Login
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
- Commands:
```bash
# Backup config
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
# Disable Password Auth
sudo sed -i 's/^#*PasswordAuthentication .*/PasswordAuthentication no/' /etc/ssh/sshd_config
# Disable Root Login
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
- Commands:
```bash
# Backup config
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
# Disable Password Auth
sudo sed -i 's/^#*PasswordAuthentication .*/PasswordAuthentication no/' /etc/ssh/sshd_config
# Disable Root Login
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
- Commands:
```bash
# Backup config
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
# Disable Password Auth
sudo sed -i 's/^#*PasswordAuthentication .*/PasswordAuthentication no/' /etc/ssh/sshd_config
# Disable Root Login
No suspicious patterns detected.