klyc-pmm
klyc-pmm 通过外部云端 API 备份 AI 体记忆,存在远程脚本执行(curl|bash)高危模式、硬编码服务器路径暴露数据库架构、以及 update/install-daemon 链路无完整性校验的供应链风险。
init 命令提示用户执行 curl -sS https://ai.syln.cn/skills/klyc-pmm/install-daemon.sh | bash,无完整性校验、无版本锁定。攻击者若入侵 ai.syln.cn 域名或中间人劫持,可向任何已安装此 skill 的 AI 体/服务器注入任意代码。
scripts/pmm_watch.sh:847 Why this conclusion was reached
3/4 dimensions flagged3 undeclared or violating capabilities were inferred.
1 high-risk artifacts or egress signals were extracted.
The report includes 7 attack-chain steps and 5 severe findings.
3 dependency or supply-chain issues need attention.
Attack Chain
Entry · scripts/pmm_watch.sh:847
Escalation · scripts/pmm_watch.sh:847
Impact · scripts/pmm_watch.sh:847
Escalation · scripts/update.sh:1
Impact · scripts/update.sh:1
Escalation · pmm_distill.sh:15
Impact · scripts/pmm_watch.sh:200
What drove the risk score up
scripts/pmm_watch.sh:847 — init 时推荐用户执行 curl https://ai.syln.cn/skills/klyc-pmm/install-daemon.sh | bash,无完整性校验
scripts/update.sh 下载远程 pmm_watch.sh 直接覆盖本地,无 SHA256/PGP 验签
SKILL.md 完全未提及 distill 脚本直接 require /www/wwwroot/ai.syln.cn/config.php 访问 MySQL
SKILL.md 描述五层加密但未明确说明所有对话结论/身份文件均 POST 到 ai.syln.cn
多处暴露 /www/wwwroot/ai.syln.cn/ 路径及 user_id 映射架构
Most important evidence
curl|bash 管道执行远程脚本 — install-daemon
init 命令提示用户执行 curl -sS https://ai.syln.cn/skills/klyc-pmm/install-daemon.sh | bash,无完整性校验、无版本锁定。攻击者若入侵 ai.syln.cn 域名或中间人劫持,可向任何已安装此 skill 的 AI 体/服务器注入任意代码。
scripts/pmm_watch.sh:847 update.sh 无完整性校验覆盖本地脚本
scripts/update.sh 直接 curl 下载远程 pmm_watch.sh 并 cat > $SCRIPT_PATH 覆盖本地脚本,无任何签名或校验和验证。若远程被篡改,攻击者可完全控制 AI 体的核心脚本。
scripts/update.sh:1 pmm_distill.sh 硬编码服务器数据库路径,文档未提及
SKILL.md 完全未描述 distill 脚本的存在及能力。但 pmm_distill.sh 包含多处 require '/www/wwwroot/ai.syln.cn/config.php',直接连接 MySQL 数据库进行 CRUD 操作(鉴伪、去重、去矛盾、清理)。这是 SKILL.md 之外的阴影功能,且暴露了服务器数据库架构。
pmm_distill.sh:58 pmm_distill.sh 暴露内部架构:硬编码 user_id 和服务器路径
pmm_distill.sh 第15-21行硬编码 user_id 映射到服务器路径 (user_id=2→瑶池/lightclaw, user_id=3→昆仑/openclaw),第58行暴露 /www/wwwroot/ai.syln.cn/ 绝对路径。攻击者可据此了解目标服务器目录结构。
pmm_distill.sh:15 所有对话记忆/身份文件默认上传外部 API,域名控制权未披露
pmm_watch.sh push/watch 机制将所有 MEMORY.md、SOUL.md、IDENTITY.md、USER.md、AGENTS.md 等身份文件 POST 到 ai.syln.cn。SKILL.md 仅描述五层加密,未明确告知上传范围和外部服务依赖。域名 ai.syln.cn 归属不透明,域名易手风险未披露。
scripts/pmm_watch.sh:1 SKILL.md 描述的 hook-pull 机制与实际代码不一致
SKILL.md 描述「每6小时自动拉取瑶池蒸馏钩子(pmm_hooks_pull.sh)」,但 hooks-pull 实际由 pmm_hooks_pull() 函数在 pmm_watch.sh 内部实现,且该函数会直接修改本地 MEMORY.md 文件(备份、增量合并)——此本地文件系统写入行为在文档中未明确说明。
scripts/pmm_watch.sh:340 pmm_boot.sh 包含硬编码外部 URL,可被社工利用
pmm_boot.sh 提示用户「AI 体可直接 fetch: https://ai.syln.cn/klyc-pmm/{token}」恢复记忆。若 ai.syln.cn 域名被攻击者接管,可构造钓鱼页面收集虚假昆仑令进行中间人攻击。
scripts/pmm_boot.sh:15 依赖无版本锁定
SKILL.md 仅声明 jq 和 curl,无版本约束。pip cryptography 在 pmm_watch.sh 中为可选依赖,且 ImportError 时静默降级明文传输,无告警。
scripts/pmm_watch.sh:126 Declared capability vs actual capability
SKILL.md 声明写 memory/ 日记,脚本在 ~/.klyc-pmm/ 和 workspace 写入文件 SKILL.md 仅列 curl 但未声明上传全部记忆/身份文件到外部 API;pmm_watch.sh:847 还执行远程 bash 脚本 SKILL.md 未声明任何 shell 执行能力,但 pmm_watch.sh 包含 install-daemon 的 curl|bash 远程执行 pmm_distill.sh 直接读取 KLYC_API_ENDPOINT 等环境变量并通过 config.php 访问服务器数据库 Suspicious artifacts and egress
curl -sS https://ai.syln.cn/skills/klyc-pmm/install-daemon.sh | bash scripts/pmm_watch.sh:847
https://ai.syln.cn/klyc-pmm/ CHANGELOG.md:7
https://ai.syln.cn/?route=klyc-pmm SKILL.md:207
https://ai.syln.cn/api scripts/pmm_backup_files.sh:17
https://ai.syln.cn/klyc-pmm/TOKEN scripts/pmm_recover.sh:3
https://ai.syln.cn/skills/klyc-pmm/install-daemon.sh scripts/pmm_watch.sh:847
https://ai.syln.cn scripts/pmm_watch.sh:914
https://ai.syln.cn/skills/klyc-pmm/pmm_watch.sh scripts/update.sh:7
Dependencies and supply chain
| Package | Version | Source | Known vuln | Notes |
|---|---|---|---|---|
| curl | 未指定 | 系统 | No | 无版本锁定 |
| jq | 未指定 | 系统 | No | 无版本锁定 |
| python3 (cryptography) | * | pip | No | 可选依赖,ImportError 时静默降级明文 |
File composition
scripts/pmm_watch.sh pmm_distill.sh SKILL.md CHANGELOG.md scripts/pmm_backup_files.sh scripts/update.sh scripts/pmm_recover.sh scripts/pmm_boot.sh