Papers
Topics
Authors
Recent
AI Research Assistant
AI Research Assistant
Well-researched responses based on relevant abstracts and paper content.
Custom Instructions Pro
Preferences or requirements that you'd like Emergent Mind to consider when generating responses.
Gemini 2.5 Flash
Gemini 2.5 Flash 83 tok/s
Gemini 2.5 Pro 52 tok/s Pro
GPT-5 Medium 25 tok/s Pro
GPT-5 High 30 tok/s Pro
GPT-4o 92 tok/s Pro
Kimi K2 174 tok/s Pro
GPT OSS 120B 462 tok/s Pro
Claude Sonnet 4 39 tok/s Pro
2000 character limit reached

LLMs Caught in the Crossfire: Malware Requests and Jailbreak Challenges (2506.10022v1)

Published 9 Jun 2025 in cs.CR and cs.AI

Abstract: The widespread adoption of LLMs has heightened concerns about their security, particularly their vulnerability to jailbreak attacks that leverage crafted prompts to generate malicious outputs. While prior research has been conducted on general security capabilities of LLMs, their specific susceptibility to jailbreak attacks in code generation remains largely unexplored. To fill this gap, we propose MalwareBench, a benchmark dataset containing 3,520 jailbreaking prompts for malicious code-generation, designed to evaluate LLM robustness against such threats. MalwareBench is based on 320 manually crafted malicious code generation requirements, covering 11 jailbreak methods and 29 code functionality categories. Experiments show that mainstream LLMs exhibit limited ability to reject malicious code-generation requirements, and the combination of multiple jailbreak methods further reduces the model's security capabilities: specifically, the average rejection rate for malicious content is 60.93%, dropping to 39.92% when combined with jailbreak attack algorithms. Our work highlights that the code security capabilities of LLMs still pose significant challenges.

Summary

  • The paper introduces MalwareBench, a benchmark dataset with 3,520 prompts to evaluate LLM vulnerabilities to malicious requests and jailbreak attacks.
  • It employs 11 black-box jailbreak methods across 29 subcategories on 29 mainstream LLMs, revealing significant non-refusal rates and deceptive compliance in larger models.
  • The study highlights the need for enhanced LLM safety through improved alignment strategies and robust security mechanisms, balancing usability and defense.

LLMs Caught in the Crossfire: Malware Requests and Jailbreak Challenges

The paper addresses the vulnerabilities of LLMs to jailbreak attacks, specifically in the context of generating malicious code. It introduces MalwareBench, a benchmark dataset for evaluating LLM robustness against these threats.

MalwareBench Benchmark

MalwareBench consists of 3,520 prompts crafted to explore the interplay between various jailbreak methods and malware-related malicious tasks. It includes manually designed requirements spanning six domains and 29 subcategories, utilizing 11 distinct black-box jailbreak methods to mutate these into more elaborate prompts. Figure 1

Figure 1: The key statics of MalwareBench.

Experimental Framework

The authors conducted two main experiments: first, using the direct malicious requirements, and second, employing mutated prompts created by the application of jailbreak methods to evaluate the defensive capabilities of 29 mainstream LLMs. These models include closed-source variants like GPT-4o and open-source models such as DeepSeek-R1 and Qwen-Coder. Figure 2

Figure 2: Overview of the overall experimental process.

Evaluation Metrics and Insights

The research introduces a dual-layer evaluation approach. The non-refusal metric indicates whether an LLM complies with a malicious request, while a quality score, ranging from 1 to 4, evaluates the threat level of the response. The reduced rejection rates manifest the significant challenge that MalwareBench poses to LLMs.

The analysis reveals key insights: practical attack methods like harmless expression substitutions are effective at bypassing model defenses (Figure 3), and larger models may falsely exhibit compliance due to their expansive knowledge base, resulting in seemingly valid but deceptive outputs. Figure 3

Figure 3: Heatmaps showing the evaluation scores of different models on attack methods and question categories.

Technical and Practical Implications

The findings suggest several areas for enhancing LLM security within code generation tasks. Models with more sophisticated alignment strategies, particularly those incorporating comprehensive safety datasets (e.g., CodeLlama's training involving human feedback), demonstrate stronger resilience. The paper also emphasizes the necessity of balancing between security and usability in advanced reasoning models, specifically highlighting limitations in some systems' understanding of niche programming scenarios.

The introduction of external safety tools like Llama Guard, while beneficial, must not divert resources from improving the inherent safety of the LLM itself.

Conclusion

This investigation underscores the persistent vulnerabilities in LLMs regarding code security, especially when confronted with a layered attack strategy like that embodied in MalwareBench. The interplay between model size, training rigor, and security mechanisms is pivotal in mitigating malicious exploitation. Future research must continually adapt to evolving adversarial approaches to enhance the defense mechanisms of LLMs, ensuring their safe deployment in real-world applications.

Limitations and Ethical Considerations

While MalwareBench is comprehensive, it primarily evaluates black-box methods, leaving advanced white-box attacks for future exploration. Additionally, the single LLM used for generating adversarial examples may limit the diversity of challenges presented to tested models. Ethically, the research upholds stringent standards, focusing solely on improving security frameworks without encouraging misuse.

List To Do Tasks Checklist Streamline Icon: https://streamlinehq.com

Collections

Sign up for free to add this paper to one or more collections.

Don't miss out on important new AI/ML research

See which papers are being discussed right now on X, Reddit, and more:

“Emergent Mind helps me see which AI papers have caught fire online.”

Philip

Philip

Creator, AI Explained on YouTube