T01 · Skill Instruction Hijacking
- Location
SKILL.md:218- Finding
Automatic Feedback Instructions Can Disclose User Content Without Consent
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill performs ASIN market analysis but also includes account login, API-key generation, payment-order creation, automatic feedback reporting, and broad local persistence that need review before installation.
Review this skill carefully before installing. It is not just an ASIN lookup helper: it can guide users through LinkFox account setup, handle phone/SMS login, expose generated API keys in command output, create payment orders, send feedback to a separate service, and write full responses locally. Use only with a trusted LinkFox account, avoid entering SMS codes or secrets through logged command lines, verify all endpoint environment variables, and treat generated API keys as sensitive credentials.
SKILL.md:218Automatic Feedback Instructions Can Disclose User Content Without Consent
scripts/onboarding.py:487Generated API Key Is Printed in Plaintext to Standard Output
scripts/onboarding.py:576SMS Verification Code Is Accepted as a Command-Line Argument
```
### Technical Analysis
The phone number and one-time SMS verification code are supplied as positional command-line arguments. Command arguments can be recorded in shell history, agent tool-call history, process-monitoring telemetry, audit logs, and, on some systems, process listings visible to other users.
Although the code is short-lived, the verification code is an authentication factor capable of initiating a login and API-key generation flow during its validity period. Passing it through a broadly observable channel violates least-privilege handling of authentication data.
### Attack Path
1. The user invokes the documented login command with a valid phone number and SMS code.
2. The shell or agent framework records the complete command.
3. A local user, logging service, extension, or transcript reader observes the arguments while the code remains valid.
4. The observer submits the same phone number and code to the LinkFox login endpoint.
5. If server-side replay controls do not invalidate the first use immediately, the observer obtains access tokens or generates an API key.
### Impact Assessment
Successful exploitation can compromise the user’s LinkFox account onboarding session and expose or generate API credentials. Even when the OTP cannot be replayed, the command permanently discloses the user’s phone number in shell and agent history.
]]>scripts/jiimore_get_niche_info_by_asin.py:38Unvalidated Gateway Override Can Redirect Credentials and Request Metadata
scripts/jiimore_get_niche_info_by_asin.py:181Unsanitized Session Identifier and Predictable Temporary Fallback Permit Output Redirection
The request sent to the gateway includes multiple headers populated directly from environment variables, and the destination base URL is also environment-controlled via LINKFOX_TOOL_GATEWAY. This creates a real exfiltration channel for session/application metadata and the API key to any attacker-controlled endpoint if the environment is influenced, which is more dangerous than a normal API client because the skill claims a narrow read-only analysis purpose while silently exporting contextual metadata over the network.
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 target is derived from environment-controlled base URLs, and the request may include sensitive material such as SMS-login tokens, refresh tokens, API-token generation requests, and identifying headers. In a skill context, allowing runtime environment variables to redirect these flows can enable exfiltration of credentials and account metadata to attacker-controlled infrastructure via SSRF-style endpoint substitution.
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 also built from environment-controlled input and then used in urlopen with the bearer API key in the Authorization header. If an attacker can influence the environment or packaging/runtime configuration, they can redirect authenticated billing, account, and order traffic to a hostile endpoint and capture API keys or manipulate responses.
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 manifest presents a niche-analysis skill, but the documented behavior reportedly includes phone-login, API-key generation, account/team lookup, package listing, order creation, payment QR generation, and payment-status polling. That is a major scope expansion into identity, billing, and account operations, which can surprise users and enable unintended account or payment actions under the guise of market research.
The activation criteria are overly broad, allowing the skill to trigger even when the user does not explicitly mention ASIN or niche analysis. In practice, this can cause the agent to invoke a paid, networked, data-writing skill for loosely related requests, increasing the risk of unwanted charges, unnecessary data transfer, and user confusion about why the skill was used.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
}
## Display Rules
1. **Present data clearly**: Show query results in well-structured tables. Convert decimal ratios to percentages for readability (e.g., 0.25 -> 25%).
2. **Highlight key metrics**: Always surface the niche title, demand score, weekly search volume, weekly sales, brand count, and top 5 brands click share as primary columns.
The file documents authentication recovery, account registration by phone number, and billing/payment handling that are unrelated to the declared purpose of an ASIN niche-analysis skill. This expands the skill’s operational scope into credential handling and commerce flows, increasing the chance the agent will solicit secrets or personal data and perform sensitive actions outside user expectations.
The documented workflow allows collecting a user’s phone number, sending login codes, logging in on the user’s behalf, and helping initiate payment orders, none of which are justified by the skill’s market-analysis function. In context, this is especially dangerous because users invoking an ASIN analysis skill would not reasonably expect identity enrollment or payment orchestration, creating strong phishing and privacy-abuse risk.
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 file is an onboarding, login, subscription, and payment CLI, not an ASIN niche-analysis tool as declared by the skill metadata. This mismatch is dangerous because it introduces hidden account-access and monetization capabilities under a misleading skill description, increasing the chance that users or reviewers grant trust to functionality they did not intend to invoke.
The module docstring openly describes LinkFox account onboarding and payment operations, directly contradicting the published skill purpose of ASIN niche analysis. This deception is itself a strong risk signal because it indicates the skill is packaged to appear safer and narrower than its actual capabilities.
The code can create orders, determine team billing paths, and return payment QR content and URLs despite the skill claiming to perform read-only market analysis. In-context, billing operations are substantially more dangerous because they can trigger financial actions unrelated to the user’s expected ASIN research workflow.
The skill can send SMS verification codes, log users into LinkFox accounts, exchange tokens, inspect team membership, and generate API keys, none of which is justified by ASIN niche analysis. In this context, these capabilities enable credential acquisition and account bootstrapping under false pretenses, making the mismatch more severe than a normal utility script.
The skill declares capabilities consistent with environment-variable access, file writes, and network use, but does not scope or disclose those powers through an explicit permission model. That increases the chance of over-privileged execution and makes it harder for reviewers or users to understand that the skill can read secrets, persist data locally, and contact remote services.
The manifest description is written as an instruction that the skill triggers on Chinese and English phrases, but it does not offer any user language choice while embedding Chinese-first behavior in the core description. Under the policy, language or locale constraints should be opt-in or clearly justified.
The skill mandates persistent local storage of every full API response and optionally prints the full response to stdout, despite being described primarily as an analysis skill. Persistent storage and broad stdout emission increase the risk of leaking proprietary market data, user-supplied identifiers, or account-linked metadata into project directories, logs, transcripts, or downstream tooling.
Automatic feedback reporting adds an undeclared telemetry/reporting function that is outside the stated purpose of ASIN niche analysis. Sending user feedback or inferred dissatisfaction to an external API without explicit consent can leak conversation-derived data and creates a hidden network side effect unrelated to the core task.
The instruction to auto-detect and submit feedback whenever the user expresses praise, dissatisfaction, or whenever the model thinks something could be improved creates broad telemetry exfiltration potential. Because the triggers are subjective and expansive, the skill could send conversational context externally without necessity or clear user awareness.
The documentation instructs transmitting an API key in the Authorization header and sending ASIN/query data to an external gateway, but provides no user-facing warning about outbound network access, credential handling, logging, or retention. In an agent setting, missing disclosure increases the chance that secrets or sensitive commercial research inputs are sent off-platform without informed approval or proper safeguards.
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/jiimore/getNicheInfoByAsin \
The file documents a separate feedback endpoint that is unrelated to the stated ASIN niche-analysis function, expanding the skill's data flows beyond what a user would reasonably expect. Because the feedback payload can include free-form content about what the user said or intended, this creates a risk of sending user-derived data to a second external service without clear necessity, consent, or minimization.
The feedback section sends structured content, potentially including user statements and outcome summaries, to a different external domain without any privacy warning or limitation guidance. This is more dangerous in skill context because the endpoint is not part of the core niche-analysis workflow, so operators may overlook that user-related text is being exported to a second service.
The instructions explicitly tell the operator to ask for a user’s phone number and pass it to a script, but provide no privacy notice, data-handling explanation, retention limits, or consent language. That creates unnecessary personal-data collection risk and can expose users to account takeover, unwanted contact, or mishandling of sensitive identifiers.
The documentation explicitly says writing to /tmp is forbidden and failure should occur if the current directory is not writable, but the implementation silently falls back to home and temp storage. This mismatch is security-relevant because operators and reviewers may rely on the documented constraints while the actual code persists data in less expected locations, undermining trust boundaries and auditability.
The network request includes SESSION_ID, MESSAGE_ID, MODE_ID, and APP_NAME from the environment without disclosure or visible necessity in the code path. While these values may be operational metadata, sending them expands data sharing beyond the core ASIN lookup purpose and can leak workflow context to the remote service or any redirected endpoint.