Back to skill

Security audit

tox-tunnel-ops

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed operations guide for setting up encrypted ToxTunnel remote access, with substantial safety guidance around scoping, validation, and persistence.

Install only if you intend to operate ToxTunnel remote access. Prefer version-pinned packages, review any service auto-start behavior before installing, keep generated rules limited to exact friend keys and host:port pairs, and avoid wide local binds unless you also add firewall controls.

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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (107)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
> `scripts/diagnose.sh` checks all four; run it after writing a rules file.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
> `scripts/diagnose.sh` checks all four; run it after writing a rules file.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
> `scripts/diagnose.sh` checks all four; run it after writing a rules file.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
> `scripts/diagnose.sh` checks all four; run it after writing a rules file.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
> `scripts/diagnose.sh` checks all four; run it after writing a rules file.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
> `scripts/diagnose.sh` checks all four; run it after writing a rules file.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
> `scripts/diagnose.sh` checks all four; run it after writing a rules file.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
> `scripts/diagnose.sh` checks all four; run it after writing a rules file.

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 · examples/local-loopback-test.md (reported line 127)May include surrounding context.

md
user@127.0.0.1 'whoami; uname -s'

# Web (status + large-file integrity):
curl --noproxy '*' -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:13080/
curl --noproxy '*' -s http://127.0.0.1:13080/big.bin | shasum -a 256   # compare to source

# Postgres (real query):

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
80% confidence
Finding

Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.

Content

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

md
**Silent-widening bugs (these are the dangerous ones):**

- **Unrecognised keys inside an allow/deny entry.** Only `host` and `ports` are
  read; anything else is ignored with no warning.
- **A missing `ports` key**, which the engine reads as **all ports**. Together
  with the previous item, a `port: 22` typo (singular) parses as "allow every
  port on that host". Confirmed on v0.4.12: the daemon logs `Loaded access rules`

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
80% confidence
Finding

Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.

Content

Scanner excerpt · references/diagnose.md (reported line 99)May include surrounding context.

md
**Silent-widening bugs (these are the dangerous ones):**

- **Unrecognised keys inside an allow/deny entry.** Only `host` and `ports` are
  read; anything else is ignored with no warning.
- **A missing `ports` key**, which the engine reads as **all ports**. Together
  with the previous item, a `port: 22` typo (singular) parses as "allow every
  port on that host". Confirmed on v0.4.12: the daemon logs `Loaded access rules`

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 1105)May include surrounding context.

service.allow_client_daemon: true.

If the user explicitly wants this path, pin it to a release tag, download it, let them read it, and only then run it. master is mutable: the | sudo sh form executes whatever landed on that branch today, as root, unreviewed.

bash

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

service.allow_client_daemon: true.

If the user explicitly wants this path, pin it to a release tag, download it, let them read it, and only then run it. master is mutable: the | sudo sh form executes whatever landed on that branch today, as root, unreviewed.

bash

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

service.allow_client_daemon: true.

If the user explicitly wants this path, pin it to a release tag, download it, let them read it, and only then run it. master is mutable: the | sudo sh form executes whatever landed on that branch today, as root, unreviewed.

bash

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

md
user-customized config (only rewrites the freshly seeded server template
when switching to client).

Do not run the `curl … | sudo sh` or `irm … | iex` form on the user's behalf.

#### Unpinned `-latest` aliases (convenience only)

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

md
user-customized config (only rewrites the freshly seeded server template
when switching to client).

Do not run the `curl ... | sudo sh` or `irm ... | iex` form on the user's behalf.

#### Unpinned `-latest` aliases (convenience only)

Chaining Abuse

High
Category
Tool Misuse
Confidence
81% confidence
Finding

This command chains download and privileged install using a mutable 'latest' alias. The chaining reduces opportunities for human verification and increases the chance that a compromised or unexpected artifact is installed immediately with root privileges.

Content

Scanner excerpt · references/execute.md (reported line 120)May include surrounding context.

bash
ARCH=x86_64      # or aarch64 (Darwin: arm64 / x86_64)
BASE=https://github.com/agentx-icu/tox-tcp-tunnel/releases/latest/download
wget "$BASE/toxtunnel-Linux-${ARCH}-latest.deb"  && sudo dpkg -i "toxtunnel-Linux-${ARCH}-latest.deb"
wget "$BASE/toxtunnel-Linux-${ARCH}-latest.rpm"  && sudo rpm -i  "toxtunnel-Linux-${ARCH}-latest.rpm"
wget "$BASE/toxtunnel-Darwin-${ARCH}-latest.pkg" && sudo installer -pkg "toxtunnel-Darwin-${ARCH}-latest.pkg" -target /
# Windows: $BASE/toxtunnel-Windows-AMD64-latest.msi (ARM64 variant available), run as Administrator

