A Reward-driven Automated Webshell Malicious-code Generator for Red-teaming
On the map: LLM safety and security → Prompt injection and agent security
Abstract (arXiv)
Frequent cyber-attacks have elevated WebShell exploitation and defense to a critical research focus within network security. However, there remains a significant shortage of publicly available, well-categorized malicious-code datasets organized by obfuscation method. Existing malicious-code generation methods, which primarily rely on prompt engineering, often suffer from limited diversity and high redundancy in the payloads they produce. To address these limitations, we propose RAWG, a Reward-driven Automated Webshell Malicious-code Generator designed for red-teaming applications. Our approach begins by categorizing webshell samples from common datasets into seven distinct types of obfuscation. We then employ a large language model (LLM) to extract and normalize key tokens from each sample, creating a standardized, high-quality corpus. Using this curated dataset, we perform supervised fine-tuning (SFT) on an open-source large model to enable the generation of diverse, highly obfuscated webshell malicious payloads. To further enhance generation quality, we apply Proximal Policy Optimization (PPO), treating malicious-code samples as "chosen" data and benign code as "rejected" data during reinforcement learning. Extensive experiments demonstrate that RAWG significantly outperforms current state-of-the-art methods in both payload diversity and escape effectiveness.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Prompt injection and agent security, one of 12 directions in LLM safety and security. Builds on 22 of its 37 references that are in the map. First posted on arXiv 30 May 2025.
Builds on
22 of 37 references.
Closest ancestors · 1
Same direction, newest first
Other references · 21
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2017Proximal Policy Optimization Algorithmscited by 14,441
- 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,355
- 2020Learning to summarize from human feedbackcited by 2,562
- 2019Fine-Tuning Language Models from Human Preferencescited by 2,124
- 2022BioGPT: Generative Pre-trained Transformer for Biomedical Text Generation and Miningcited by 531
- 2024BioMistral: A Collection of Open-Source Pretrained Large Language Models for Medical Domainscited by 299
- 2023FinGPT: Open-Source Financial Large Language Modelscited by 244
- 2024BioMedLM: A 2.7B Parameter Language Model Trained On Biomedical Textcited by 85
- 2023Clinical Camel: An Open Expert-Level Medical Language Model with Dialogue-Based Knowledge Encodingcited by 71
- 2024Reinforcement Learning from Multi-role Debates as Feedback for Bias Mitigation in LLMscited by 22
- 2024Randomized Exploration in Cooperative Multi-Agent Reinforcement Learningcited by 17
9 more
- 2024PBI-Attack: Prior-Guided Bimodal Interactive Black-Box Jailbreak Attack for Toxicity Maximizationcited by 17
- 2024Upper and Lower Bounds for Distributionally Robust Off-Dynamics Reinforcement Learningcited by 15
- 2024AGR: Age Group fairness Reward for Bias Mitigation in LLMscited by 12
- 2024Gibberish is All You Need for Membership Inference Detection in Contrastive Language-Audio Pretrainingcited by 10
- 2024SelfPrompt: Autonomously Evaluating LLM Robustness via Domain-Constrained Knowledge Guidelines and Refined Adversarial Promptscited by 10
- 2024TUNI: A Textual Unimodal Detector for Identity Inference in CLIP Modelscited by 8
- 2025Can LLMs Handle WebShell Detection? Overcoming Detection Challenges with Behavioral Function-Aware Frameworkcited by 5
- 2024Research and application of artificial intelligence based webshell detection model: A literature reviewcited by 4
- 2024Large Language Models are Few-shot Generators: Proposing Hybrid Prompt Algorithm To Generate Webshell Escape Samplescited by 2
Built on by
Citing papers per year: 2026: 1.
1 paper.