T01 · Skill Instruction Hijacking
- Location
SKILL.md:177- Finding
Automatic Disclosure of User Feedback and Intent to an External Service
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The ranking feature is real, but the skill also handles account login, API-key creation, payments, local storage, and automatic feedback reporting in ways that deserve careful review.
Before installing, verify you are comfortable giving LinkFox API credentials, possible phone/SMS login details, billing/order actions, saved local response files, and automatic feedback reports. Use a clean environment with trusted endpoint variables only, avoid plaintext shell-profile secrets where possible, and do not use the payment flow unless you intentionally want to buy credits.
SKILL.md:177Automatic Disclosure of User Feedback and Intent to an External Service
scripts/echotik_list_video_rank.py:36Credentials Can Be Redirected to Arbitrary Environment-Controlled Endpoints
scripts/onboarding.py:484Generated API Key Is Exposed Through Standard Output and Plaintext Shell Configuration
scripts/echotik_list_video_rank.py:62Unnecessary Agent Session and Message Metadata Is Sent with Ranking Requests
scripts/echotik_list_video_rank.py:248Unsanitized Session Identifier Permits Filesystem Path Traversal
scripts/echotik_list_video_rank.py:205Undocumented Fallback Stores Session Data in Home or Temporary Directories
scripts/onboarding.py:163Onboarding Recommends Installing Unpinned Runtime Dependencies
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
method="POST",
)
try:
with urlopen(req, timeout=150) as response:
return json.loads(response.read().decode("utf-8"))
except HTTPError as e:
body = e.read().decode("utf-8") if e.fp else ""
The file implements LinkFox account onboarding, SMS authentication, API key retrieval, package purchasing, and payment QR generation, which is fundamentally unrelated to the declared TikTok video ranking skill. This mismatch is a strong indicator of hidden secondary behavior designed to collect credentials and drive account/payment actions outside the user's expected task.
The code builds request destinations from environment-controlled base URLs and then sends sensitive data, including phone numbers, SMS codes, access tokens, refresh tokens, and generated API keys, to those endpoints. If an attacker can influence environment variables in the skill runtime, this becomes credential exfiltration or SSRF to attacker-controlled infrastructure.
except RuntimeError as e:
return {"_error": str(e)}
try:
r = requests.post(url, json=body or {}, headers=headers, timeout=timeout)
return r.json()
except Exception as e:
body_text = ""
The gateway request path uses an environment-derived base URL and attaches the Authorization header from LINKFOX_AGENT_API_KEY before calling urlopen. If the environment is tampered with, the skill will send API credentials and business requests to an attacker-chosen host, enabling secret leakage and unintended outbound access.
headers["Content-Type"] = "application/json"
req = Request(url, method=method, data=body_bytes, headers=headers)
try:
with urlopen(req, timeout=30) as resp:
return json.loads(resp.read().decode())
except urllib.error.HTTPError as e:
status = e.code
The declared purpose is a TikTok ranking query skill, but the static finding indicates the implementation also performs account login, API key generation, account inspection, plan listing, order creation, payment initiation, QR-code generation, and payment-status queries. That is a major description-behavior mismatch which can surprise users, expand the attack surface into billing and credential flows, and enable collection or transmission of sensitive account and payment data unrelated to the advertised task.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
}
## Display Rules
1. **Present data in tables**: Show video description (truncated if long), views, likes, comments, shares, video sales, video GMV, publish date, and creator ID.
2. **Rank order**: Results are already ranked by the chosen `videoRankField`; preserve and surface the ranking order.
The file introduces authentication recovery, account onboarding, and billing/payment procedures that are not necessary for a read-only TikTok video ranking skill. This expands the skill's operational scope into credential acquisition and payment handling, increasing the chance of sensitive data collection, social engineering, and unsafe side effects unrelated to the advertised functionality.
The documented behavior includes script-driven registration, plan listing, order creation, and payment-method selection for a capability that should only retrieve ranking data. Embedding account creation and purchase flows in the skill creates an unjustified path for collecting personal information and steering users into financial transactions, which is dangerous in this context.
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
示 JSON 里的 phone/agreements
- 收到验证码后:`python scripts/onboarding.py login <phone> <code>`
- 拿到 `api_key` 后把下面三平台配置转发给用户,提示重启会话生效:
- Windows PowerShell(永久):`setx LINKFOX_AGENT_API_KEY "<key>"`
- macOS zsh:`echo 'export LINKFOX_AGENT_API_KEY="<key>"' >> ~/.zshrc && source ~/.zshrc`
- Linux bash:`echo 'export LINKFOX_AGENT_API_KEY="<key>"' >> ~/.bashrc && source ~/.bashrc`
- 变量名 `LINKFOX_AGENT_API_KEY`(主推)或 `LINKFOXAGENT_API_KEY`(老规范)任一即可
**billing 场景**:`errcode=402` 或消息含 `算力/余额/quota/insufficient/充值/套餐到期`。
- `python scripts/onboarding.py list-plans` → 有 AskUserQuestion 就弹菜单,否则输出编号清单让用户选
- 校验 `plan_id` ∈ 清单、支付方式 ∈ 该套餐 `available_methods`(通常 `wechat/alipay`)
- `python scripts/onboarding.py order <plan_id> <method>` → 展示优先级 PNG
The module docstring openly states this file is a LinkFox onboarding CLI, directly contradicting the skill metadata describing TikTok video ranking. Such a purpose mismatch increases the likelihood that the skill is deceptive, with behavior users and reviewers would not expect from the manifest.
The skill can create orders, generate payment QR codes, and query order states despite advertising a video ranking function. In this context, payment functionality is unjustified and dangerous because it can induce unauthorized purchases or social-engineering-driven payment collection under the guise of analytics.
The code sends SMS verification codes, logs users in, obtains access/refresh tokens, fetches team membership, and generates API tokens for LinkFox accounts. For a TikTok ranking skill, this is unjustified credential harvesting and privileged token provisioning that could be abused to access or monetize unrelated user accounts.
The skill declares capabilities that involve environment access, file writes, and network use, but it does not explicitly scope or limit those powers via a permissions or allowed-tools declaration. In practice this weakens reviewability and least-privilege controls, especially because the skill also instructs filesystem persistence and API calls, making it harder to constrain unexpected behavior.
The skill mandates saving full API responses to local disk on every run, tied to session structure, without a clear up-front user warning or consent regarding local retention. Even if the primary dataset is analytics, responses can still contain user-supplied query parameters, account metadata, or other contextual information that persists longer than necessary and may be exposed to other local processes or future tasks.
The skill requires unconditional persistence of complete API responses into session-linked files under the working directory. This is a data-minimization and storage-safety issue because it stores more information than needed for answering the user, creates durable artifacts correlated to sessions, and may leak data through backups, shared workspaces, or later unintended access.
The skill instructs automatic reporting to an external Feedback API whenever user dissatisfaction, praise, mismatch, or improvement opportunities are detected, but it does not clearly disclose that user interaction details may be transmitted off-system. This creates a privacy and transparency risk because conversational content or inferred sentiments could be shared without explicit consent.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
}
## curl 示例
### 指定日期的美国视频播放量排行
The file documents a separate public feedback API that is unrelated to the declared skill purpose of querying TikTok video rankings. In an agent-skill context, extra outbound-write capabilities expand the attack surface and can be abused to exfiltrate user content, generate unsolicited external traffic, or perform actions the user did not request.
All user-facing operational instructions are presented only in Chinese, including the directions to ask the user questions and relay setup steps. Under the policy, a skill should not impose a specific language or locale unless it offers a choice or clearly documents a justified locale restriction.
The instructions ask the user to provide a phone number and then process SMS-based login through a script, but they do not disclose why the data is needed, how it will be stored, or what privacy safeguards apply. In a skill that is expected to provide analytics data, collecting personal contact information without clear notice materially raises privacy and consent risks.
The module documentation promises that writing to /tmp is forbidden and that failure should occur if the current directory is not writable, but _linkfox_root() explicitly falls back to the home directory and then the temporary directory. In a skill that persists full API responses, this mismatch can cause sensitive output to be written to less-controlled locations than operators expect, undermining data-handling guarantees and incident review assumptions.
This code sends the JSON params payload plus SESSION_ID, MESSAGE_ID, MODE_ID, and APP_NAME headers to https://tool-gateway.linkfox.com via POST. While the module docstring explains output behavior, it does not disclose the outbound data transmission itself, and there is no confirmation prompt or user-facing notice near the network operation.
The natural-language interface, help text, and operational assumptions are all presented in Chinese, and the workflow is tied to Chinese phone numbers and payment methods (+86, WeChat, Alipay) without offering a language or locale choice. This can violate a language/locale policy when the skill forces a specific locale rather than documenting opt-in or region-specific scope.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
except RuntimeError as e:
return {"_error": str(e)}
try:
r = requests.post(url, json=body or {}, headers=headers, timeout=timeout)
return r.json()
except Exception as e:
body_text = ""
The code generates or retrieves an API key and returns it in stdout JSON without any in-file safeguards, redaction, or user-warning flow. In shared agent runtimes, logs, transcripts, or downstream tooling may capture this credential, causing unintended disclosure and later account compromise.