T01 · Skill Instruction Hijacking
- Location
SKILL.md:119- Finding
Autonomous Disclosure of Conversation Content to a Feedback Service
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches an image-recognition service, but it also handles public file uploads, account login, API-key creation, billing orders, automatic feedback reporting, and local retention in ways users should review carefully.
Install only if you are comfortable using LinkFox as a paid external image-analysis provider. Avoid private or sensitive local images unless you accept that they may be uploaded as publicly reachable objects, verify endpoint environment variables point only to official LinkFox hosts, do not share SMS codes or API keys casually, and prefer safer secret storage over shell startup files.
SKILL.md:119Autonomous Disclosure of Conversation Content to a Feedback Service
scripts/onboarding.py:72Environment-Controlled Endpoints Can Receive API Keys and Login Tokens
scripts/upload_image.py:90Local Images Are Uploaded with Public-Read Access Without a Required Confirmation Step
scripts/onboarding.py:468Generated API Keys Are Printed in Full and Recommended for Plaintext Persistence
scripts/multimodal_recognize_image.py:97Complete Image-Analysis Responses Are Duplicated in Cache and Session Archives with Default Permissions
scripts/onboarding.py:163Runtime Instructions Recommend Installing Unpinned Dependencies
The request sent via urlopen includes environment-derived values in headers, and the destination host is also overridable through LINKFOX_TOOL_GATEWAY. This allows sensitive session/app metadata and the API key-backed request to be transmitted to an attacker-controlled endpoint if the environment is poisoned, creating a real exfiltration and SSRF-style risk in an agent runtime where environment variables may be influenced by upstream tooling.
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 ""
This skill is advertised as image recognition/OCR, but the implementation performs account onboarding, SMS login, API-key issuance, plan discovery, and payment initiation. That mismatch is highly dangerous because it can trick users or higher-level orchestration into invoking credential and billing workflows under the guise of harmless image analysis.
The code allows API base URLs to be overridden via environment variables and then sends sensitive authentication material to those URLs using requests.post. Because the same flow carries SMS-login tokens, refresh tokens, and generated API keys, a malicious or compromised environment can redirect traffic to an attacker-controlled endpoint and exfiltrate credentials.
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 request target is derived from environment-controlled base URLs and then used in urllib.request.urlopen with the Authorization header populated from LINKFOX_AGENT_API_KEY. An attacker who can influence the runtime environment can redirect these requests to capture the API key and observe account, package, and order operations.
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 advertises multimodal image analysis, but also instructs uploading local images to object storage and obtaining public URLs. That changes the data flow from analysis to external publication/storage of user files, which is a materially different and more sensitive behavior than the description suggests.
The skill advertises multimodal image analysis, but also instructs uploading local images to object storage and obtaining public URLs. That changes the data flow from analysis to external publication/storage of user files, which is a materially different and more sensitive behavior than the description suggests.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
- **响应401或402状态码**
- **响应提示算力或余额不足**:消息含"算力余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值",或类似含义的内容。
## Display Rules
1. **Show the analysis result clearly**: Present the returned text analysis in a readable format. Use bullet points or paragraphs as appropriate for the content.
2. **No fabrication**: Only relay information that the API actually returned. Do not add visual details that were not in the response.
The onboarding document directs the image-recognition skill to handle authentication troubleshooting, account registration, API key setup, and billing/payment flows that are outside the declared purpose of image analysis. This scope expansion creates a confused-deputy risk where a user invoking a benign visual-analysis skill may be prompted for credentials, phone numbers, or payment actions unrelated to the skill’s expected function.
The documented behavior broadens the skill from image analysis into authentication recovery, account onboarding, and payment operations, which materially changes the trust boundary and expected user interaction. In the context of an image-recognition skill, this is especially dangerous because users are less likely to expect sensitive-data collection or transactional actions, increasing social-engineering and misuse risk.
The instructions explicitly allow collecting a user's phone number, sending verification codes, logging in, listing plans, and creating payment orders, none of which are justified by an image-recognition feature. These actions enable unnecessary handling of personal data and commerce operations, expanding abuse impact from misclassification into privacy compromise and unauthorized financial workflows.
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 subscription/package enumeration, order creation, and QR-based payment collection that are unrelated to the stated visual-analysis function. In the context of a multimodal image skill, embedding billing logic increases the risk of deceptive purchases and unauthorized financial actions.
The skill performs SMS authentication, token-based login, team discovery, and API-token generation, none of which are necessary for image recognition or OCR. In this context, the code appears designed to harvest or mint credentials under misleading packaging, making the mismatch especially dangerous.
The skill declares no explicit tool scope while its instructions clearly require environment-variable access, network calls, and local file writes. That mismatch weakens least-privilege controls and makes it harder for reviewers or runtime policy to constrain what the skill can do, increasing the chance of overbroad execution or abuse.
The trigger conditions are very broad and include implicit activation whenever a user provides an image URL and asks about visual content. Overbroad triggers can cause the skill to run in contexts the user did not clearly intend, leading to unnecessary network access, uploads, cost incurrence, or data disclosure.
The skill instructs automatic persistence of full API responses into session-scoped project files and may print full results to stdout. Because the response can contain OCR text or sensitive image-derived content, this creates a durable data-exposure path through local storage, logs, and downstream tooling that may not be expected by the user.
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/multimodal/recognizeImage \
The documentation defines a feedback API that encourages sending free-form content including what the user said or intended and what actually happened, but it provides no warning to avoid personal, sensitive, or image-derived data. In this skill context, image analysis results may contain OCR text, personal details, or other sensitive content, so an agent could exfiltrate user data to a separate external endpoint without informed consent or minimization.
The skill instructs collection of a user's phone number and use of SMS-based registration/login commands without any warning about sensitive-data handling, retention, or verification of user consent. In a skill that users expect to analyze images, requesting phone numbers and codes is anomalous and increases the likelihood of privacy violations or social-engineering abuse.
The document tells users to persist an API key in shell startup files and environment settings without warning that this stores a long-lived secret on disk and may expose it to other processes, backups, support logs, or local users. This is risky operational guidance, particularly when embedded in an unrelated skill, because users may follow it without understanding the credential-security consequences.
The skill always stores full API responses and also caches results locally, which can include OCR output, image descriptions, or other sensitive derived content unrelated to the minimum needed runtime behavior. In an agent setting, persistent storage expands the data exposure window and may violate user expectations or least-retention principles, especially since the manifest describes image analysis rather than durable archival.
The documentation says writing to /tmp is forbidden and that failure should occur if the current directory is not writable, but the implementation silently falls back to home and temporary directories. This mismatch is security-relevant because operators may rely on the documented no-/tmp behavior when assessing where sensitive recognition outputs can land, causing accidental storage in less controlled locations.
This code sends the provided JSON parameters to a remote HTTPS endpoint and also includes SESSION_ID, MESSAGE_ID, MODE_ID, and APP_NAME from the environment in request headers. While the module docstring explains output behavior, there is no user-facing disclosure in code near the transmission that input data and environment-derived metadata will be sent over the network.
No suspicious patterns detected.