paper-with-me

Papers

RMCBench: Benchmarking Large Language Models' Resistance to Malicious Code

2024-09-23 · Jiachi Chen, Qingyuan Zhong, Yanlin Wang, Kaiwen Ning, Yongkun Liu, Zenan Xu, Zhe Zhao, Ting Chen, Zibin Zheng

The emergence of Large Language Models (LLMs) has significantly influenced various aspects of software development activities. Despite their benefits, LLMs also pose notable risks, including the potential to generate harmful content and being abused by malicious developers to create malicious code. Several previous studies have focused on the ability of LLMs to resist the generation of harmful content that violates human ethical standards, such as biased or offensive content. However, there is no research evaluating the ability of LLMs to resist malicious code generation. To fill this gap, we propose RMCBench, the first benchmark comprising 473 prompts designed to assess the ability of LLMs to resist malicious code generation. This benchmark employs two scenarios: a text-to-code scenario, where LLMs are prompted with descriptions to generate code, and a code-to-code scenario, where LLMs translate or complete existing malicious code. Based on RMCBench, we conduct an empirical study on 11 representative LLMs to assess their ability to resist malicious code generation. Our findings indicate that current LLMs have a limited ability to resist malicious code generation with an average refusal rate of 40.36% in text-to-code scenario and 11.52% in code-to-code scenario. The average refusal rate of all LLMs in RMCBench is only 28.71%; ChatGPT-4 has a refusal rate of only 35.73%. We also analyze the factors that affect LLMs' ability to resist malicious code generation and provide implications for developers to enhance model robustness.

📄 PDF Abstract BibTeX arXiv:2409.15154

Code (1)

qing-yuan233/RMCBench 공식 구현 pytorch

Tasks

BenchmarkingCode Generation

Similar Papers 제목 키워드 기반

Enhancing Adversarial Resistance in LLMs with Recursion

2024-12-09 · Bryan Li, Sounak Bagchi, Zizhan Wang

The increasing integration of Large Language Models (LLMs) into society necessitates robust defenses against vulnerabilities from jailbreaking and adversarial prompts. This project proposes a recursive framework for enha…

Code as a Weapon: A Consensus-Labeled Prompt Bank for Measuring Coding-Model Compliance with Malicious-Code Requests

2026-05-27 · Richard J. Young, Gregory D. Moody arxiv

A general-purpose language model that answers a harmful question returns text; a coding model that complies with a malicious request can return a working weapon: a keylogger, ransomware, an exploit that runs as written. …

Helping Large Language Models Protect Themselves: An Enhanced Filtering and Summarization System

2025-05-02 · Sheikh Samit Muhaimin, Spyridon Mastorakis

The recent growth in the use of Large Language Models has made them vulnerable to sophisticated adversarial assaults, manipulative prompts, and encoded malicious inputs. Existing countermeasures frequently necessitate re…

zero-shot-classificationZero-Shot Learning

Tamper-Resistant Safeguards for Open-Weight LLMs

2024-08-01 · Rishub Tamirisa, Bhrugu Bharathi, Long Phan, Andy Zhou 외

Rapid advances in the capabilities of large language models (LLMs) have raised widespread concerns regarding their potential for malicious use. Open-weight LLMs present unique challenges, as existing safeguards lack robu…

Red TeamingTAR

Backdoor4Good: Benchmarking Beneficial Uses of Backdoors in LLMs

2026-03-08 · Yige Li, Wei Zhao, Zhe Li, Nay Myat Min 외 arxiv

Backdoor mechanisms have traditionally been studied as security threats that compromise the integrity of machine learning models. However, the same mechanism -- the conditional activation of specific behaviors through in…