Control-flow hijacking attacks manipulate orchestration mechanisms in multi-agent systems into performing unsafe actions that compromise the system and exfiltrate sensitive information. Recently proposed defenses, such as LlamaFirewall, rely on alignment checks of inter-agent communications to ensure that all agent invocations are "related to" and "likely to further" the original objective. We start by demonstrating control-flow hijacking attacks that evade these defenses even if alignment checks are performed by advanced LLMs. We argue that the safety and functionality objectives of multi-agent systems fundamentally conflict with each other. This conflict is exacerbated by the brittle definitions of "alignment" and the checkers' incomplete visibility into the execution context. We then propose, implement, and evaluate ControlValve, a new defense inspired by the principles of control-flow integrity and least privilege. ControlValve (1) generates permitted control-flow graphs for multi-agent systems, and (2) enforces that all executions comply with these graphs, along with contextual rules (generated in a zero-shot manner) for each agent invocation.
翻译:控制流劫持攻击通过操纵多智能体系统中的编排机制,诱使系统执行危及安全并泄露敏感信息的危险操作。近期提出的防御方案(如LlamaFirewall)依赖于对智能体间通信的对齐检查,以确保所有智能体调用均"与原始目标相关"且"可能推进该目标"。我们首先展示了即使由先进的大型语言模型执行对齐检查,仍能规避这些防御的控制流劫持攻击。我们认为多智能体系统的安全目标与功能目标存在根本性冲突,这种冲突因"对齐"定义的脆弱性及检查器对执行上下文可见性不足而加剧。随后,我们基于控制流完整性与最小权限原则,提出、实现并评估了新型防御方案ControlValve。该方案(1)为多智能体系统生成许可控制流图,(2)强制所有执行过程遵循这些控制流图,并为每个智能体调用配备以零样本方式生成的上下文规则。