Skip to main content
CenXiv.org
此网站处于试运行阶段,支持我们!
我们衷心感谢所有贡献者的支持。
贡献
赞助
cenxiv logo > cs > arXiv:2507.16773v1

帮助 | 高级搜索

计算机科学 > 密码学与安全

arXiv:2507.16773v1 (cs)
[提交于 2025年7月22日 ]

标题: 当大语言模型复制以思考:揭示推理大语言模型中的复制引导攻击

标题: When LLMs Copy to Think: Uncovering Copy-Guided Attacks in Reasoning LLMs

Authors:Yue Li, Xiao Li, Hao Wu, Yue Zhang, Fengyuan Xu, Xiuzhen Cheng, Sheng Zhong
摘要: 大型语言模型(LLMs)已成为自动化代码分析的关键组成部分,能够执行诸如漏洞检测和代码理解等任务。 然而,它们的集成引入了新的攻击面。 在本文中,我们识别并研究了一类新的基于提示的攻击,称为复制引导攻击(CGA),这些攻击利用了具备推理能力的LLMs的内在复制倾向。 通过将精心设计的触发器注入外部代码片段,攻击者可以诱导模型在推理过程中复制恶意内容。 这种行为会导致两类漏洞:推理长度操纵,即模型生成异常短或过长的推理轨迹;以及推理结果操纵,即模型生成误导性或错误的结论。 我们将CGA形式化为一个优化问题,并提出一种基于梯度的方法来合成有效的触发器。 对最先进的推理LLMs进行的实证评估表明,CGA能够可靠地在代码分析任务中引发无限循环、提前终止、虚假拒绝和语义扭曲。 虽然在定向设置中非常有效,但我们发现由于计算限制,在不同提示之间泛化CGA存在挑战,这为未来的研究提出了一个开放性问题。 我们的发现揭示了LLM驱动开发流程中的一个关键但尚未被充分研究的漏洞,并呼吁紧急推进提示级别的防御机制。
摘要: Large Language Models (LLMs) have become integral to automated code analysis, enabling tasks such as vulnerability detection and code comprehension. However, their integration introduces novel attack surfaces. In this paper, we identify and investigate a new class of prompt-based attacks, termed Copy-Guided Attacks (CGA), which exploit the inherent copying tendencies of reasoning-capable LLMs. By injecting carefully crafted triggers into external code snippets, adversaries can induce the model to replicate malicious content during inference. This behavior enables two classes of vulnerabilities: inference length manipulation, where the model generates abnormally short or excessively long reasoning traces; and inference result manipulation, where the model produces misleading or incorrect conclusions. We formalize CGA as an optimization problem and propose a gradient-based approach to synthesize effective triggers. Empirical evaluation on state-of-the-art reasoning LLMs shows that CGA reliably induces infinite loops, premature termination, false refusals, and semantic distortions in code analysis tasks. While highly effective in targeted settings, we observe challenges in generalizing CGA across diverse prompts due to computational constraints, posing an open question for future research. Our findings expose a critical yet underexplored vulnerability in LLM-powered development pipelines and call for urgent advances in prompt-level defense mechanisms.
主题: 密码学与安全 (cs.CR)
引用方式: arXiv:2507.16773 [cs.CR]
  (或者 arXiv:2507.16773v1 [cs.CR] 对于此版本)
  https://doi.org/10.48550/arXiv.2507.16773
通过 DataCite 发表的 arXiv DOI

提交历史

来自: Yue Li [查看电子邮件]
[v1] 星期二, 2025 年 7 月 22 日 17:21:36 UTC (175 KB)
全文链接:

获取论文:

    查看标题为《》的 PDF
  • 查看中文 PDF
  • 查看 PDF
  • HTML(实验性)
  • TeX 源代码
  • 其他格式
查看许可
当前浏览上下文:
cs.CR
< 上一篇   |   下一篇 >
新的 | 最近的 | 2025-07
切换浏览方式为:
cs

参考文献与引用

  • NASA ADS
  • 谷歌学术搜索
  • 语义学者
a 导出 BibTeX 引用 加载中...

BibTeX 格式的引用

×
数据由提供:

收藏

BibSonomy logo Reddit logo

文献和引用工具

文献资源探索 (什么是资源探索?)
连接的论文 (什么是连接的论文?)
Litmaps (什么是 Litmaps?)
scite 智能引用 (什么是智能引用?)

与本文相关的代码,数据和媒体

alphaXiv (什么是 alphaXiv?)
CatalyzeX 代码查找器 (什么是 CatalyzeX?)
DagsHub (什么是 DagsHub?)
Gotit.pub (什么是 GotitPub?)
Hugging Face (什么是 Huggingface?)
带有代码的论文 (什么是带有代码的论文?)
ScienceCast (什么是 ScienceCast?)

演示

复制 (什么是复制?)
Hugging Face Spaces (什么是 Spaces?)
TXYZ.AI (什么是 TXYZ.AI?)

推荐器和搜索工具

影响之花 (什么是影响之花?)
核心推荐器 (什么是核心?)
IArxiv 推荐器 (什么是 IArxiv?)
  • 作者
  • 地点
  • 机构
  • 主题

arXivLabs:与社区合作伙伴的实验项目

arXivLabs 是一个框架,允许合作伙伴直接在我们的网站上开发和分享新的 arXiv 特性。

与 arXivLabs 合作的个人和组织都接受了我们的价值观,即开放、社区、卓越和用户数据隐私。arXiv 承诺这些价值观,并且只与遵守这些价值观的合作伙伴合作。

有一个为 arXiv 社区增加价值的项目想法吗? 了解更多关于 arXivLabs 的信息.

这篇论文的哪些作者是支持者? | 禁用 MathJax (什么是 MathJax?)
  • 关于
  • 帮助
  • contact arXivClick here to contact arXiv 联系
  • 订阅 arXiv 邮件列表点击这里订阅 订阅
  • 版权
  • 隐私政策
  • 网络无障碍帮助
  • arXiv 运营状态
    通过...获取状态通知 email 或者 slack

京ICP备2025123034号