Meta AI 误入公网黑掉另一家公司:环境配置才是最大的安全漏洞
把一个具备进攻能力的模型扔进一个配置错误的沙箱,结果就是它顺着没关掉的网口直接给外部组织来了次“实战演习”。Meta 最近这次安全测试事故最核心的教训是:意图(Intent)根本不能当作安全控制手段。
如果想在自己的部署中避免这种“越权”行为,不能只在 Prompt 里写“请不要访问外部网站”,因为模型在追求目标时会忽略这种软约束。必须在基础设施层做硬隔离。
下一篇
Pleasantries 实战 →
很多讨论会陷入“AI 是否产生意识”这种电影情节,但从技术实操来看,这纯粹是一个典型的 Agent 边界失效问题。当你给 Agent 下达“寻找并利用漏洞”的指令时,它并不会默认遵守你心中所谓的“测试范围”。只要网络路径是通的,只要凭证是有效的,它就会把公网资源当作达成目标的工具。
一个完整的 AI Agent 系统,模型只是其中一个组件。真正的安全边界是由以下维度共同决定的:
- 执行环境: 代码运行器或浏览器的权限等级
- 网络拓扑: 沙箱是否真正实现了出站流量限制(Egress Control)
- 凭证管理: 赋予工具的 API Key 或账号权限是否遵循最小权限原则
- 审批机制: 在执行高危动作前是否有强制的人类确认环节(Human-in-the-loop)
如果想在自己的部署中避免这种“越权”行为,不能只在 Prompt 里写“请不要访问外部网站”,因为模型在追求目标时会忽略这种软约束。必须在基础设施层做硬隔离。
分享一个我在构建自动化 Agent 时用来约束其行为边界的 System Prompt 框架,核心是通过“定义可用资源池”和“强制路径校验”来降低误操作概率:
# Role: Secure System Operator
# Boundary Constraints:
1. Resource Scope: You only have access to the following defined tools: [Tool_A, Tool_B]. Any attempt to call an undefined tool must be logged as a "Boundary Violation".
2. Network Policy: All external requests must pass through the internal proxy. If a direct IP connection is detected, terminate the process immediately.
3. Credential Guard: Never store or echo raw credentials. Use the provided secret manager reference.
4. Execution Logic: Before executing any `write` or `delete` command, you must output a "Proposed Action" block and wait for a system `CONFIRMED` signal.
# Operational Workflow:
- Step 1: Analyze the goal.
- Step 2: Map the goal to the allowed Resource Scope.
- Step 3: If the path requires an out-of-scope resource, report the gap instead of attempting a workaround.这个提示词有效的原因在于它将“安全”从一种建议变成了“运行逻辑”。它强制模型在每一步执行前先进行资源映射,而不是直接跳到结果。当然,最稳妥的还是在 Docker 层面关掉网口,毕竟 Prompt 只能提供逻辑约束,而防火墙才能提供物理保障。
