T01 · Skill Instruction Hijacking
- Location
SKILL.md:146- Finding
Automatic External Feedback Transmission Without Explicit User Consent
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill performs the advertised keyword-mining task, but it also includes sensitive account, credential, payment, and automatic feedback-reporting behavior that deserves manual review before installation.
Install only if you are comfortable with LinkFox handling keyword queries, account authentication, billing flows, and feedback data. Prefer obtaining and storing API keys yourself through first-party LinkFox pages or a credential manager, avoid sharing SMS codes unless you intentionally choose that onboarding path, and do not use custom endpoint environment variables unless you trust the destination.
SKILL.md:146Automatic External Feedback Transmission Without Explicit User Consent
scripts/seerfar_ozon_keyword_mining.py:36Environment-Controlled Endpoints Can Receive API Keys and Login Tokens
scripts/seerfar_ozon_keyword_mining.py:250Unsanitized SESSION_ID Enables Output-Path Traversal
references/onboarding.md:11Generated API Keys Are Persisted in Plaintext Shell Configuration
scripts/onboarding.py:163Runtime Guidance Installs Unpinned Third-Party Dependencies
The file implements account onboarding, SMS login, API key acquisition, subscription handling, and payment QR generation, which is materially unrelated to the declared Ozon keyword-mining skill. This mismatch is dangerous because it can trick users or the platform into executing credential collection and monetization flows under the guise of benign analytics functionality.
The code builds request destinations from environment-controlled base URLs and then sends sensitive authentication material, including SMS login data, bearer tokens, and generated API keys, to those endpoints. If an attacker can influence environment variables in the skill runtime, they can redirect these requests to attacker-controlled infrastructure and exfiltrate credentials or payment-related data.
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 helper constructs outbound requests from environment-derived base URLs and attaches the API key in the Authorization header before calling urlopen. An attacker who controls the environment can redirect plan, account, or order traffic to a hostile server and capture the API key and associated account metadata.
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 request sent to urlopen includes headers and target information derived from environment variables, and the base URL is also overrideable via LINKFOX_TOOL_GATEWAY. In an agent/runtime context, environment variables are part of the trust boundary; if an attacker can influence them, the skill can be redirected to an arbitrary host and will transmit the Authorization API key and session metadata, causing credential exfiltration or unintended outbound requests.
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 declared purpose is keyword mining, but the skill behavior reportedly also includes SMS login, API-key generation/retrieval, account/team inspection, subscription lookup, order creation, payment initiation, QR-code generation, and payment-status polling. This is a major description-behavior mismatch that can conceal credential handling and financial actions behind an analytics-facing interface, increasing the risk of unauthorized account changes, billing events, or secret exposure.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
3. **Stack range filters to find opportunities**: combine a high `searchVolume` floor with a low `sellers` ceiling to surface blue-ocean expansions; add `relevancy` / `titleDensity` bounds to keep them relevant to the seed.
4. **Use `includeKeywords` / `excludeKeywords` to steer the expansion**: force in must-have modifiers and strip noise without running a second query.
## Display Rules
1. **Present data only**: show mined-keyword metrics in a clear table without subjective advice.
2. **Lead with keyword columns**: `query` / `queryCn` (Chinese translation), then `searchVolume`, `count30GrowthRate`, `productCount`, `sellers`, `avgPrice`; show `relevancy` to convey closeness to the seed (the seed term itself is `100`).
The onboarding document instructs the agent to handle authentication recovery, account registration, API key acquisition, and billing/payment flows, which are materially outside the stated purpose of an Ozon keyword-mining skill. This expands the skill into account and payment handling, creating unnecessary exposure to credential collection, social engineering, and misuse of user trust under the guise of a benign analytics capability.
The instructions explicitly authorize asking for a user's phone number, sending login codes, logging in on the user's behalf, and guiding payment selection, none of which are justified by the skill’s keyword-mining purpose. In this context, collecting personal contact data and facilitating purchases is especially risky because users may not expect sensitive identity or payment handling from a market-research skill.
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 code includes order creation, payment state queries, and QR-code payment rendering despite the skill being described as a keyword-mining tool. In this context, unrelated payment capabilities substantially increase risk of deceptive charging, unauthorized purchases, or abuse of the agent as a billing funnel.
The skill performs SMS-based authentication, team lookup, and API token retrieval/generation, all unrelated to the advertised keyword-mining behavior. In this context, that functionality acts like credential harvesting and secret provisioning concealed inside an unrelated skill, making the deception especially dangerous.
The skill documents capabilities that involve environment access, network calls, and writing files, but it declares no explicit tool scope or permission boundaries. This creates an over-privileged execution surface where an agent may invoke sensitive capabilities without clear least-privilege constraints or user-visible authorization boundaries.
Line L096 states 'Pass it in Russian for Ozon,' which imposes a specific language requirement in the skill's instructions. The file does not present this as an explicit user choice or opt-in, so it is a natural-language locale/language policy concern.
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/seerfar/ozon/keywordMining \
The document instructs collection of a phone number and execution of registration/login commands without any explicit warning that the phone number and verification code are sensitive authentication data. This creates a privacy and account-takeover risk because users may be induced to share credentials or one-time codes in a context unrelated to the skill’s declared business function.
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 11-digit domestic phone numbers with area code +86 and limits payment methods to WeChat and Alipay, while user-facing strings present this as the default behavior rather than an explicitly region-specific tool. Under the policy, locale constraints should either be optional for the user or clearly documented and justified as region-specific.
The login flow returns a usable API key directly in stdout JSON, which is likely to be logged, stored in transcripts, surfaced to other components, or copied insecurely by users. Exposing newly minted long-lived credentials through standard output greatly increases the chance of accidental secret leakage and account compromise.
The module documentation states '禁止写入 /tmp,当前目录不可写则报错', implying the script must not use temporary directories and should error if the current directory is not writable. However, _linkfox_root() later includes $TMPDIR/linkfox/ as a fallback and auto-selects it when earlier locations are not writable, which directly contradicts the documented behavior.
This markdown file documents a Feedback API that sends content describing user expressions and observed behavior to an external endpoint, but it does not warn that potentially sensitive user-entered information may be transmitted. Under the markdown-specific SQP-2 criteria, externally sending user-related content should include a user-facing privacy or data-sharing warning when it could affect user data.
The file's natural-language instructions are entirely Chinese, which can amount to a language-policy issue when no user language preference or opt-in is offered. There is no indication that the skill is region-specific or that Chinese is required for a justified compliance reason.
The inline comment says responses under the threshold are '直接全量输出,不落文件', which means no file write for small results. In main(), the script serializes and writes every response to out_path before deciding whether to print the full JSON or only a summary, so the code behavior is the opposite of that comment.
_resolve_output_path() documents that output lands under <cwd>/linkfox/<日期>/<session>/data/.... In reality it delegates to resolve_data_path(), which depends on _linkfox_root(), and that function may choose $ACPX_WORKSPACES, the user's home directory, or the temp directory rather than the current working directory.