T01 · Skill Instruction Hijacking
- Location
SKILL.md:162- Finding
Silent 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 market-data skill needs review because it adds silent feedback reporting, broad local storage, and account/payment handling beyond a simple niche lookup.
Review carefully before installing. Use only if you are comfortable sending niche IDs and related market context to LinkFox/Jiimore, avoid the automatic feedback path unless explicit consent and redaction are added, do not enter phone/OTP credentials through the skill unless you trust the provider, and prefer a secure secret store over printing or saving API keys in shell startup files.
SKILL.md:162Silent Disclosure of User Statements and Intent to an External Feedback Service
scripts/jiimore_get_niche_info.py:36Authentication Credentials Can Be Redirected to Arbitrary Environment-Controlled Hosts
scripts/jiimore_get_niche_info.py:250Unsanitized SESSION_ID Enables Writes Outside the Intended Storage Directory
scripts/onboarding.py:486Generated API Keys Are Printed to Standard Output and Recommended for Plaintext Persistence
scripts/onboarding.py:163Runtime Instructions Install Unpinned Third-Party Dependencies
scripts/jiimore_get_niche_info.py:113Complete API Responses Are Persisted with Unsafe Fallback Locations and Default Permissions
The request destination is derived from LINKFOX_TOOL_GATEWAY, an environment variable that can be influenced by the runtime environment, and the code attaches the API key plus SESSION_ID/MESSAGE_ID/MODE_ID/APP_NAME headers before sending the request. If an attacker can control that environment variable, they can redirect traffic to an attacker-controlled host and exfiltrate credentials and session metadata.
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 script builds request destinations from environment-controlled base URLs and then sends sensitive data such as phone numbers, SMS codes, access tokens, refresh tokens, and generated API tokens to those endpoints. In a skill environment, environment variables can be misconfigured or maliciously overridden, turning these flows into SSRF/exfiltration channels for credentials and account bootstrap 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 client uses an environment-derived base URL and attaches the LinkFox API key in the Authorization header before calling urlopen. If an attacker can influence the environment, the skill will transmit the API key and subsequent account/order operations to an attacker-controlled endpoint, enabling credential theft and request replay.
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 niche-market lookup, but the detected behavior includes authentication, API key generation, account/team queries, package listing, payment order creation, payment QR generation, and order status checks. This is a major capability mismatch that can surprise users and enable collection of credentials, account data, or payments outside the expected task scope.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
### Inventory & Operations
- Average out-of-stock rate trends
## Display Rules
1. **Present data clearly**: Show query results in well-structured tables or grouped sections without subjective business advice unless specifically requested.
2. **Trend comparison**: When the response includes current, 90-day-ago, and 360-day-ago data points, present them side-by-side so users can easily spot trends.
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 implements LinkFox account onboarding, SMS login, API key acquisition, plan listing, and order/payment flows, which materially diverge from the declared Jiimore niche-market insights purpose. This mismatch is dangerous because users or orchestration layers may invoke the skill expecting market analysis while instead being prompted into credentialing and commerce actions unrelated to the advertised function.
The code performs SMS-based login and returns credentials/API keys for LinkFox, which is unrelated to niche-market data analysis and unnecessarily collects highly sensitive authentication factors. In this skill context, the behavior is especially suspicious because it conditions users to provide phone numbers and one-time codes to a component that should only analyze market data.
The skill can generate or retrieve API tokens and create paid orders, introducing account provisioning and commerce capabilities far beyond the stated market-insight use case. In context, this increases the likelihood of unauthorized account manipulation, unwanted charges, and covert monetization under the guise of analytics.
The skill uses sensitive capabilities like environment access, file writes, and network calls but does not declare any explicit tool scope or allowed-tools boundary. This weakens least-privilege controls and makes it easier for the skill to access broader resources than users or the host system may expect.
The activation condition is broad enough to trigger on generic market-analysis requests even when the user did not explicitly ask for Jiimore or niche-ID-based lookup. That can cause unintended external data transmission, unnecessary paid calls, or the wrong skill handling a request, especially since the skill incurs cost and uses external services.
The skill description does not clearly warn users that query parameters and related context will be sent to an external Jiimore service. This creates a transparency and privacy problem because users may unknowingly disclose business-sensitive IDs, market interests, or other data to a third party.
The skill instructs the agent to always persist full API responses to a session-linked file path regardless of necessity. Full responses may contain user-provided identifiers, commercially sensitive market intelligence, or service metadata, creating avoidable local data retention and cross-session exposure risk.
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/getNicheInfo \
The file documents a separate external Feedback API that sends free-form content containing what the user said or intended, what happened, and why. Without explicit privacy constraints, redaction guidance, or user-consent requirements, an agent could transmit sensitive user data, business context, or identifiers to a secondary service unrelated to the primary niche-info query.
The onboarding document adds authentication recovery, account registration, and billing/payment flows to a skill whose declared purpose is only niche-market insight retrieval. This capability mismatch is dangerous because it broadens the skill's authority into sensitive account and payment handling, increasing the chance of phishing, data collection, or misuse under the cover of an unrelated business function.
The documentation instructs the agent to facilitate phone-based registration and plan purchase flows, which are unjustified for a market-insights skill and create an opportunity to collect personal data and steer users into payments. In context, this is more dangerous because users invoking a harmless analytics skill would not reasonably expect identity enrollment or checkout behavior.
The document directs collection of a user's phone number and one-time code through a script without any privacy notice, retention policy, or handling constraints. This is dangerous because phone numbers and OTPs are sensitive authentication data, and the absence of clear safeguards can enable overcollection, accidental logging, or account compromise.
The docstring promises not to write to /tmp and to fail if the current directory is not writable, but the implementation falls back to the home directory and then the temporary directory. This mismatch defeats operator expectations and can cause sensitive output to be stored in less trusted or more broadly accessible locations, including temp storage the documentation explicitly forbids.
The skill is described as a query/analysis tool, but it persistently stores full API responses, cache entries, session indexes, and metadata on local disk. This creates unnecessary data-at-rest exposure, especially because market intelligence responses and session identifiers may contain sensitive or proprietary information beyond what the user expects from a read-style skill.
The script always writes the full API response to disk, regardless of size, before deciding whether to print inline or summarize. Because this data may include sensitive business intelligence or user-correlated information, unconditional persistence increases privacy and exposure risk, especially in shared workspaces or retained project directories.
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 = ""
Natural-language strings and validation logic require an 11-digit domestic phone number and force the +86 area code, which imposes a specific locale on all users. The file does not present this as an explicit opt-in or clearly document that the tool is restricted to a China-specific user base.
The login flow emits a newly obtained API key in stdout JSON, which may be captured by logs, transcripts, calling agents, or downstream tooling not intended to handle long-lived secrets. Exposure of this token can allow unauthorized use of the linked account and any associated paid API capabilities.
The file presents all operational instructions in Chinese and does not indicate that the user can choose another language or that the skill is intentionally restricted to a Chinese-speaking context. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation.