Large Language Models (LLMs) are increasingly deployed via third-party system prompts downloaded from public marketplaces. We identify a critical supply-chain vulnerability: conditional system prompt poisoning, where an adversary injects a ``sleeper agent'' into a benign-looking prompt. Unlike traditional jailbreaks that aim for broad refusal-breaking, our proposed framework, SPECTRE, optimizes system prompts to trigger LLMs to output targeted, compromised responses only for specific queries (e.g., ``Who should I vote for the US President?'') while maintaining high utility on benign inputs. Operating in a strict black-box setting without model weight access, SPECTRE utilizes a two-stage optimization including a global semantic search followed by a greedy lexical refinement. Tested on open-source models and commercial APIs (GPT-4o-mini, GPT-3.5), SPECTRE achieves up to 70% F1 reduction on targeted queries with minimal degradation to general capabilities. We further demonstrate that these poisoned prompts evade standard defenses, including perplexity filters and typo-correction, by exploiting the natural noise found in real-world system prompts. Our code and data are available at https://github.com/vietph34/CAIN. WARNING: Our paper contains examples that might be sensitive to the readers!


翻译:大型语言模型(LLMs)正日益通过从公共市场下载的第三方系统提示词进行部署。我们发现了一个关键供应链漏洞:条件性系统提示词投毒,即攻击者将“潜伏代理”注入看似良性的提示词中。与传统旨在广泛突破拒绝机制的越狱攻击不同,我们提出的框架SPECTRE通过优化系统提示词,仅在特定查询(例如“我应该投票给谁当选美国总统?”)时触发LLMs输出目标性、受操控的响应,同时在良性输入上保持高可用性。SPECTRE在严格的黑盒环境下运行(无需模型权重访问),采用两阶段优化策略,包括全局语义搜索和贪婪词汇精炼。在开源模型和商业API(GPT-4o-mini、GPT-3.5)上的测试表明,SPECTRE在目标查询上实现了高达70%的F1分数下降,而对通用能力的影响极小。我们进一步证明,这些被投毒的提示词通过利用现实世界系统提示词中存在的自然噪声,能够规避包括困惑度过滤器和拼写纠正在内的标准防御机制。我们的代码和数据可在https://github.com/vietph34/CAIN获取。警告:本文包含可能引起读者敏感的内容示例!

0
下载
关闭预览

相关内容

大型语言模型系统中提示缺陷的分类学
专知会员服务
8+阅读 · 2025年9月19日
大型语言模型网络安全综述
专知会员服务
67+阅读 · 2024年5月12日
大型语言模型的高效提示方法综述
专知会员服务
75+阅读 · 2024年4月2日
《大型语言模型(LLMs): 训练到推理》全面概述技术细节
通信网络中大型语言模型的后门攻击的综述
专知会员服务
30+阅读 · 2023年9月5日
初学者系列:推荐系统Wide & Deep Learning详解
通过Termux打造免root安卓渗透工具
黑客技术与网络安全
16+阅读 · 2019年8月16日
Spooftooph - 用于欺骗或克隆蓝牙设备的自动工具
黑白之道
17+阅读 · 2019年2月27日
推荐系统概述
Python开发者
11+阅读 · 2018年9月27日
原创 | Attention Modeling for Targeted Sentiment
黑龙江大学自然语言处理实验室
25+阅读 · 2017年11月5日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员