mind-wander
SKILL.md documents a read-only reasoning agent but the actual implementation contains undeclared arbitrary Python code execution (sandbox_run), filesystem writes (elevate, DEAD_ENDS.md), external network requests, and system cron registration — a significant doc-to-code mismatch.
为什么得出这个结论
3/4 个维度触发发现 6 项声明之外的能力或越权行为。
提取到 1 个高危 IOC 或外联信号。
报告包含 6 步攻击链,另有 4 项高危或严重发现。
发现 4 项需要关注的依赖或供应链线索。
攻击链
初始入口 · SKILL.md:1
delivery · scripts/install.sh:70
权限提升 · scripts/tools.py:310
权限提升 · scripts/tools.py:358
最终危害 · scripts/tools.py:130
最终危害 · scripts/install.sh:151
风险分是怎么被拉高的
sandbox_run() executes arbitrary Python code via subprocess with weak BLOCKED-list filtering, not declared in SKILL.md tool table
elevate() writes to MENTAL_EXPLORATION.md, wander_graph regenerates DEAD_ENDS.md, install.sh writes ON_YOUR_MIND.md — all undeclared in SKILL.md capability table
search_web() POSTs to api.perplexity.ai; embed_sync() calls Ollama endpoint; install.sh downloads from HuggingFace and bootstrap.pypa.io — none declared
install.sh registers a 30-min cron job via gateway API; cron payload embeds Python code as a string — not declared in SKILL.md
BLOCKED-list uses simple string inclusion — can be bypassed with e.g. 'ex' + 'ec(', f-strings, or 'eval( "os.system(...)" )'
search_web() reads ~/.openclaw/openclaw.json for Perplexity API key; cron registration reads same file for gateway token — credential access not declared
最关键的证据
Undeclared arbitrary Python code execution via sandbox_run()
sandbox_run() in tools.py executes arbitrary Python code passed by the LLM agent via subprocess.run(['python3', '-c', safe_code]). The BLOCKED-list is a simple string-inclusion check easily bypassed. This capability is entirely absent from SKILL.md's tool table.
scripts/tools.py:310 SKILL.md tool table omits 4 of 8 tools
SKILL.md declares 7 tools (query_graph, search_web, read_file, list_files, sandbox_run, check_dead_ends, record_dead_end, elevate) but the tool table only lists 7 items. Actually all 7 are in the registry, but elevate() and the filesystem WRITE operations are missing from the capability declarations. More critically, the network:WRITE, shell:WRITE, database:READ+WRITE, and persistence capabilities are not declared at all.
SKILL.md:1 Undeclared cron job registration on install
install.sh silently registers a 30-minute cron job via the OpenClaw gateway API, embedding Python code as a string in the message payload. This persistence mechanism is not mentioned anywhere in SKILL.md.
scripts/install.sh:151 Undeclared credential file access
search_web() reads ~/.openclaw/openclaw.json to extract the Perplexity API key as a fallback. The cron registration code also reads this file for the gateway auth token. This credential access is not declared.
scripts/tools.py:137 Weak sandbox BLOCKED-list trivially bypassed
sandbox_run() uses simple string-inclusion checks against a BLOCKED list (e.g., 'exec(', 'eval(', '__import__', 'ctypes'). These can be bypassed via string concatenation, formatting, or base64. The sandbox also lacks resource limits beyond a timeout.
scripts/tools.py:302 Unpinned pip dependencies in install.sh
install.sh installs huggingface_hub, httpx, falkordb, numpy without version pins. This could pull different (potentially vulnerable) versions on re-run.
scripts/install.sh:77 Third-party model download from HuggingFace
The skill downloads a Qwen3.5 GGUF model from a third-party HuggingFace repo (Jackrong/Qwen3.5-9B-Claude-4.6-Opus-Reasoning-Distilled-v2-GGUF) which is not an official Qwen release. Model could be modified.
scripts/install.sh:99 Hardcoded internal IP addresses expose infrastructure
172.18.0.1 is hardcoded in SKILL.md, mind_wander_config.py, and install.sh as the Ollama and FalkorDB endpoint. This exposes Docker/internal network topology.
SKILL.md:111 还有 1 项发现未展开显示
声明能力 vs 实际能力
scripts/tools.py:elevate() writes MENTAL_EXPLORATION.md; scripts/wander_graph.py:regenerate_dead_ends_file() writes DEAD_ENDS.md; scripts/install.sh creates ON_YOUR_MIND.md scripts/tools.py:sandbox_run() → subprocess.run(['python3', '-c', safe_code]) executes arbitrary Python; scripts/install.sh runs pip, cp, chmod, curl scripts/tools.py:search_web() POSTs to api.perplexity.ai; scripts/wander_graph.py:embed_sync() POSTs to Ollama; scripts/install.sh downloads from bootstrap.pypa.io and HuggingFace scripts/tools.py:query_graph() reads/writes FalkorDB 'workspace' graph; scripts/wander_graph.py:record_dead_end_to_graph() writes 'wander' graph scripts/tools.py:search_web() reads ~/.openclaw/openclaw.json for API key; scripts/run.py reads os.environ for config values scripts/install.sh registers cron jobs via gateway API; SKILL.md does not mention persistence mechanism 可疑产物与外联
172.18.0.1 SKILL.md:111
http://172.18.0.1:11436 SKILL.md:111
https://doi.org/10.1038/nrn.2016.113 references/research.md:21
https://doi.org/10.1038/nrn1607 references/research.md:27
https://arxiv.org/abs/2409.02685 references/research.md:33
https://bootstrap.pypa.io/get-pip.py scripts/install.sh:75
https://api.perplexity.ai/chat/completions scripts/tools.py:130
依赖与供应链
| 包名 | 版本 | 来源 | 漏洞 | 备注 |
|---|---|---|---|---|
| huggingface_hub | * | pip | 否 | Version not pinned in install.sh |
| httpx | * | pip | 否 | Version not pinned in install.sh |
| falkordb | * | pip | 否 | Version not pinned in install.sh |
| numpy | * | pip | 否 | Version not pinned in install.sh |
| Jackrong/Qwen3.5-9B-Claude-4.6-Opus-Reasoning-Distilled-v2-GGUF | unknown | HuggingFace third-party | 否 | Third-party model repo, not official Qwen — integrity not verifiable |
文件构成
scripts/tools.py scripts/install.sh SKILL.md references/research.md