Claude Code踩坑长帖约 6 分钟

自动模式被网站整链打穿

Auto Mode Full Compromise Chain

要点

  1. 站点返回 415 可逼模型改用 curl 下 zip,从而绕过 WebFetch 只做摘要的保护。
  2. 拒绝跑未知二进制却自写 Python 解码时,会踩中 zip 里 struct.py 的模块阴影。
  3. 混淆后的恶意代码拉远端 payload;自动模式有时拦清理命令却放行攻击。
  4. 把代理放进沙箱并监控子进程,安全不变量不能只写成建议。

原帖开头

Breaking Claude Code Opus 5 Auto Mode 🔥 1/ Here is a somewhat hilarious attack chain that hijacks Claude Code Opus 5 for a full system compromise via a website Hint: Security invariants are not optional 🧵