Back to skill

Security audit

Trojan Setup

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed proxy installer, but it uses root-level system changes and unsafe installation/network defaults that should be reviewed before use.

Before installing, review install.sh carefully, verify the Trojan release with a pinned checksum or signature, back up existing Chrome APT and proxychains configuration, change the proxy listener to 127.0.0.1 unless you intentionally need LAN exposure, enable TLS certificate and hostname verification where possible, and avoid systemctl enable until you have inspected the service unit and its privileges.

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
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • 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
Findings (4)

T03 · Remote Payload Retrieval and Execution

Error
Location
install.sh:39
Finding

Unverified Remote Executable Download and Root-Level Installation

Content
View full analysis
/dev/null || true fi tar xvf "trojan-${TROJAN_VERSION}-linux-amd64.tar.xz" > /dev/null 2>&1 mv trojan "$TROJAN_DIR" chmod +x "$TROJAN_DIR/trojan" ``` ### Technical Analysis The root-run installer retrieves a precompiled executable archive from a GitHub release and installs it without validating a cryptographic signature or pinned checksum. The URL points to the declared upstream `trojan-gfw` GitHub organization rather than a paste site or obvious personal fork, but HTTPS alone does not establish that the downloaded artifact matches the version reviewed by the Skill auditor. The script also trusts any preexisting archive at `/usr/src/trojan-1.16.0-linux-amd64.tar.xz`. A local attacker or an earlier compromised process able to create that file can bypass the download entirely. The archive is extracted by a root process without first validating its contents or paths. This behavior allows the effective executable payload to differ after the Skill package has been reviewed. ### Attack Path 1. An attacker compromises the upstream release, its publishing account, the delivery trust chain, or places a malicious archive at the expected `/usr/src` path before installation. 2. The administrator runs `sudo ./install.sh`. 3. The script either download ...[truncated 889 chars]
Remediation
View remediation

T06 · System Persistence

Error
Location
SKILL.md:68
Finding

Optional Trojan Service Persistence Is Recommended Without Privilege Hardening

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:44
Finding

Proxy Is Exposed on All Interfaces While TLS Identity Verification Is Disabled

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
install.sh:17
Finding

Installer Requires Full Root Execution and Unconditionally Replaces Unrelated System Configuration

Content
View full analysis
/etc/apt/sources.list.d/google-chrome.list # 更新 apt apt-get update > /dev/null 2>&1 ``` It also modifies the global proxychains configuration: ```bash if ! grep -q "socks5 127.0.0.1 1080" /etc/proxychains4.conf 2>/dev/null; then echo "socks5 127.0.0.1 1080" >> /etc/proxychains4.conf fi ``` ### Technical Analysis The entire script refuses to run unless invoked as root, even though downloading, staging, validating, and extracting the archive do not inherently require root privileges. This unnecessarily exposes all script operations and downloaded content to a privileged execution context. The installer also deletes and recreates the host’s Google Chrome APT source without prompting or preserving its prior contents. Chrome repository modification is declared as a Skill feature, but it is not required to install or operate the Trojan client and should not be an unconditional part of proxy setup. The global proxychains file is similarly changed for every system user. The signing key is retrieved remotely and imported without independent fingerprint validation. Although the repository entry uses `signed-by`, the retrieval process still relies only on the current HTTPS response. ### Attack Path 1. An a ...[truncated 946 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (66)

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

bash
sudo systemctl stop trojan
sudo systemctl disable trojan
sudo rm -rf /usr/src/trojan
sudo rm -f /etc/systemd/system/trojan.service
sudo apt remove proxychains4
sudo systemctl daemon-reload

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

bash
sudo systemctl stop trojan
sudo systemctl disable trojan
sudo rm -rf /usr/src/trojan
sudo rm -f /etc/systemd/system/trojan.service
sudo apt remove proxychains4
sudo systemctl daemon-reload

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

sudo systemctl stop trojan sudo systemctl disable trojan sudo rm -rf /usr/src/trojan sudo rm -f /etc/systemd/system/trojan.service sudo apt remove proxychains4 sudo systemctl daemon-reload

text

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The documentation claims automatic setup, but the content shown does not actually complete client configuration or create the advertised systemd service. This mismatch can mislead users into running privileged installation and service-management steps under false assumptions, which is dangerous in a security-sensitive networking tool because it obscures what state changes really occur.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The use of 'sudo rm -rf /usr/src/trojan' is an unsafe destructive command pattern in documentation because it irreversibly removes a directory tree with root privileges. In a copy-paste workflow, even a small path change or user misunderstanding can lead to unintended data loss or removal of files not created by the skill.

Content

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

md
sudo systemctl disable trojan

# 删除文件
sudo rm -rf /usr/src/trojan
sudo rm -f /etc/systemd/system/trojan.service

# 删除 proxychains4

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The use of 'sudo rm -rf /usr/src/trojan' is an unsafe destructive command pattern in documentation because it irreversibly removes a directory tree with root privileges. In a copy-paste workflow, even a small path change or user misunderstanding can lead to unintended data loss or removal of files not created by the skill.

Content

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

md
sudo systemctl disable trojan

