MGC: A Compiler Framework Exploiting Compositional Blindness in Aligned LLMs for Malware Generation
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) have democratized software development, reducing the expertise barrier for programming complex applications. This accessibility extends to malicious software development, raising significant security concerns. While LLM providers have implemented alignment mechanisms to prevent direct generation of overtly malicious code, these safeguards predominantly evaluate individual prompts in isolation, overlooking a critical vulnerability: malicious operations can be systematically decomposed into benign-appearing sub-tasks. In this paper, we introduce the Malware Generation Compiler (MGC), a novel framework that leverages this vulnerability through modular decomposition and alignment-evasive generation. MGC employs a specialized Malware Description Intermediate Representation (MDIR) to bridge high-level malicious intents and benign-appearing code snippets. Extensive evaluation demonstrates that our attack reliably generates functional malware across diverse task specifications and categories, outperforming jailbreaking methods by +365.79% and underground services by +78.07% in correctness on three benchmark datasets. Case studies further show that MGC can reproduce and even enhance 16 real-world malware samples. This work provides critical insights for security researchers by exposing the risks of compositional attacks against aligned AI systems. Demonstrations are available at https://sites.google.com/view/malware-generation-compiler.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 34 of its 56 references that are in the map. First posted on arXiv 2 Jul 2025.
Builds on
34 of 56 references.
References · 34
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 8,065
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
- 2023MetaGPT: Meta Programming for A Multi-Agent Collaborative Frameworkcited by 1,808
- 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,651
- 2022Red Teaming Language Models with Language Modelscited by 1,026
- 2023ChatDev: Communicative Agents for Software Developmentcited by 919
- 2023Tree of Attacks: Jailbreaking Black-Box LLMs Automaticallycited by 672
- 2023Prompt Injection attack against LLM-integrated Applicationscited by 605
- 2024How Johnny Can Persuade LLMs to Jailbreak Them: Rethinking Persuasion to Challenge AI Safety by Humanizing LLMscited by 573
- 2024Executable Code Actions Elicit Better LLM Agentscited by 564
22 more
- 2023GPTFUZZER: Red Teaming Large Language Models with Auto-Generated Jailbreak Promptscited by 560
- 2023DeepInception: Hypnotize Large Language Model to Be Jailbreakercited by 367
- 2023Jailbreak in pieces: Compositional Adversarial Attacks on Multi-Modal Language Modelscited by 273
- 2023Red-Teaming Large Language Models using Chain of Utterances for Safety-Alignmentcited by 223
- 2024Security and Privacy Challenges of Large Language Models: A Surveycited by 186
- 2023Image Hijacks: Adversarial Images can Control Generative Models at Runtimecited by 172
- 2023MART: Improving LLM Safety with Multi-round Automatic Red-Teamingcited by 163
- 2024Optimization-based Prompt Injection Attack to LLM-as-a-Judgecited by 143
- 2024Making Them Ask and Answer: Jailbreaking Large Language Models in Few Queries via Disguise and Reconstructioncited by 107
- 2024Beyond Functional Correctness: Exploring Hallucinations in LLM-Generated Codecited by 107
- 2024AutoAttacker: A Large Language Model Guided System to Implement Automatic Cyber-attackscited by 96
- 2024RedCode: Risky Code Execution and Generation Benchmark for Code Agentscited by 90
- 2024Against The Achilles' Heel: A Survey on Red Teaming for Generative Modelscited by 59
- 2023Red Teaming Language Model Detectors with Language Modelscited by 55
- 2024Malla: Demystifying Real-world Large Language Model Integrated Malicious Servicescited by 33
- 2024RL-JACK: Reinforcement Learning-powered Black-box Jailbreaking Attack against LLMscited by 23
- 2023RatGPT: Turning online LLMs into Proxies for Malware Attackscited by 18
- 2024Rapid Optimization for Jailbreaking LLMs via Subconscious Exploitation and Echopraxiacited by 14
- 2024Exploring LLMs for Malware Detection: Review, Framework Design, and Countermeasure Approachescited by 13
- 2023DIVAS: An LLM-based End-to-End Framework for SoC Security Analysis and Policy-based Protectioncited by 12
- 2024Tactics, Techniques, and Procedures (TTPs) in Interpreted Malware: A Zero-Shot Generation with Large Language Modelscited by 6
- 2024Combining Domain and Alignment Vectors to Achieve Better Knowledge-Safety Trade-offs in LLMscited by 6
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Detecting Data Poisoning in Code Generation LLMs via Black-Box, Vulnerability-Oriented Scanning
- 2024An LLM-Assisted Easy-to-Trigger Backdoor Attack on Code Completion Models: Injecting Disguised Vulnerabilities against Strong Detection
- 2025"Digital Camouflage": The LLVM Challenge in LLM-Based Malware Detection
- 2025A Mixture of Linear Corrections Generates Secure Code
- 2025Smoke and Mirrors: Jailbreaking LLM-based Code Generation via Implicit Malicious Prompts
- 2025Casting a SPELL: Sentence Pairing Exploration for LLM Limitation-breaking
- 2026Grammar-Constrained Decoding Can Jailbreak LLMs into Generating Malicious Code
- 2025Automated Vulnerability Validation and Verification: A Large Language Model Approach