arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2505.23634cs.LGcs.CR
收藏

MCP安全训练:使用改进的偏好对齐学习对虚假良性MCP漏洞利用进行弃权(不执行)

MCP Safety Training: Learning to Refuse Falsely Benign MCP Exploits using Improved Preference Alignment

Leidos(莱迪斯公司)

John Halloran

AI总结:

本文揭示了MCP在线恶意攻击的广泛威胁,通过构建包含虚假良性攻击的数据集,探索DPO在LLM弃权训练中的效果,并提出基于RAG的新型偏好对齐策略RAG-Pref,显著提升了模型对MCP攻击的弃权能力与防护水平。

摘要:

模型上下文协议(MCP)已被广泛采用作为一种开放标准,实现了生成式AI智能体的无缝集成。然而,最近的研究表明,MCP容易受到基于检索的“虚假良性”攻击(FBAs),这允许恶意系统访问和凭证窃取,但要求用户直接将受损文件下载到其系统中。在此,我们表明基于MCP的攻击的威胁模型比以前认为的要广泛得多,即攻击者只需在线发布恶意内容即可欺骗MCP智能体在不知情的受害者系统上执行攻击。为了改善针对此类攻击的对齐防护措施,我们引入了一个包含FBAs和(真正)良性样本的新MCP数据集,以探索直接偏好优化(DPO)在大型语言模型(LLMs)弃权(不执行)训练中的有效性。虽然DPO改善了模型针对此类攻击的防护措施,但我们表明弃权(不执行)学习的有效性因模型的原始训练后对齐方案而异——例如,基于GRPO的LLMs学习弃权(不执行)的能力极差。因此,为了进一步改善对FBAs的弃权(不执行),我们引入了用于偏好对齐的检索增强生成(RAG-Pref),这是一种基于RAG的新型偏好对齐策略。我们表明,RAG-Pref显著提高了LLMs对FBAs弃权(不执行)的能力,特别是与DPO对齐结合使用时,从而极大地改善了针对基于MCP攻击的防护措施。

英文摘要:

The model context protocol (MCP) has been widely adapted as an open standard enabling the seamless integration of generative AI agents. However, recent work has shown the MCP is susceptible to retrieval-based "falsely benign" attacks (FBAs), allowing malicious system access and credential theft, but requiring that users download compromised files directly to their systems. Herein, we show that the threat model of MCP-based attacks is significantly broader than previously thought, i.e., attackers need only post malicious content online to deceive MCP agents into carrying out their attacks on unsuspecting victims' systems. To improve alignment guardrails against such attacks, we introduce a new MCP dataset of FBAs and (truly) benign samples to explore the effectiveness of direct preference optimization (DPO) for the refusal training of large language models (LLMs). While DPO improves model guardrails against such attacks, we show that the efficacy of refusal learning varies drastically depending on the model's original post-training alignment scheme--e.g., GRPO-based LLMs learn to refuse extremely poorly. Thus, to further improve FBA refusals, we introduce Retrieval Augmented Generation for Preference alignment (RAG-Pref), a novel preference alignment strategy based on RAG. We show that RAG-Pref significantly improves the ability of LLMs to refuse FBAs, particularly when combined with DPO alignment, thus drastically improving guardrails against MCP-based attacks.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