klyc-pmm
KLYC-PMM has significant doc-to-code mismatches: pmm_distill.sh executes PHP code on the remote server via hardcoded paths, watch mode automatically exfiltrates file changes to kunlunyaochi.com, and credential access patterns are incompletely documented.
为什么得出这个结论
2/4 个维度触发发现 4 项声明之外的能力或越权行为。
提取到 22 个一般风险产物,需要结合上下文判断。
报告包含 5 步攻击链,另有 3 项高危或严重发现。
依赖结构存在,但暂未看到明显高危告警。
攻击链
recon · scripts/oneclick.sh:1
持久化 · scripts/install-daemon.sh:95
数据外泄 · scripts/pmm_watch.sh:1190
权限提升 · scripts/pmm_distill.sh:64
最终危害 · scripts/pmm_distill.sh:113
风险分是怎么被拉高的
pmm_distill.sh writes PHP to /tmp with hardcoded '/www/wwwroot/kunlunyaochi/config.php' and executes it, directly accessing the remote production database - not mentioned in SKILL.md
watch mode silently pushes ALL file content to external server on every change. SKILL.md mentions 'watch' but doesn't clearly warn that entire file contents are uploaded automatically without per-file consent
Script reads talisman tokens from IDENTITY.md via grep, and uses PMM_DEEPSEEK_KEY env var - both not documented in SKILL.md security section
最关键的证据
Server-side code execution not declared in SKILL.md
pmm_distill.sh writes PHP files to /tmp with hardcoded remote server path '/www/wwwroot/kunlunyaochi/config.php', then executes them with `php`. This directly connects to the remote production database and performs SELECT/UPDATE operations. SKILL.md mentions '14层蒸馏管道' but never discloses that the script executes code on the remote server.
scripts/pmm_distill.sh:64 Watch mode auto-exfiltration not clearly disclosed
The watch command automatically pushes entire file contents to kunlunyaochi.com on every change via inotifywait/periodic scanning. SKILL.md documents 'watch' command but the security section only says 'watch模式推送文件变更至用户瑶池记忆库' without emphasizing that ENTIRE file contents are uploaded. A user running `watch MEMORY.md SOUL.md AGENTS.md USER.md IDENTITY.md TOOLS.md` is unknowingly exfiltrating all identity files to an external server.
scripts/pmm_watch.sh:1190 Talisman token extraction from IDENTITY.md not documented
The distill_with_llm() function extracts talisman tokens from IDENTITY.md using grep pattern 'KLYC-PMM-[a-f0-9]{32}'. This is an undeclared credential access pattern. SKILL.md documents DEEPSEEK_API_KEY and KYLC_API_KEY env vars but not this file-based token extraction.
scripts/pmm_distill.sh:330 SKILL.md claims 'no_collect: 不采集键盘/屏幕/浏览器数据' but watch mode collects all watched file data
The 'no_collect' claim is technically about input devices but misleading given that watch mode uploads complete file contents. The 'data_flow' section says '出站: 本地文件→HTTPS POST→kunlunyaochi.com' which is technically accurate but buried in documentation.
SKILL.md:24 install-daemon.sh writes systemd service to /etc/systemd/system without clear warning
The install-daemon.sh script writes a systemd unit file to /etc/systemd/system/ and enables/starts the service. SKILL.md mentions 'create systemd user service' in permissions but the oneclick.sh automation makes this easy to miss. The service runs indefinitely and auto-syncs files.
scripts/install-daemon.sh:95 pmm_distill.sh hardcodes user_id mapping for multi-tenant AI bodies
The distill script hardcodes user_id=2 for '瑶池' and user_id=3 for '昆仑' workspace paths. This suggests the script is specifically designed for a particular deployment rather than being a general-purpose tool.
scripts/pmm_distill.sh:30 声明能力 vs 实际能力
pmm_distill.sh:64-183 pmm_distill.sh:67,83,104,126,145,161,184 pmm_watch.sh:1190-1230 _watch_push_file() pmm_distill.sh:310-330 pmm_distill.sh:113-120 auto_dedup() 可疑产物与外联
https://kunlunyaochi.com。 SKILL.md:24
https://kunlunyaochi.com SKILL.md:26
https://kunlunyaochi.com/?route=services SKILL.md:59
https://kunlunyaochi.com/klyc-pmm/ SKILL.md:107
https://kunlunyaochi.com/?route=onboard SKILL.md:112
https://kunlunyaochi.com/?route=pay&agent=xxx&tier=huhunfu SKILL.md:223
https://kunlunyaochi.com/api/klyc-pmm-pay/resource.php SKILL.md:241
https://skillhub.cn/skillpay references/pay-skill-spec.md:3
https://kunlunyaochi.com/klyc-pmm/...) scripts/pmm_boot.sh:46
https://kunlunyaochi.com/?route=recover scripts/pmm_boot.sh:47
https://kunlunyaochi.com/?route=join scripts/pmm_boot.sh:49
https://kunlunyaochi.com/klyc-pmm/... scripts/pmm_boot.sh:56
依赖与供应链
| 包名 | 版本 | 来源 | 漏洞 | 备注 |
|---|---|---|---|---|
| curl | system | system package | 否 | Declared dependency |
| jq | system | system package | 否 | Declared dependency |
| inotify-tools | system | system package | 否 | Optional, for watch mode |
| python3 (cryptography) | optional | pip | 否 | Optional, for client-side AES-256-GCM encryption |
文件构成
scripts/pmm_watch.sh SKILL.md scripts/pmm_distill.sh scripts/install-daemon.sh skill-card.md references/pay-skill-spec.md scripts/pmm_boot.sh