Learning from Few Samples: A Novel Approach for High-Quality Malcode Generation

Haijian Ma, Daizong Liu, Xiaowen Cai, Pan Zhou, Yulai Xie
8/25/2025
cs.CRcs.AI

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

Intrusion Detection Systems (IDS) play a crucial role in network security defense. However, a significant challenge for IDS in training detection models is the shortage of adequately labeled malicious samples. To address these issues, this paper introduces a novel semi-supervised framework \textbf{GANGRL-LLM}, which integrates Generative Adversarial Networks (GANs) with Large Language Models (LLMs) to enhance malicious code generation and SQL Injection (SQLi) detection capabilities in few-sample learning scenarios. Specifically, our framework adopts a collaborative training paradigm where: (1) the GAN-based discriminator improves malicious pattern recognition through adversarial learning with generated samples and limited real samples; and (2) the LLM-based generator refines the quality of malicious code synthesis using reward signals from the discriminator. The experimental results demonstrate that even with a limited number of labeled samples, our training framework is highly effective in enhancing both malicious code generation and detection capabilities. This dual enhancement capability offers a promising solution for developing adaptive defense systems capable of countering evolving cyber threats.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{ma2025learning,
  title  = {Learning from Few Samples: A Novel Approach for High-Quality Malcode Generation},
  author = {Haijian Ma and Daizong Liu and Xiaowen Cai and Pan Zhou and Yulai Xie},
  year   = {2025},
  eprint = {2508.18148},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2508.18148v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2508.18148.svg)](https://codeofpaper.com/paper/2508.18148)

Discussion