# 删除文件
sudo rm -rf /usr/src/trojan
sudo rm -f /etc/systemd/system/trojan.service

# 删除 proxychains4

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
88% confidence
Finding

The command 'sudo rm -f /etc/systemd/system/trojan.service' directly deletes a file from a sensitive system configuration directory. If the file path is wrong, replaced, or manually edited for another purpose, this can break service management or remove unrelated configuration without recovery guidance.

Content

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

md
# 删除文件
sudo rm -rf /usr/src/trojan
sudo rm -f /etc/systemd/system/trojan.service

# 删除 proxychains4
sudo apt remove proxychains4

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

The script forcibly deletes an existing Chrome APT source file as root without backup, prompt, or validation that replacement is appropriate. In a proxy-setup skill, destructive package-source changes are out-of-scope enough to be risky and can break package management or silently redirect future updates.

Content

Scanner excerpt · install.sh (reported line 73)May include surrounding context.

sh
echo ""
echo "[6/6] 修复 Chrome 官方源..."
# 删除旧源
rm -f /etc/apt/sources.list.d/google-chrome.list

# 添加官方 GPG 密钥
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/google-chrome.gpg

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · install.sh (reported line 76)May include surrounding context.

sh
rm -f /etc/apt/sources.list.d/google-chrome.list

# 添加官方 GPG 密钥
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/google-chrome.gpg

# 添加官方源
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · install.sh (reported line 79)May include surrounding context.

sh
rm -f /etc/apt/sources.list.d/google-chrome.list

# 添加官方 GPG 密钥
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/google-chrome.gpg

# 添加官方源
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list

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 · README.md (reported line 16)May include surrounding context.

md
## 系统要求

- Linux 系统(Ubuntu/Debian 等)
- sudo 权限
- Trojan 服务器订阅(IP、端口、密码、SNI)

## 快速开始

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 · README.md (reported line 104)May include surrounding context.

md
## 系统要求

- Linux 系统(Ubuntu/Debian 等)
- sudo 权限
- Trojan 服务器订阅(IP、端口、密码、SNI)

## 快速开始

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 · README.md (reported line 105)May include surrounding context.

md
## 系统要求

- Linux 系统(Ubuntu/Debian 等)
- sudo 权限
- Trojan 服务器订阅(IP、端口、密码、SNI)

## 快速开始

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 · README.md (reported line 106)May include surrounding context.

md
## 系统要求

- Linux 系统(Ubuntu/Debian 等)
- sudo 权限
- Trojan 服务器订阅(IP、端口、密码、SNI)

## 快速开始

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 · SKILL.md (reported line 131)May include surrounding context.

md
## 系统要求

- Linux 系统(Ubuntu/Debian 等)
- sudo 权限
- Trojan 服务器订阅(IP、端口、密码、SNI)

## 快速开始

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 · SKILL.md (reported line 134)May include surrounding context.

md
## 系统要求

- Linux 系统(Ubuntu/Debian 等)
- sudo 权限
- Trojan 服务器订阅(IP、端口、密码、SNI)

## 快速开始

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 · SKILL.md (reported line 137)May include surrounding context.

md
## 系统要求

- Linux 系统(Ubuntu/Debian 等)
- sudo 权限
- Trojan 服务器订阅(IP、端口、密码、SNI)

## 快速开始

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 · SKILL.md (reported line 196)May include surrounding context.

md
## 系统要求

- Linux 系统(Ubuntu/Debian 等)
- sudo 权限
- Trojan 服务器订阅(IP、端口、密码、SNI)

## 快速开始

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 · install.sh (reported line 20)May include surrounding context.

sh
## 系统要求

- Linux 系统(Ubuntu/Debian 等)
- sudo 权限
- Trojan 服务器订阅(IP、端口、密码、SNI)

## 快速开始

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 · install.sh (reported line 93)May include surrounding context.

sh
## 系统要求

- Linux 系统(Ubuntu/Debian 等)
- sudo 权限
- Trojan 服务器订阅(IP、端口、密码、SNI)

## 快速开始

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 · install.sh (reported line 102)May include surrounding context.

sh
## 系统要求

- Linux 系统(Ubuntu/Debian 等)
- sudo 权限
- Trojan 服务器订阅(IP、端口、密码、SNI)

## 快速开始

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 · install.sh (reported line 103)May include surrounding context.

sh
## 系统要求

- Linux 系统(Ubuntu/Debian 等)
- sudo 权限
- Trojan 服务器订阅(IP、端口、密码、SNI)

## 快速开始

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 · install.sh (reported line 112)May include surrounding context.

sh
## 系统要求

- Linux 系统(Ubuntu/Debian 等)
- sudo 权限
- Trojan 服务器订阅(IP、端口、密码、SNI)

## 快速开始

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The quick-start instructions tell the user to execute an installation script with sudo, and elsewhere the README describes automatic installation and system configuration changes. While the file includes a legal-use disclaimer, it does not clearly warn users that the skill will modify system packages, service configuration, and proxy settings on the host.

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 · README.md (reported line 30)May include surrounding context.

运行安装脚本

chmod +x install.sh sudo ./install.sh

text

### 2. 配置 Trojan