Black-Box Guardrail Reverse-engineering Attack
On the map: LLM safety and security → Safety alignment, refusal and guardrails
Abstract (arXiv)
Large language models (LLMs) increasingly employ guardrails to enforce ethical, legal, and application-specific constraints on their outputs. While effective at mitigating harmful responses, these guardrails introduce a new class of vulnerabilities by exposing observable decision patterns. In this work, we present the first study of black-box LLM guardrail reverse-engineering attacks. We propose Guardrail Reverse-engineering Attack (GRA), a reinforcement learning-based framework that leverages genetic algorithm-driven data augmentation to approximate the decision-making policy of victim guardrails. By iteratively collecting input-output pairs, prioritizing divergence cases, and applying targeted mutations and crossovers, our method incrementally converges toward a high-fidelity surrogate of the victim guardrail. We evaluate GRA on three widely deployed commercial systems, namely ChatGPT, DeepSeek, and Qwen3, and demonstrate that it achieves an rule matching rate exceeding 0.92 while requiring less than 85 in API costs. These findings underscore the practical feasibility of guardrail extraction and highlight significant security risks for current LLM safety mechanisms. Our findings expose critical vulnerabilities in current guardrail designs and highlight the urgent need for more robust defense mechanisms in LLM deployment.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Safety alignment, refusal and guardrails, one of 12 directions in LLM safety and security. Builds on 28 of its 35 references that are in the map. First posted on arXiv 6 Nov 2025.
Builds on
28 of 35 references.
Closest ancestors · 2
Same direction, newest first
- 2025Peering Behind the Shield: Guardrail Identification in Large Language Models3 Feb
- 2024Safeguarding Large Language Models: A Survey3 Jun
Other references · 26
- 2023GPT-4 Technical Reportcited by 18,132
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 8,851
- 2020Learning to summarize from human feedbackcited by 2,562
- 2023Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversationscited by 1,124
- 2020Beyond Accuracy: Behavioral Testing of NLP models with CheckListcited by 979
- 2016Practical Black-Box Attacks against Machine Learningcited by 893
- 2016Stealing Machine Learning Models via Prediction APIscited by 602
- 2023"Do Anything Now": Characterizing and Evaluating In-The-Wild Jailbreak Prompts on Large Language Modelscited by 457
- 2018Knockoff Nets: Stealing Functionality of Black-Box Modelscited by 285
- 2024ShieldGemma: Generative AI Content Moderation Based on Gemmacited by 224
- 2018PRADA: Protecting against DNN Model Stealing Attackscited by 159
14 more
- 2024Safety Layers in Aligned Large Language Models: The Key to LLM Securitycited by 126
- 2018Stealing Hyperparameters in Machine Learningcited by 115
- 2020MAZE: Data-Free Model Stealing Attack Using Zeroth-Order Gradient Estimationcited by 99
- 2023Controlled Text Generation with Natural Language Instructionscited by 87
- 2021Deep Learning for Instance Retrieval: A Surveycited by 70
- 2022Towards Data-Free Model Stealing in a Hard Label Settingcited by 57
- 2022Controllable Text Generation with Neurally-Decomposed Oraclecited by 41
- 2024Moral Alignment for LLM Agentscited by 39
- 2023FactLLaMA: Optimizing Instruction-Following Language Models with External Knowledge for Automated Fact-Checkingcited by 37
- 2024Grounding and Evaluation for Large Language Models: Practical Challenges and Lessons Learned (Survey)cited by 20
- 2025ControlNET: A Firewall for RAG-based LLM Systemcited by 11
- 2025Sentinel: SOTA model to protect against prompt injectionscited by 6
- 2024A Critical Reflection on the Use of Toxicity Detection Algorithms in Proactive Content Moderation Systemscited by 5
- 2024Responsible AI in Construction Safety: Systematic Evaluation of Large Language Models and Prompt Engineeringcited by 5
Built on by
Not cited yet.