Back to skill

Security audit

ssh-tunnel-swarm

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent for managing SSH tunnels, but its install instructions ask users to pipe a mutable remote script directly into bash without integrity verification.

Install only if you are comfortable reviewing the upstream repository and SSH tunnel rules yourself. Avoid the pipe-to-bash command; prefer downloading a pinned release or source checkout, inspecting it, and verifying integrity before running. Treat reverse tunnels as exposing local services to remote hosts, keep SSH keys and rule files private, and use the current-user install path unless system-wide installation is truly needed.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
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
  • Rogue AgentSelf-Modification, Session Persistence
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
Findings (10)

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

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

Content

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

text
# Host 1: expose a local web app on the VPS (reverse), and reach the VPS's
# internal Postgres from your machine (forward).
deploy@vps1.example.com:22=/home/user/.ssh/deploy_vps1
reverse 0.0.0.0:8080:localhost:3000
forward localhost:15432:127.0.0.1:5432

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

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

Content

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

text
# Host 1: expose a local web app on the VPS (reverse), and reach the VPS's
# internal Postgres from your machine (forward).
deploy@vps1.example.com:22=/home/user/.ssh/deploy_vps1
reverse 0.0.0.0:8080:localhost:3000
forward localhost:15432:127.0.0.1:5432

Chaining Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

The command chains network retrieval directly into shell execution with '| bash', eliminating any review boundary between untrusted input and command execution. This makes exploitation straightforward if the upstream script is altered, because the user's shell will immediately execute the attacker's payload.

Content

Scanner excerpt · references/setup.md (reported line 20)May include surrounding context.

Option A — downloader script (fetches latest GitHub release)

shell
wget -qO- https://raw.githubusercontent.com/psyb0t/ssh-tunnel-swarm/master/tools/downloader.sh | bash

This drops an executable ssh-tunnel-swarm bash script in the current

YARA rule 'backdoor_persistence': Backdoor persistence with malicious payloads (shell commands, SSH key injection, hidden root users) [malware]

High
Category
YARA Match
Confidence
75% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · references/setup.md (reported line 44)May include surrounding context.

nd chmod +x's it (a merged single-file build, NOT a compiled binary). It checks for jq/wget first and exits with an error message if either is missing.

Then install it somewhere on PATH:

All users:

shell
sudo mv ssh-tunnel-swarm /usr/local/bin/

Current user only:

shell
mkdir -p ~/bin
mv ssh-tunnel-swarm ~/bin/

If ~/bin isn't already on PATH, add it:

shell
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc   # or ~/.zshrc for zsh
source ~/.bashrc

Check first: echo $PATH | grep -q "$HOME/bin" && echo already-on-path || echo not-on-path

Option B — build from source

Clone the repo (default branch master) and build the merged single-file script via the Makefile:

shell
git clone https://github.com/psyb0t/ssh-tunnel-swarm.git
cd ssh-tunnel-swarm
make build

make build concatenates logger.sh, validators.sh, rules.sh, splitters.sh, main.sh (stripping source lines, comments, and blank lines) into `build/ssh-tunnel-sw

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

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

Content

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

md
in `known_hosts` or the connection fails. That's intentional; don't work around it by
  disabling host key checking.
- No password auth support — private key only. Keep the key file permissions tight
  (`chmod 600`) and never put keys or the rules file (which references key paths) in a
  world-readable location or a git repo.
- Every connection block runs forever in a retry loop (5s backoff) until you kill it —
  make sure that's actually what you want before pointing this at a host.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
70% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

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

md
disabling host key checking.
- No password auth support — private key only. Keep the key file permissions tight
  (`chmod 600`) and never put keys or the rules file (which references key paths) in a
  world-readable location or a git repo.
- Every connection block runs forever in a retry loop (5s backoff) until you kill it —
  make sure that's actually what you want before pointing this at a host.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The setup instructions tell users to stream a remote script directly into bash, which executes unreviewed code immediately with no integrity check, pinning, or manual inspection step. This creates a strong supply-chain and content-tampering risk: if the GitHub content, account, branch, or network path is compromised, arbitrary shell commands will run on the user's machine.

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 · references/setup.md (reported line 32)May include surrounding context.

All users:

shell
sudo mv ssh-tunnel-swarm /usr/local/bin/

Current user only:

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 · references/setup.md (reported line 37)May include surrounding context.

Current user only:

shell
mkdir -p ~/bin
mv ssh-tunnel-swarm ~/bin/

External Script Fetching

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The documentation instructs users to fetch and execute an external script from the internet, relying on live remote content at install time. Even apart from the pipe-to-bash pattern, external script fetching from a mutable source increases supply-chain exposure and makes the installation path dependent on third-party infrastructure trust.

Content

Scanner excerpt · references/setup.md (reported line 20)May include surrounding context.

Option A — downloader script (fetches latest GitHub release)

shell
wget -qO- https://raw.githubusercontent.com/psyb0t/ssh-tunnel-swarm/master/tools/downloader.sh | bash

This drops an executable ssh-tunnel-swarm bash script in the current

Static analysis

No suspicious patterns detected.