T01 · Skill Instruction Hijacking
- Location
SKILL.md:155- Finding
Automatic Third-Party Feedback Reporting Without Explicit User Consent
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill mostly implements Shopee logistics, but it needs Review because it also handles credentials and billing, stores sensitive logistics data locally, allows endpoint overrides, and asks the agent to send automatic feedback to LinkFox.
Install only if you are comfortable giving this skill access to live Shopee logistics actions and LinkFox account credentials. Before use, verify all LINKFOX_* gateway URL environment variables point to trusted LinkFox HTTPS domains, avoid sharing SMS codes or API keys in agent-visible transcripts, require explicit confirmation before shipping, deleting, or pausing anything, and periodically delete or protect the local linkfox response files that may contain customer or store data.
SKILL.md:155Automatic Third-Party Feedback Reporting Without Explicit User Consent
scripts/_shopee_logistics_common.py:179Unsafe Persistent Storage of Complete Logistics Responses
scripts/onboarding.py:468Generated API Key Is Exposed Through Standard Output
scripts/_shopee_logistics_common.py:17Environment-Controlled Gateway URLs Can Redirect Credentials and Logistics Data
The request destination and several outbound headers are influenced by environment variables, including the base URL and session/message metadata, and the Authorization API key is always sent to that destination. If an attacker can control LINKFOX_TOOL_GATEWAY/SHOPEE_API_BASE_URL or the runtime environment, they can redirect traffic and exfiltrate credentials and sensitive store data to an arbitrary server.
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 code allows base URLs for login and agent-user API calls to be overridden via environment variables, then sends sensitive data such as phone numbers, SMS codes, access tokens, refresh tokens, and generated API keys to those URLs. If an attacker can influence the runtime environment, they can redirect requests to attacker-controlled endpoints and exfiltrate credentials or impersonation tokens; this is especially dangerous because the file performs account login and token issuance flows.
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 URL is derived from environment variables and used in urllib requests carrying the Authorization API key header and business actions such as account lookup, plan retrieval, and order creation. An attacker who can set the environment can redirect these authenticated requests to a malicious server, stealing the API key and capturing or manipulating purchase/order traffic.
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 description claims this skill handles Shopee logistics and forwards a full set of Shopee Open API Logistics endpoints. However, the provided code chunk does not perform any logistics operations at all. It neither calls /shopee/developerProxy nor implements any endpoint wrappers like ship_order, get_tracking_number, or shipping-document functions. Its sole purpose is to detect whether the authentication dependency skill is installed by scanning environment-configured and common local skill directories. This is a materially different primary purpose from the declared logistics functionality, so the description does not accurately represent the supplied code chunk.
The declared description is about Shopee logistics and fulfillment operations for authorized Shopee stores, specifically forwarding Shopee Open API Logistics endpoints. The supplied code does none of that. There are no Shopee endpoints, no developerProxy usage, no logistics/shipping operations, no order fulfillment actions, no tracking or shipping document handling. Instead, the code is a standalone LinkFox onboarding CLI centered on phone-based authentication, account/team lookup, API token generation, subscription/package purchase, payment QR generation, and order status checks. This is a materially different primary purpose and accesses entirely different services/resources, so the description does not accurately represent the code.
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
This file implements LinkFox onboarding, SMS login, API-key issuance, subscription browsing, order creation, and payment QR generation, which is materially unrelated to the declared Shopee logistics purpose. The mismatch increases risk because a user invoking a Shopee shipping skill would instead be funneled into account bootstrap and monetization flows that can collect credentials and trigger external payments.
The code contains explicit account provisioning and billing behavior, including API token generation and paid order flows, despite the skill being described as a Shopee logistics tool. In context, this unjustified capability expansion is dangerous because it can coerce users into revealing login codes and purchasing services unrelated to the requested logistics task.
The skill declares capabilities that include environment access, file writing, network access, and shell execution, but does not define an explicit tool scope or permission boundary. In a skill that can touch store logistics and local files, the lack of least-privilege constraints increases the risk of unintended data access, persistence, or command execution if the implementation or future revisions are abused.
The trigger conditions are very broad and activate even when users do not explicitly mention logistics, as long as a message is interpreted as related to shipping or tracking. Overbroad activation can cause the wrong skill to run on sensitive commerce conversations, increasing the chance of unintended API calls, data disclosure, or writes to disk.
The skill instructs that full API responses should always be written persistently to local files. Logistics responses can contain tracking numbers, addresses, recipient details, shop identifiers, and other operational data, so unconditional persistence increases exposure and retention risk beyond the immediate task.
Always persisting complete API responses into session-scoped local files can retain sensitive store and customer logistics data such as addresses, phone numbers, tracking details, and shipping documents. Because the retention is automatic and tied to the working directory, other tools, users, or later tasks may access that data unintentionally, making the skill context more dangerous than a transient in-memory workflow.
This documentation exposes a broad set of state-changing logistics operations, including shipping orders, updating addresses, deleting configuration, and downloading shipping documents, but does not clearly warn that these actions can modify live store state or disclose sensitive business/customer data. In an agent skill context, missing guardrails increases the chance that an LLM or user invokes destructive or privacy-impacting actions without confirmation or scope validation.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
export KEY=$LINKFOX_AGENT_API_KEY
The file’s instructional content and headings are presented only in Chinese, which effectively forces a specific language for users of the skill. The policy allows fixed-language behavior only when user choice is offered or the locale restriction is explicitly documented and justified, neither of which appears here.
The file presents key usage instructions and parameter explanations in Chinese, with no indication that the user may choose another language and no documented justification for a locale-specific restriction. The policy requires avoiding forced language or locale constraints unless the skill offers opt-in or clearly states a justified regional scope.
The manifest describes this skill as handling Shopee logistics/shipping operations such as shipping parameters, shipping documents, tracking, channel lists, and READY_TO_SHIP fulfillment. This file documents a delete_address capability that deletes an address, which is not mentioned in the manifest description and is not an obvious fit for the listed shipping-document/tracking-focused examples.
The document exposes a destructive delete operation with no warning about irreversibility, required identifiers, or user-confirmation safeguards. In an agent setting, this increases the risk of accidental or prompt-induced deletion of shipping addresses, which can disrupt fulfillment operations and be abused for operational sabotage if the agent invokes it without clear consent.
The documentation exposes a destructive delete operation ('delete_special_operating_hour') but does not warn that it removes scheduling data or recommend confirmation before execution. In a logistics skill that operates on authorized Shopee stores, this increases the chance of accidental or socially engineered deletion of store operating-hour configuration, which can disrupt fulfillment workflows.
This documentation exposes a batch shipment operation that can change many orders to a shipped state, but it does not warn users that the action may be irreversible or operationally sensitive. In the context of a logistics skill that targets authorized Shopee stores and supports mass shipping, missing safety guidance increases the risk of accidental bulk fulfillment, incorrect tracking creation, and downstream business/customer impact.
This documentation exposes a state-changing logistics API that can pause shipping operations, but it does not warn users that invoking it alters operational state and may disrupt fulfillment. In an agent context, insufficient emphasis on side effects increases the chance of accidental invocation or socially engineered misuse against an authorized shop.
The documentation exposes a real-world order-shipment action ('ship_order') and explicitly instructs callers to pass through the full request body, but it provides no warning that invoking this endpoint can trigger irreversible fulfillment operations in Shopee. In an agent setting, that omission increases the chance that the model or user invokes the action casually or with incomplete confirmation, causing unintended shipment, label generation, or downstream logistics state changes for a live store.
The documentation content and field descriptions are written in Chinese throughout the main usage section, with no indication that the skill supports other languages or that Chinese is a documented regional requirement. This creates a natural-language locale constraint that can violate organizational language-choice policies when users are not given an explicit opt-in.
The skill documentation is written in Chinese for headings, field descriptions, and usage notes, with no indication that users may choose another language or that the skill is intended only for a Chinese-language audience. This can violate a language/locale policy when skills impose a specific language without user opt-in.
The onboarding instructions explicitly tell the operator to collect a user's phone number and pass it to a local script for registration, but provide no privacy notice, consent guidance, retention limits, or data-handling constraints. In an agent-skill context, this increases the chance that sensitive personal data is solicited and processed in an ad hoc way, which can expose users to privacy violations, regulatory risk, or mishandling of SMS-based authentication data.
No suspicious patterns detected.