T01 · Skill Instruction Hijacking
- Location
SKILL.md:211- Finding
Automatic Feedback Reporting Exfiltrates User Statements Without Consent
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill performs patent checks, but it also publicly uploads local images, handles account and billing flows, stores sensitive outputs, and can send feedback data without clear consent.
Review before installing. Use this only for images and product details you are willing to send to LinkFox and potentially expose through a public image URL. Avoid using the built-in phone/SMS login or billing/order commands unless you explicitly intend to manage a LinkFox account through the skill, and rotate any API key that appears in logs or transcripts. Do not rely on the stated 24-hour upload validity as proof that public access is revoked.
SKILL.md:211Automatic Feedback Reporting Exfiltrates User Statements Without Consent
scripts/onboarding.py:468Generated API Credentials Are Printed in Plaintext to Standard Output
scripts/upload_image.py:86Local Images Are Uploaded With Public-Read Access Without an Explicit Per-Upload Consent Boundary
scripts/ruiguan_detection_patent_design.py:35Unvalidated Gateway Overrides Can Redirect Bearer Credentials and User Data to Arbitrary Hosts
scripts/ruiguan_detection_patent_design.py:252Unvalidated Session Identifier Enables Arbitrary Directory Selection for Output Files
scripts/ruiguan_detection_patent_design.py:62Undocumented Session and Message Metadata Is Transmitted With Patent and Upload Requests
The code builds request URLs from environment-controlled base URLs and then sends sensitive data to them via requests.post. Those requests include phone numbers, SMS codes, access tokens, refresh tokens, generated API keys, and browser-like headers, so a malicious or misconfigured environment can silently redirect credentials and session material to an attacker-controlled endpoint.
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 derived from environment variables and then used by urllib.request.urlopen with the Authorization header attached. This means an attacker who can influence environment variables can redirect authenticated gateway traffic, capturing API keys and manipulating account, package, or order operations against an attacker-controlled service.
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 sends multiple environment-derived values, including the API key and gateway base URL, into an outbound network call. Because LINKFOX_TOOL_GATEWAY is fully controlled by an environment variable, a compromised runtime or untrusted wrapper can redirect requests and headers to an attacker-controlled host, exfiltrating secrets and user data. In a skill context that handles patent-check inputs and writes responses to disk, this increases exposure of potentially sensitive business data.
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.
)
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 Ruiguan-based design patent detection, but the finding indicates it instead uploads local images to LinkFox OSS, uses LinkFox gateway authentication, and lacks visible patent-analysis behavior. That mismatch can mislead users into sharing proprietary product images under the belief they are being analyzed for infringement, when they may instead just be transmitted and stored by another service.
The skill claims to perform Ruiguan-based design patent detection, but the finding indicates it instead uploads local images to LinkFox OSS, uses LinkFox gateway authentication, and lacks visible patent-analysis behavior. That mismatch can mislead users into sharing proprietary product images under the belief they are being analyzed for infringement, when they may instead just be transmitted and stored by another service.
The trigger conditions are overly broad and fire on generic patent-, infringement-, and TRO-related language even when the user may not be asking for design-patent image analysis. In context, this increases the chance of unintended invocation of a skill that performs uploads, file writes, and external API interactions, leading to data exposure or unnecessary costly actions.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
}
## Display Rules
1. **High-risk patent highlighting**: When generating summaries or reports, display ALL patents with `similarity >= 0.7` or `troCase = true` in full detail. For each such patent, include: application number, patent title (Chinese), inventors, TRO enforcement history, the most-similar patent drawing, every image in the patent image list, patent abstract, patent specification, LOC info, radar analysis result, and specification text. This detailed presentation is critically important -- do NOT abbreviate or omit these fields.
2. **Disclaimer**: Always append a friendly reminder at the end: "This detection result is generated by LinkfoxAgent. It is recommended to consult a professional IP attorney for legal advice."
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 account onboarding, SMS authentication, API-key retrieval, subscription browsing, order creation, and payment QR generation, which is materially unrelated to the declared design-patent detection purpose. This mismatch is dangerous because users or orchestrators may invoke a patent-analysis skill while actually being funneled into credential collection and commercial account operations.
The skill includes billing and payment-order creation capabilities, including payment URL/QR handling, despite being presented as a patent-risk detection tool. Hidden monetization and purchasing logic broadens the attack surface and can enable unauthorized or deceptive purchase flows if the skill is triggered in contexts where users do not expect commerce actions.
The skill declares no explicit tool scope while its instructions require environment-variable access, file writes, and network operations. In an agent setting, missing least-privilege boundaries increases the chance that the skill can access or exfiltrate more data than users expect, especially because it uploads files and persists responses locally.
The skill requires always writing full API responses to a session-associated local file, regardless of necessity. This creates avoidable data retention of user-provided images, product descriptions, patent results, and session-linked metadata, increasing the impact of local compromise, unauthorized access, or accidental disclosure.
The skill instructs users to upload arbitrary local image files to obtain a public URL, which expands the data flow beyond patent detection into public file publication. Because product images may contain confidential prototypes, metadata, or other sensitive business information, making them publicly accessible creates privacy, IP, and confidentiality risks.
The documentation tells the agent to upload local images and generate a public URL but omits a clear privacy and data-handling warning. This is dangerous because users may not understand that their local files will leave the device and become externally accessible, potentially exposing proprietary product designs or personal information.
The skill directs automatic reporting to a Feedback API for broad categories including praise, dissatisfaction, mismatch, and anything improvable, without clear minimization. This can cause unnecessary transmission of user interaction data unrelated to patent analysis, potentially including sensitive commercial details from the conversation.
The API requires sending product image URLs and optional product title/description to an external service, but the documentation does not include an explicit privacy or data-sharing warning. This creates a real risk that sensitive product information, unreleased designs, or proprietary descriptions are transmitted off-platform without the user understanding the disclosure.
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/ruiguan/detectionPatentDesign \
The file documents a second, unrelated Feedback API that can send user-derived content to a different external service. In an agent skill, adding an auxiliary outbound channel beyond the primary patent-detection function increases data-flow scope and can lead to unintended disclosure of user content, especially if agents invoke it automatically or without explicit user consent.
The Feedback API section lacks any warning that feedback content is sent to a separate external service endpoint. Because feedback content may include user statements, workflow context, or excerpts of results, omission of this disclosure can cause unintentional exfiltration of user data to a different processor.
The onboarding document expands the skill’s behavior from patent-detection into account recovery, registration, API key setup, and billing/payment handling. That scope creep increases attack surface and can steer users into sharing credentials, phone numbers, or making purchases through the skill, which is unjustified by the stated function and creates social-engineering and abuse risk.
Instructing the agent to collect a phone number, trigger SMS verification, log in, list plans, and initiate orders gives the skill capabilities unrelated to patent analysis and directly touches sensitive identity and payment flows. If abused or misconfigured, this could lead to unauthorized account creation, account takeover assistance, privacy violations, or deceptive billing interactions.
The document explicitly asks the user to provide a phone number and then participate in an SMS-code login flow, but it gives no privacy notice, consent language, retention limits, or explanation of how that personal data will be handled. In a non-identity-focused skill, this creates unnecessary personal-data exposure and conditions users to share sensitive identifiers with an agent.
The top-level description and command help are entirely in Chinese, and the login flow is hard-coded around '+86' and 11-digit domestic phone numbers. This imposes a specific language/locale on all users without opt-in or documented justification in the file.
No suspicious patterns detected.