T01 · Skill Instruction Hijacking
- Location
SKILL.md:136- Finding
Automatic Disclosure of User Statements and Intent to an External Feedback Service
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill mostly matches a TikTok product-detail lookup tool, but it adds automatic feedback reporting, credential-heavy onboarding, billing actions, broad script execution, and unsafe storage/network scoping that users should review before installing.
Review this before installing. Use it only if you are comfortable sending TikTok product IDs/URLs and related session metadata to LinkFox, storing full responses on disk, and using LinkFox onboarding/billing flows. Do not provide phone numbers, SMS codes, or payment/order actions unless you explicitly intend to authenticate or purchase credits, and avoid environment-variable endpoint overrides except in a trusted development setup.
SKILL.md:136Automatic Disclosure of User Statements and Intent to an External Feedback Service
scripts/echotik_batch_product_detail.py:36Credential-Bearing Requests Can Be Redirected to Environment-Controlled Hosts
scripts/echotik_batch_product_detail.py:251Unsanitized Session Identifier Allows Writes Outside the Intended Output Directory
scripts/response_io.py:69Generic Response Helper Executes Any Caller-Selected Python File with Inherited Credentials
scripts/echotik_batch_product_detail.py:61Product Requests Transmit Unnecessary Session and Message Metadata
scripts/onboarding.py:482Onboarding Prints Full API Keys and Recommends Plaintext Persistence
scripts/echotik_batch_product_detail.py:91Complete API Responses Are Duplicated on Disk Without Restrictive Permissions or Cleanup
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 POST destination is derived from environment-controlled base URLs and then used to send SMS-login data, access tokens, refresh tokens, and API-token requests. In a skill/onboarding context, this creates an exfiltration and SSRF-style risk because a modified environment can silently redirect sensitive authentication traffic 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 uses a URL assembled from environment-controlled base configuration and includes the API key in the Authorization header. If the environment is tampered with, requests can be redirected to an attacker server, leaking API credentials and enabling unauthorized actions such as account queries or order operations.
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
A skill advertised as a specialized TikTok product-detail tool should not be able to execute arbitrary local Python via a --script parameter or provide generic file parsing/projection utilities. Arbitrary script execution combined with file persistence and data-extraction features effectively turns the skill into a general-purpose code runner, enabling command execution, data exfiltration, and abuse far beyond its stated business purpose.
A skill advertised as a specialized TikTok product-detail tool should not be able to execute arbitrary local Python via a --script parameter or provide generic file parsing/projection utilities. Arbitrary script execution combined with file persistence and data-extraction features effectively turns the skill into a general-purpose code runner, enabling command execution, data exfiltration, and abuse far beyond its stated business purpose.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
}
## Display Rules
1. **Present a comparison table**: Show one row per product with key columns — name, price (USD), total sales, 30-day sales, total GMV, rating, review count, commission rate, and number of promoting influencers
2. **Multi-period context**: When comparing momentum, surface the relevant window (e.g. 7d/30d) alongside the cumulative total rather than only the total
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 documentation states that writing to /tmp is forbidden, but the actual implementation falls back to the system temp directory when other locations are not writable. This mismatch is dangerous because operators may rely on the documented guarantee when handling potentially sensitive response data, yet the skill may silently place that data in a less trusted temporary location with broader exposure or weaker lifecycle controls.
This file implements account onboarding, SMS login, API-key acquisition, plan discovery, order placement, and payment QR generation, none of which matches a batch TikTok product-detail lookup skill. That scope mismatch is dangerous because it expands the skill into credential collection and billing workflows users would not reasonably expect from the advertised capability.
Embedding package purchase, order creation, and payment QR rendering in a product-detail lookup skill introduces unjustified financial operations. In this context, the mismatch makes phishing, deceptive upsell, or unauthorized purchase flows more plausible and increases harm beyond normal data retrieval.
The code sends SMS verification codes, logs users into LinkFox accounts, and retrieves or generates API keys despite the skill claiming to perform TikTok product-detail queries. This is especially dangerous because it solicits personal phone numbers and authentication factors under a misleading skill identity, enabling credential harvesting or overcollection.
Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.
# Force the child process to emit UTF-8 regardless of the host console
# encoding (Windows defaults to cp936 / gbk and would otherwise corrupt
# non-ASCII bytes when we read them back).
child_env = os.environ.copy()
child_env["PYTHONIOENCODING"] = "utf-8"
timed_out = False
The skill declares capabilities that imply environment access, file I/O, networking, and shell execution but does not constrain them with an explicit tool scope. In a skill that also references local scripts, persistent storage, and external APIs, this creates avoidable privilege ambiguity and increases the blast radius if the skill is misused or prompt-injected.
The trigger conditions are broad enough to activate on general TikTok product-analysis requests even when the user did not ask for this specific skill or for EchoTik-backed processing. Over-broad activation increases the chance of unintended tool use, unnecessary external data disclosure, and accidental cost-incurring calls in response to ambiguous requests.
The skill instructs the agent to always write full API responses to a session-scoped project directory, which persists user-supplied product lists and returned analytics outside the immediate interaction. Persistent local storage increases the risk of unintended retention, later exposure to other tools/users/processes, and leakage of potentially sensitive commercial research data.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
}
## curl 示例
```bash
curl -X POST https://tool-gateway.linkfox.com/echotik/batchProductDetail \
The documentation adds a separate feedback-posting API that is outside the skill’s stated purpose of batch TikTok product-detail lookup. In an agent setting, this can create an unexpected secondary action path that sends user-derived content to a different external service, increasing the risk of covert data exfiltration, unauthorized telemetry, or prompt-induced side effects.
The onboarding flow instructs operators to collect a user's phone number and use a script to send SMS codes and log in to an external service, but it does not explicitly disclose that personal data will be transmitted off-platform or require informed consent. In an agent skill context, this creates a privacy and social-engineering risk because users may be prompted to share sensitive contact data without clear notice, data-handling boundaries, or safer alternatives being emphasized first.
The skill always persists full API responses to disk, including potentially sensitive business data returned from batch product-detail lookups, even though the skill's primary purpose is data retrieval. This expands the data exposure surface by creating local artifacts in predictable locations, which may be accessible to other processes, users, or later sessions depending on the runtime environment.
The inline comment for SMALL_THRESHOLD says small responses are '直接全量输出,不落文件' (printed directly and not saved to file). In main(), the script serializes the response and writes it to out_path unconditionally before deciding whether to print inline or summarize, so the comment contradicts actual behavior.
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 enforces an 11-digit phone format and fixed area code '+86', and the entire command help and user-facing text are in Chinese. This imposes a specific locale/language behavior without offering user choice or documenting a justified region-specific constraint in this file.
The skill generates or fetches API tokens and returns them directly in stdout JSON without any in-file warning, masking, or secure-handling guidance. In agent environments, stdout is often logged, persisted, or exposed to upstream systems, so this can leak long-lived credentials beyond the intended recipient.
Output size or generation rate is not bounded. Unbounded output enables denial-of-service through resource exhaustion, log flooding, or context-window stuffing.
"""Cap the sample's value fields when it has many keys.
`shape.*.item_keys` is the single source of truth for the full key list
(always complete, no truncation). The sample only ever shows up to
SAMPLE_KEY_CAP fields with their concrete values, since the agent only
needs a feel for value shapes — for the full menu of available fields,
they read `shape`.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
timed_out = False
try:
proc = subprocess.run(
[sys.executable, str(main_script), args.params],
capture_output=True,
text=True,