AI-Generated PowerShell Malware: An Experimental Framework and Dataset

Luciano Pianese, Vittorio Orbinato, Pietro Liguori, Roberto Natella
6/29/2026
cs.CRcs.AI
benchmark-dataset

No confident code implementation found for this paper.

Abstract

Generative AI has emerged as a significant cybersecurity threat, with several recent attack campaigns leveraging LLMs to generate code for malicious purposes via scripting languages such as PowerShell. Consequently, for cybersecurity analysts, it is imperative to investigate the offensive capabilities of AI code generators.

Show full abstract

In this paper, we propose an experimental framework to assess LLM-generated PowerShell malware, which comprises a novel sandbox approach for dynamic analysis of AI-generated malware. Furthermore, we present a novel, manually curated dataset of real-world PowerShell malware, annotated in natural language to assist the training and evaluation of LLMs. Finally, this study evaluates permissive, open-weight LLMs adapted to PowerShell malware generation. Our results reveal a high degree of similarity between real malware and LLM-generated ones in terms of triggered OS malicious events, with a median Jaccard index of 84.5% and 48.4% of instances achieving complete overlap.

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. Any repos shown below are weak matches — 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{pianese2026aigenerated,
  title  = {AI-Generated PowerShell Malware: An Experimental Framework and Dataset},
  author = {Luciano Pianese and Vittorio Orbinato and Pietro Liguori and Roberto Natella},
  year   = {2026},
  eprint = {2606.30819},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2606.30819v1}
}

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/2606.30819.svg)](https://codeofpaper.com/paper/2606.30819)

Discussion