T07 · Tool Hijacking and Spoofing
- Location
SKILL.md:47- Finding
Execution of an Unverified Binary from a Predictable Temporary Path
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 47-48
Vulnerability Type: Untrusted executable path and local tool hijacking
Risk Level: Highbash pgrep -f mihomo_bin > /dev/null && return nohup /tmp/mihomo_bin -f /tmp/mihomo_config.yaml -d /tmp/mihomo_data > /tmp/mihomo.log 2>&1 &Technical Analysis
The Skill instructs the Agent to execute
/tmp/mihomo_binand consume/tmp/mihomo_config.yamlwithout verifying their origin, owner, permissions, signature, or cryptographic checksum. Predictable paths under/tmpare not appropriate trust boundaries for executable files or security-sensitive configuration because local users or previously executed processes may be able to create or replace them.The preliminary
pgrepcheck does not establish that a matching process is the expected binary. It only checks whether any process command line contains the selected name. The configuration can also affect proxy routing and traffic handling even if the executable itself is legitimate.Attack Path
- An attacker with local write access creates or replaces
/tmp/mihomo_binwith an executable payload. - The attacker optionally creates
/tmp/mihomo_config.yamlto redirect or inspect proxied network traffic. - A user invokes the stock-analysis Skill.
- The Agent follows the documented workflow and launches the attacker-controlled executable.
- The payload runs with the same operating-system privileges and access available to the Agent.
Impact Assessment
Successful exploitation permits arbitrary local code execution under the Agent's account. The payload could read files and environment variables accessible to that account, including API credentials such as
GLM_API_KEY; alter analysis results; tamper with proxied traffic; invoke additional processes; or modify writable project and user files. This does not independently grant elevated operating-system privileges, but ...[truncated 61 chars]- An attacker with local write access creates or replaces
- Remediation
View remediation
Remediation Suggestions
- Install Mihomo from a trusted, pinned release into an application-owned directory that is not writable by untrusted users, such as a restricted installation directory outside
/tmp. - Verify the binary against a pinned SHA-256 checksum or trusted signature before every execution.
- Verify that the binary and configuration are regular files, are not symbolic links, have the expected owner, and are not group- or world-writable.
- Store generated runtime files in a private directory created with restrictive permissions, such as mode
0700, and use unpredictable names. - Keep the proxy configuration in an application-controlled path with restrictive permissions.
- Replace the process-name test with PID tracking and executable identity verification.
- Fail securely if any ownership, permission, path, or integrity validation fails.
- Install Mihomo from a trusted, pinned release into an application-owned directory that is not writable by untrusted users, such as a restricted installation directory outside
