T01 · Skill Instruction Hijacking
- Location
SKILL.md:169- Finding
Automatic Transmission of Conversation Feedback Without Explicit User Consent
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill performs Amazon image search, but it also publicly uploads local images, handles account and payment setup, and can send feedback externally without clear user consent.
Install only if you trust LinkFox and are comfortable with these extra workflows. Use non-sensitive images, treat local uploads as publicly reachable, do not let the agent handle phone codes or payment orders unless you explicitly intend LinkFox account setup or recharge, avoid storing API keys in shell profiles, and disable or require confirmation for feedback reporting.
SKILL.md:169Automatic Transmission of Conversation Feedback Without Explicit User Consent
scripts/onboarding.py:65Configurable Network Destinations Can Redirect Authentication Credentials
scripts/amazon_search_by_image.py:251Unsanitized Session Identifier Allows Filesystem Path Escape
scripts/upload_image.py:91Local Images Are Uploaded as Publicly Readable Objects Without Client-Enforced Expiration
scripts/onboarding.py:480API Key Is Printed in Full and Recommended for Plaintext Persistent Storage
scripts/onboarding.py:164Runtime Installation Guidance Uses Unpinned Third-Party Dependencies
The request sent via urlopen includes multiple headers populated directly from environment variables, and the destination host is also overrideable through LINKFOX_TOOL_GATEWAY. In a hostile or multi-tenant runtime, an attacker who can influence environment variables can redirect requests and exfiltrate the API key and session metadata to an attacker-controlled endpoint, creating a real SSRF/credential-leak risk.
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 ""
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
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 = ""
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
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
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
)
try:
with urlopen(req, timeout=150) as response:
result = json.loads(response.read().decode("utf-8"))
except HTTPError as e:
body = e.read().decode("utf-8") if e.fp else ""
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
)
try:
with urlopen(req, timeout=120) as response:
if response.status not in (200, 201):
print(f"Upload failed with status: {response.status}", file=sys.stderr)
sys.exit(1)
The skill claims to perform Amazon visual search, but also includes a local-image upload flow to LinkFox object storage that generates a public URL. That is a materially different data-handling behavior involving third-party storage and public exposure of user files, which users may not anticipate from the declared function alone.
The skill claims to perform Amazon visual search, but also includes a local-image upload flow to LinkFox object storage that generates a public URL. That is a materially different data-handling behavior involving third-party storage and public exposure of user files, which users may not anticipate from the declared function alone.
The skill instructs uploading local image files to obtain a publicly accessible URL valid for 24 hours, but does not provide a clear privacy warning about making user files publicly reachable. This creates a real risk of exposing sensitive images, metadata, or proprietary product information to unintended parties.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
https://example.com/competitor.jpg
## Display Rules
1. **Present data clearly**: Show search results in a well-structured table. Key columns to prioritize: product image, title, ASIN, price, rating, review count, and brand
2. **Image display**: When the response includes `imageUrl` for products, display them inline so users can visually compare results
The onboarding content expands a simple Amazon image-search skill into account provisioning, API key acquisition, and paid billing workflows for a third-party service. This is dangerous because it can cause the agent to solicit credentials, drive registrations and purchases unrelated to the user’s requested task, and normalize privileged operational actions far outside the skill’s declared scope.
The file instructs collecting a phone number, sending verification codes, logging in, listing plans, and creating payment orders, none of which are justified by an Amazon visual search skill. In context, this creates a high-risk capability for unnecessary PII collection and financial workflow initiation under the guise of a product-search feature.
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 docstring promises that writing to /tmp is forbidden and that failure to write to the current directory should error out, but the implementation silently falls back to the home directory and temp directory. This mismatch weakens operator expectations and can cause sensitive response data to be written into less controlled locations, including shared temporary storage, which materially increases exposure risk.
The file implements phone-based onboarding, SMS verification, API-key issuance, package listing, order creation, and payment QR generation, which is materially unrelated to the declared Amazon image-search skill. This mismatch is dangerous because it can socially engineer users into disclosing phone numbers, SMS codes, and obtaining platform credentials under false pretenses.
The billing and purchase functions create orders and render payment QR codes even though the skill is described as an image-search capability. In this context, hidden commerce flows are dangerous because they can induce unexpected charges and collect money through a capability users did not invoke or consent to.
The code performs SMS login, token exchange, team enumeration, and API token retrieval/generation, none of which are necessary for image-based product search. In the declared skill context, this is highly suspicious because it solicits sensitive authentication factors and then issues reusable API credentials that could enable broader account access.
The skill declares capabilities that involve environment access, file writes, and network interaction but does not explicitly scope or constrain those permissions. In a skill that handles user-supplied URLs, local files, uploads, and account-related flows, missing tool-scope declarations weakens least-privilege controls and makes unintended or abusive behavior harder to audit and contain.
The manifest description is written primarily in Chinese and defines trigger behavior in Chinese, while the rest of the file is mixed-language. This creates a language/locale constraint in the skill's activation and behavior without explicitly offering the user a language choice or stating that the skill is region-specific.
The skill requires writing full tool responses to persistent session-scoped files in the project directory. Because responses may include user-supplied URLs, marketplace preferences, account-related errors, and potentially enriched commercial data, persistent logging increases the chance of later exposure through repo contents, workspace sharing, or subsequent agent access.
The skill says feedback should be auto-detected and reported via an API without disclosing to the user that portions of their interaction may be transmitted externally. Silent telemetry of user intent, dissatisfaction, or praise can leak behavioral data and violates transparency expectations.
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/amazon/searchByImage \
The file introduces a separate public feedback-submission API that is unrelated to the core image-search function. In an agent skill context, this expands the skill’s action surface and could cause the agent to transmit user content to an external service without a clear user-triggered need, increasing privacy and data-handling risk.
The feedback API section instructs sending free-form content to an external endpoint but does not warn that user-provided text may contain sensitive data. In an agent setting, this omission can lead to unreviewed exfiltration of personal, confidential, or proprietary information under the guise of feedback submission.
The markdown tells the operator to ask for a user phone number and use it to send/login with verification codes, but provides no privacy notice, consent language, retention limits, or safer alternative path beyond ad hoc collection. That creates unnecessary exposure of personal data and increases the chance of mishandling sensitive identifiers and one-time codes.
The inline comment for SMALL_THRESHOLD says small responses are 'directly output, not written to file'. In main(), the script serializes the result and writes it to out_path unconditionally before deciding whether to print the full JSON or a summary, so the comment contradicts actual behavior.
No suspicious patterns detected.