Chaining Abuse

High
Category
Tool Misuse
Confidence
81% confidence
Finding

The chained RPM example has the same issue: mutable remote content is fetched and then directly installed as root. In practice this weakens reviewability and increases supply-chain risk.

Content

Scanner excerpt · references/execute.md (reported line 121)May include surrounding context.

ARCH=x86_64 # or aarch64 (Darwin: arm64 / x86_64) BASE=https://github.com/agentx-icu/tox-tcp-tunnel/releases/latest/download wget "$BASE/toxtunnel-Linux-${ARCH}-latest.deb" && sudo dpkg -i "toxtunnel-Linux-${ARCH}-latest.deb" wget "$BASE/toxtunnel-Linux-${ARCH}-latest.rpm" && sudo rpm -i "toxtunnel-Linux-${ARCH}-latest.rpm" wget "$BASE/toxtunnel-Darwin-${ARCH}-latest.pkg" && sudo installer -pkg "toxtunnel-Darwin-${ARCH}-latest.pkg" -target /

Windows: $BASE/toxtunnel-Windows-AMD64-latest.msi (ARM64 variant available), run as Administrator

text

Chaining Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

This macOS chained command fetches a mutable package and immediately runs the installer with elevated privileges. The convenience comes at the cost of reduced inspection and stronger dependence on upstream integrity.

Content

Scanner excerpt · references/execute.md (reported line 122)May include surrounding context.

BASE=https://github.com/agentx-icu/tox-tcp-tunnel/releases/latest/download wget "$BASE/toxtunnel-Linux-${ARCH}-latest.deb" && sudo dpkg -i "toxtunnel-Linux-${ARCH}-latest.deb" wget "$BASE/toxtunnel-Linux-${ARCH}-latest.rpm" && sudo rpm -i "toxtunnel-Linux-${ARCH}-latest.rpm" wget "$BASE/toxtunnel-Darwin-${ARCH}-latest.pkg" && sudo installer -pkg "toxtunnel-Darwin-${ARCH}-latest.pkg" -target /

Windows: $BASE/toxtunnel-Windows-AMD64-latest.msi (ARM64 variant available), run as Administrator

text

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

md
#### Build from source (only if no package fits)

- macOS: `brew install libsodium && cd <project> && cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build -j$(sysctl -n hw.ncpu) && sudo cp build/toxtunnel /usr/local/bin/`
- Linux (Debian/Ubuntu): `sudo apt install libsodium-dev build-essential cmake && cd <project> && cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build -j$(nproc) && sudo cp build/toxtunnel /usr/local/bin/`
- Linux (Fedora/RHEL): `sudo dnf install libsodium-devel cmake gcc-c++ && ...`
- Windows: build with MSVC + vcpkg or MSYS2 (see `BUILDING.md`)

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

md
#### Build from source (only if no package fits)

- macOS: `brew install libsodium && cd <project> && cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build -j$(sysctl -n hw.ncpu) && sudo cp build/toxtunnel /usr/local/bin/`
- Linux (Debian/Ubuntu): `sudo apt install libsodium-dev build-essential cmake && cd <project> && cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build -j$(nproc) && sudo cp build/toxtunnel /usr/local/bin/`
- Linux (Fedora/RHEL): `sudo dnf install libsodium-devel cmake gcc-c++ && ...`
- Windows: build with MSVC + vcpkg or MSYS2 (see `BUILDING.md`)

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

md
#### Build from source (only if no package fits)

- macOS: `brew install libsodium && cd <project> && cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build -j$(sysctl -n hw.ncpu) && sudo cp build/toxtunnel /usr/local/bin/`
- Linux (Debian/Ubuntu): `sudo apt install libsodium-dev build-essential cmake && cd <project> && cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build -j$(nproc) && sudo cp build/toxtunnel /usr/local/bin/`
- Linux (Fedora/RHEL): `sudo dnf install libsodium-devel cmake gcc-c++ && ...`
- Windows: build with MSVC + vcpkg or MSYS2 (see `BUILDING.md`)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill clearly instructs the agent to generate commands, validate configs, and in Execute/Diagnose modes run shell commands, yet it declares no explicit tool scope or allowed-tools policy. In an agent platform, that mismatch increases the chance of overbroad shell access being granted implicitly, enabling unintended command execution beyond the minimum needed for this networking skill.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
78% confidence
Finding

The skill includes detailed persistence setup and notes package-managed auto-registration/bootstrapping for launchd, systemd, and Windows SCM around a tool designed for remote network access. In this context, persistence is more sensitive because the software creates encrypted tunnels that could provide durable covert access if deployed without clear operator intent.

