1.College of Command and Control Engineering,Army Engineering University of PLA,Nanjing 210001,China
2.School of Cyber Science and Engineering,Sichuan University,Chengdu 610065,China
3.Jiangsu College of Engineering and Technology,Nantong 226001,China
Show less
文章历史+
Received
Accepted
Published
2025-08-27
2025-11-01
2026-03-28
Issue Date
2026-04-15
PDF (1268K)
摘要
大型语言模型(Large Language Models,LLMs)在自然语言处理领域展现出强大的能力,但其安全漏洞,尤其是越狱攻击已成为当前的核心挑战。越狱攻击利用精心构造的对抗性提示突破模型的安全对齐机制,揭示了基于人类反馈强化学习(Reinforcement Learning from Human Feedback,RLHF)等对齐技术的局限性。当前基于模版或者手工设计的越狱方法因其成功率低且泛化性差,在持续迭代的LLMs安全机制下迅速失效。而基于优化的越狱方法凭借其自动生成对抗性提示的能力,在攻击成功率和隐蔽性方面表现显著,能够有效规避常规检测手段。针对白盒攻击对梯度信息的依赖与迁移性差等问题,本文聚焦黑盒优化范式,首次系统性地将现有越狱方法归纳为4类框架:基于遗传算法的优化、基于强化学习的优化、基于模糊测试的优化和基于LLMs对抗生成的优化。深入剖析各类方法的核心机制、技术优势与约束。本文的主要贡献在于提出一种新颖的分类体系与研究视角,明确指出现有防御手段在实时性、泛化性和攻防平衡方面的严重不足,并进一步倡导构建动态化防御架构与标准化评估基准,为探索LLMs在对抗环境中的安全性与性能平衡机制提供理论支持与实践指引。
Abstract
Large Language Models (LLMs) have demonstrated remarkable capabilities in Natural Language Processing (NLP).However, their security vulnerabilities, particularly jailbreak attacks, pose a critical challenge.These attacks circumvent safety alignment mechanisms through carefully crafted adversarial prompts, revealing the limitations of alignment techniques like Reinforcement Learning from Human Feedback (RLHF).Template-based or manually crafted jailbreak methods typically exhibit low success rates and poor generalization, and they rapidly become obsolete as LLM safety mechanisms evolve.In contrast, optimization-based methods automatically generate adversarial prompts, leading to higher success rates and better stealthiness that effectively bypass common detection mechanisms.To overcome the limitations of white-box attacks, such as their reliance on gradients and limited transferability, the review investigates the black-box optimization paradigm and presents the first systematic taxonomy of jailbreak methods: Genetic Algorithm (GA)-based, Reinforcement Learning (RL)-based, Fuzzing-based, and LLM-based Adversarial Optimization.We delve into the core mechanisms, technical strengths, and limitations of each category.The primary contribution of this survey is proposing a novel taxonomy that critically examines existing defenses' deficiencies in real-time performance, generalizability, and attack-defense balance.It further advocates for dynamic defense architectures and standardized benchmarks, thereby providing a theoretical foundation and practical guidance for balancing the security and performance of LLMs in adversarial settings.
近年来,大型语言模型(Large Language Models,LLMs)如GPT-4[1]、Claude[2]和LLaMA[3]等,在自然语言处理领域展现出强大的生成与推理能力,其应用已逐步扩展到教育[4]、医疗[5]和金融[6]等社会关键行业领域。然而,随着模型能力的指数级增长,其潜在的安全风险也日益凸显。其中,越狱攻击作为能系统性突破LLMs内容审查和安全防护边界的对抗策略,已成为AI安全研究的关键前沿。这不仅因为其直指大语言模型价值对齐的潜在漏洞,而且其大范围地影响了基于LLMs的各种应用,让人们对其使用安全性产生了深度怀疑。
为了全面总结现有的越狱技术,不同调查研究者提出了自己的越狱技术分类。Jin等[10]对LLMs和VLMs(Vision Language Models)的越狱攻击方法和防御策略进行了系统的调研和分析。Xu等[11]全面系统评估了在3种不同语言模型Vicuna、LLama和GPT-3.5Turbo中应用的9种攻击技术和7种防御技术的有效性,并且建立了评估LLMs安全性的综合框架。Yi等[12]根据目标LLM对攻击者的透明度,将越狱攻击方法分为黑盒攻击和白盒攻击,并进一步细化其中的分类。本文还强调了不同攻击技术和防御方法之间的关系,让研究人员对模型可能存在的安全风险和未来防御建设有了更加深入的理解。
本研究采用系统性文献检索策略,覆盖多个主流学术数据库,包括Google Scholar、IEEE Xplore、ACM Digital Library和DBLP,同时纳入ArXiv预印本库,以确保涵盖该领域最新研究进展。检索以“LLMs”和“jailbreak”为核心关键词,时间范围定为2023年至2025年这3年。初步检索结果如下:Google Scholar返回979条记录,IEEE Xplore收录24篇文献,ACM Digital Library包含21项研究,DBLP索引159篇论文,ArXiv预印本库提供455篇相关文献。初步共获得了1638篇与LLMs越狱攻击相关的文献记录。鉴于各数据库存在文献交叉重复,执行去重处理后,最终保留1167篇有效研究论文。
AchiamJ, AdlerS, AgarwalS, et al.GPT-4 TechnicalReport[EB/OL].[2025-03-22].
[2]
EnisM, HopkinsM.From LLM to NMT: Advancing low-resource machine translation with claude[EB/OL].[2025-03-24].
[3]
TouvronH, MartinL, StoneK, et al.Llama 2: Open foundation and fine-tuned chat models[EB/OL].[2025-03-16].
[4]
GuS, KnollA, JinM.TeaMs-RL: Teaching LLMs to generate better instruction datasets via reinforcement learning[EB/OL].[2025-04-15].
[5]
LiQ, LiuH, GuoC, et al.Merging clinical knowledge into large language models for medical research and applications: A survey[EB/OL].[2025-03-19].
[6]
WuS, IrsoyO, LuS, et al.BloombergGPT: A large language model for finance[EB/OL].[2025-04-02].
[7]
ZouA, WangZ, CarliniN, et al.Universal and transferable adversarial attacks on aligned language models[EB/OL].[2025-04-20].
[8]
OuyangL, WuJ, JiangX, et al.Training language models to follow instructions with human feedback[C]//Proceedings of the 36th International Conference on Neural Information Processing Systems.New Orleans, USA: Curran Associates Inc., 2022: 27730-27744.
[9]
PerezE, RingerS, LukosiuteK, et al.Discovering language model behaviors with model-written evaluations[C]//Findings of the Association for Computational Linguistics: ACL 2023.Toronto, Canada: Association for Computational Linguistics, 2023: 13387-13434.
[10]
JinH, HuL, LiX, et al.JailbreakZoo: Survey, landscapes, and horizons in jailbreaking large language andvision-language models[EB/OL].[2025-03-20].
[11]
XuZ, LiuY, DengG, et al.A comprehensive study of jailbreak attack versus defense for large language models[C]//Findings of the Association for Computational Linguistics ACL 2024.Bangkok, Thailand and virtual meeting.Stroudsburg, PA, USA: ACL, 2024: 7432-7449.
[12]
YiS, LiuY, SunZ, et al.Jailbreak attacks and defenses against large language models: A survey[EB/OL].[2025-03-24].
[13]
VieA, KleinnijenhuisA M, FarmerD J.Qualities, challenges and future of genetic algorithm: A literature review[EB/OL].[2025-04-06].
[14]
HuangF Q, YouJ R, TuL N, et al. Systematic re- view methodology: Cases, procedures, and values [J].E Educ Res, 2017, 38(11): 11-18, 25.
LiX Z, MoreschiniS, ZhangZ Y, et al.The anatomy of a vulnerability database: A systematic mapping study[J].J Syst Softw, 2023, 201: 111679.
[17]
LapidR, LangbergR, SipperM.Open sesame! Universal black-box jailbreaking of large language models [J].Appl Sci, 2024, 14(16): 7150-7163.
[18]
LiuX G, XuN, ChenM H, et al.AutoDAN: Generating stealthy jailbreak prompts on aligned large language models[C]//Proceedings of the 12th International Conference on Learning Representations.Vienna, Austria: ICLR, 2024: 7739.
[19]
LiX, LiangS, ZhangJ, et al.Semantic mirror jail- break: Genetic algorithm based jailbreak prompts against open-source LLMs[EB/OL].[2025-04-07].
[20]
WangX, HuangV S J, ChenR, et al.BlackDAN: A black-box multi-objective approach for effective and contextual jailbreaking of large language models [EB/OL].[2025-04-07].
[21]
YuM, FangJ, ZhouY, et al.LLM-Virus: Evolutionary jailbreak attack on large language models [EB/OL].[2025-04-08].
[22]
WuT Y, XueZ W, LiuY, et al.Geneshift: Impact of different scenario shift on jailbreaking LLM[C]//ICLR 2025 Workshop on Foundation Models in the Wild.Singapore: ICLR, 2025: 82.
[23]
HuangY, SunY T, RuanS W, et al.Breaking the ceiling: Exploring the potential of jailbreak attacks through expanding strategy space[C]//Findings of the Association for Computational Linguistics: ACL 2025.Vienna, Austria: Association for Computational Linguistics, 2025: 7870-7888.
[24]
ChenX, GuoW, NieY, et al.When LLM meets DRL: Advancing jailbreaking efficiency via DRL-guided search[C]//Advances in Neural Information Processing Systems 37.Vancouver, BC, Canada:Neural Information Processing Systems Foundation, Inc.(NeurIPS), 2024: 26814-26845.
[25]
ChenX, NieY, YanL, et al.RL-JACK: Reinforcement learning-powered black-box jailbreaking attack against LLMs[EB/OL].[2025-04-10].
[26]
LinZ, MaW, ZhouM, et al.PathSeeker: Exploring LLM security vulnerabilities with a reinforcement learning-based jailbreak approach[EB/OL].[2025-04-20].
[27]
JawadH, ChenikY, BrunelN J B.Towards universaland black-box query-response only attack on LLMs with QROA[EB/OL].[2025-04-19].
[28]
JhaP, AroraA, GaneshV.LLM STINGER: Jailbreaking LLMs using RL fine-tuned LLMs (student abstract)[C]//Proceedings of the Thirty-Ninth AAAI Conference on Artificial Intelligence.Palo Alto, CA: AAAI Press,2025: 29393-29395.
[29]
WangX, PengJ, XuK, et al.Reinforcement learning-driven LLM agent for automated attacks on LLMs[C]//Proceedings of the Fifth Workshop on Privacy in Natural Language Processing.Bangkok, Thailand.Stroudsburg, PA, USA: ACL, 2024: 170-177.
[30]
LeeS, NiS, WeiC, et al.xJailbreak: Representation space guided reinforcement learning for interpretable LLM jailbreaking[EB/OL].[2025-04-17].
[31]
LiuY, ZhouS, LuY, et al.Auto-RT: Automatic jail-break strategy exploration for red-teaming large language models[EB/OL].[2025-04-19].
[32]
GuoW, ShiZ, LiZ, et al.Jailbreak-R1: Exploring the jailbreak capabilities of LLMs via reinforcement learning[EB/OL].[2025-04-22].
[33]
TangX H, XiaoW J, YaoZ J, et al.SwordEcho: A LLM jailbreaking optimization strategy driven by reinforcement learning [C]//Proceedings of the 2024 8th International Conference on Computer Science and ArtificialIntelligence.New York: Association for Computing Machinery, 2025: 183-190.
[34]
YuJ H, LinX W, YuZ, et al.GPTFUZZER: Red teaming large language models with auto-generated jailbreak prompts[EB/OL].[2025-04-13].
[35]
YuJ H, LinX W, YuZ, et al.LLM-Fuzzer: Scaling assessment of large language model jailbreaks [C]//Proceedings of the 33rd USENIX Security Symposium.Philadelphia, PA: USENIX Association, 2024: 4657-4674.
[36]
GongX L, LiM Z, ZhangY L, et al.PAPILLON:Efficient and stealthy fuzz testing-powered jailbreaks for LLMs[C]//Proceedings of the 34th USENIX Conferenceon Security Symposium.Seattle, WA: USENIX Association, 2025: 2401-2420.
[37]
ChaoP, RobeyA, DobribanE, et al.Jailbreaking black box large language models in twenty queries [C] //Proceedings of the 2025 IEEE Conference on Secure and Trustworthy Machine Learning (SaTML).Piscataway, NJ: IEEE, 2025: 23-42.
[38]
JiangW P, WangZ T, ZhaiJ, et al.An optimizable suffix is worth a thousand templates: Efficient blackbox jailbreaking without affirmative phrases via LLM as optimizer[C]//Findings of the Association for Computational Linguistics: NAACL 2025.Albuquerque,New Mexico:Association for Computational Linguistics,2025: 5471-5483.
[39]
AndersonH, KarbasiA, KassianikP, et al.Tree of attacks: Jailbreaking black-box LLMs automatically [C]//Advances in Neural Information Processing.Vancouver, BC, Canada:Neural Information Processing Systems Foundation, Inc.(NeurIPS), 2024: 61065-61105.
[40]
ChenJ W, YangX, FangZ W, et al.AutoBreach: Universal and adaptive jailbreaking with efficient wordplay-guided optimization via multi-LLMs[C]//Findings of the Association for Computational Linguistics: NAACL 2025.Albuquerque, New Mexico.Stroudsburg, PA, USA: ACL, 2025: 6777-6798.
[41]
YangY, XiaoZ G, LuX, et al.SeqAR: Jailbreak LLMs with sequential auto-generated characters [C] // Proceedings of the 2025 Conference of the NorthAmerican Chapter of the Association for ComputationalLinguistics: Human Language Technologies.Albuquerque, New Mexico: Association for Computational Linguistics, 2025: 912-931.
[42]
LiY K, HuJ K, SangW D, et al.Prefill-level jail- break: A black-box risk analysis of large language models[EB/OL].[2025-04-28].
[43]
LiH Y, YeJ W, WuJ, et al.JailPO: A novel black-box jailbreak framework via preference optimization against aligned LLMs[C]//Proceedings of the 39th AAAI Conference on Artificial Intelligence.Palo Alto:AAAI Press, 2025: 27419-27427.
[44]
WangF X, DuanR J, XiaoP, et al.MRJ-Agent: An effective jailbreak agent for multi-round dialogue [EB/OL].[2025-05-06].
[45]
SunC E, LiuX D, YangW W, et al.Iterative self- tuning LLMs for enhanced jailbreaking capabilities [C]//Proceedings of the 2025 Conference of the North American Chapter of the Association for ComputationalLinguistics: Human Language Technologies.Albuquerque, New Mexico: Association for Computational Linguistics, 2025: 5768-5786.
[46]
PaulusA, ZharmagambetovA, GuoC, et al.AdvPro-mpter: Fast adaptive adversarial prompting for LLMs[EB/OL].[2025-05-06].
[47]
BasaniA R, ZhangX.GASP: Efficient black-box generation of adversarial suffixes for jailbreaking LLMs[EB/OL].[2025-04-29].
[48]
ShenX Y, ChenZ Y, BackesM, et al.“Do anything now”: Characterizing and evaluating in-the-wild jailbreak prompts on large language models [C]//Proceedings of the 2024 on ACM SIGSAC Conference on Computer and Communications Security.Salt Lake City UT USA: ACM, 2024: 1671-1685.
[49]
JainN, SchwarzschildA, WenY X, et al.Baseline defenses for adversarial attacks against aligned language models[EB/OL].[2025-05-08].
[50]
AlonG, KamfonasM.Detecting language model attacks with perplexity[EB/OL].[2025-05-16].
[51]
XieY Q, FangM H, PiR J, et al.GradSafe: Detecting jailbreak prompts for LLMs via safety-critical gradient analysis[C]//Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers).Bangkok, Thailand.Stroudsburg, PA, USA: ACL, 2024: 507-518.
[52]
CaoB, CaoY P, LinL, et al.Defending against a- lignment-breaking attacks via robustly aligned LLM [C]//Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics.Bangkok, Thailand: Association for Computational Linguistics, 2024: 10542-10560.
[53]
KumarA, AgarwalC, SrinivasS, et al.Certifying LLM Safety against Adversarial Prompting[EB/OL].[2025-05-16].
[54]
RobeyA, WongE, HassaniH, et al.SmoothLLM: Defending large language models against jailbreaking attacks[EB/OL].[2025-05-16].
[55]
JiJ B, HouB R, RobeyA, et al.Defending large language models against jailbreak attacks via seman-tic smoothing[EB/OL].[2025-05-21].
[56]
HuX M, ChenP Y, HoT Y.Gradient cuff: Detecting jailbreak attacks on large language models by exploring refusal loss landscapes[C]//Proceedings of the 38th International Conference on Neural Information Processing Systems.Vancouver, Canada: Curran Associates Inc., 2025: 126265-126296.
[57]
ZengY F, WuY R, ZhangX, et al.AutoDefense: Multi-agent LLM defense against jailbreak attacks [EB/OL].[2025-05-23].
[58]
ZhengR, GuoH Y, LiuZ H, et al.Toward optimal LLM alignments using two-player games[EB/OL].[2025-05-26].
[59]
CaiZ, ShabihiS, AnB, et al.AegisLLM: Scaling agentic systems for self-reflective defense in LLM security[EB/OL].[2025-06-01].
[60]
DengB, WangW J, FengF L, et al.Attack prompt generation for red teaming and defending large language models[C]//Findings of the Association for Computational Linguistics: EMNLP 2023.Singapore.Stroudsburg, PA, USA: ACL, 2023: 2176-2189.
[61]
DengG L, LiuY, LiY K, et al.MASTERKEY: Automated jailbreaking of large language model chat-bots[C]//Proceedings of the 2024 Network and Distributed System Security Symposium.Reston, VA:Internet Society, 2024.
[62]
WangY, MoY, WangY, et al.Fight back against jailbreaking via prompt adversarial tuning[C]//Advances in Neural Information Processing Systems 37.Vancouver, BC, Canada: Neural Information Processing Systems Foundation, Inc.(NeurIPS), 2024: 64242-64272.
[63]
LiB, WangH, ZhouA.Robust prompt optimization for defending language models against jailbreaking attacks[C]//Advances in Neural Information Processing Systems 37.Vancouver, BC, Canada: Neural Information Processing Systems Foundation, Inc.(NeurIPS), 2024: 40184-40211.
[64]
MazeikaM, PhanL, YinX W, et al.HarmBench: A standardized evaluation framework for automated red teaming and robust refusal[C]//Proceedings of the 41st International Conference on Machine Learning.Vienna, Austria: JMLR.org, 2024: 35181-35224.
[65]
ChaoP, DebenedettiE, RobeyA, et al.Jailbreak Bench: An open robustness benchmark for jailbreaking large language models[C]//Advances in Neural Information Processing Systems.Vancouver, Canada:Curran Associates, Inc., 2024: 55005-55029.
[66]
HuangY S, GuptaS, XiaM Z, et al.Catastrophic jailbreak of open-source LLMs via exploiting generation[C]//Proceedings of the 12 th International Conference on Learning Representations.Vienna, Austria: ICLR, 2024.
[67]
ZouX T, ChenY K, LiK.Is the system message really important to jailbreaks in large language models?[EB/OL].[2025-04-26].
[68]
ShuD, ZhangC, JinM, et al.AttackEval: How to evaluate the effectiveness of jailbreak attacking on large language models[J].SIGKDD Explor Newsl, 2025, 27(1): 10-19.
[69]
DengM K, WangJ Y, HsiehC P, et al.RLPrompt: Optimizing discrete text prompts with reinforcement learning[C]//Proceedings of the 2022 Conference onEmpirical Methods in Natural Language Processing.Abu Dhabi, United Arab Emirates: Association for Computational Linguistics, 2022: 3369-3391.
[70]
WuH Q. Integration of large-scale models and cloud, transition from informatization to digital intelligence [J].Journal of Chongqing University of Posts and Telecommunications(Natural Science Edition),2024, 36(1): 1-8.