Content

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

md
3. **Minimum privilege by default.** When generating rules.yaml, only allow the exact host:port combinations needed. Each friend gets their own rule entry with explicit 64-char hex public key.
4. **No friend wildcards.** The `friend` field in rules.yaml must be an exact 64-character hex public key. Never use `*` for friend identity.
5. **OS-aware.** Detect or ask the user's OS and tailor paths, commands, and service management:
   - macOS (package): `binary: /usr/local/bin/toxtunnel`; example config at `/usr/local/share/toxtunnel/config.yaml.example`. The pkg postinstall **automatically** seeds `/usr/local/etc/toxtunnel/config.yaml` from the example, installs `com.toxtunnel.daemon.plist` into `/Library/LaunchDaemons/`, and runs `launchctl bootstrap`. The daemon then honours `service.allow_client_daemon` / `service.auto_start` and exits 0 cleanly when gated off.
   - Linux (package): `binary: /usr/bin/toxtunnel`, `config: /etc/toxtunnel/config.yaml`, `data: /var/lib/toxtunnel`, service: `toxtunnel.service` (`Type=notify`, `RemainAfterExit=yes`). The postinst seeds the config from the example and runs `systemctl enable --now`. Server installs come up online; client installs idle (`active (exited)`) until the user fills in `client.server_id` and sets `service.allow_client_daemon: true`.
   - Windows (package): `binary: C:\Program Files\ToxTunnel\bin\toxtunnel.exe`. **The MSI does NOT auto-register the SCM service** (the WiX patch is shelved in `cmake/Packaging.cmake` until the correct CPack-generated component Id is discovered). Workflow: user runs the MSI, creates `C:\ProgramData\ToxTunnel\config.yaml`, then registers the service explicitly: `& 'C:\Program Files\ToxTunnel\bin\toxtunnel.exe' install-windows-service -c 'C:\ProgramData\ToxTunnel\config.yaml'`, then `sc start ToxTunnel`. The repo's own `scripts/install.ps1` (in the tox-tcp-tunnel repository, not this skill's `scripts/`) does all of this automatically (download → install → seed config → start service) base
...[truncated 25 chars]

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% confidence
Finding

The skill documents package post-install behavior that auto-enables and starts a daemon (systemctl enable --now / launchd bootstrap). Even though the skill later says not to enable persistence without explicit request, embedding auto-start assumptions in installation guidance can still normalize unattended persistence for a remote-access tunneling service.

Content

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

md
4. **No friend wildcards.** The `friend` field in rules.yaml must be an exact 64-character hex public key. Never use `*` for friend identity.
5. **OS-aware.** Detect or ask the user's OS and tailor paths, commands, and service management:
   - macOS (package): `binary: /usr/local/bin/toxtunnel`; example config at `/usr/local/share/toxtunnel/config.yaml.example`. The pkg postinstall **automatically** seeds `/usr/local/etc/toxtunnel/config.yaml` from the example, installs `com.toxtunnel.daemon.plist` into `/Library/LaunchDaemons/`, and runs `launchctl bootstrap`. The daemon then honours `service.allow_client_daemon` / `service.auto_start` and exits 0 cleanly when gated off.
   - Linux (package): `binary: /usr/bin/toxtunnel`, `config: /etc/toxtunnel/config.yaml`, `data: /var/lib/toxtunnel`, service: `toxtunnel.service` (`Type=notify`, `RemainAfterExit=yes`). The postinst seeds the config from the example and runs `systemctl enable --now`. Server installs come up online; client installs idle (`active (exited)`) until the user fills in `client.server_id` and sets `service.allow_client_daemon: true`.
   - Windows (package): `binary: C:\Program Files\ToxTunnel\bin\toxtunnel.exe`. **The MSI does NOT auto-register the SCM service** (the WiX patch is shelved in `cmake/Packaging.cmake` until the correct CPack-generated component Id is discovered). Workflow: user runs the MSI, creates `C:\ProgramData\ToxTunnel\config.yaml`, then registers the service explicitly: `& 'C:\Program Files\ToxTunnel\bin\toxtunnel.exe' install-windows-service -c 'C:\ProgramData\ToxTunnel\config.yaml'`, then `sc start ToxTunnel`. The repo's own `scripts/install.ps1` (in the tox-tcp-tunnel repository, not this skill's `scripts/`) does all of this automatically (download → install → seed config → start service) based on `-Mode` (or `TOXTUNNEL_MODE`) — download and review it before running, see General Rule 6. Removal: `uninstall-windows-service`. Upgrading in place (`msiexec /i new.msi /qn`) keeps the con
...[truncated 25 chars]