mlsanityData to 14 Oct 2026

RedShell: A Generative AI-Based Approach to Ethical Hacking

arXiv 2604.11506 ↗First posted 13 Apr 2026cs.CRcited by 1

Not on the map. Why?

Abstract (arXiv)

The application of Machine Learning techniques in code generation is now a common practice for most developers. Tools such as ChatGPT from OpenAI leverage the natural language processing capabilities of Large Language Models to generate machine code from natural language descriptions. In the cybersecurity field, red teams can also take advantage of generative models to build malicious code generators, providing more automation to Pentest audits. However, the application of Large Language Models in malicious code generation remains challenging due to the lack of data to train and evaluate offensive code generators. In this work, we propose RedShell, a tool that allows ethical hackers to generate malicious PowerShell code. We also introduce a ground truth dataset, combining publicly available code samples to fine-tune models in malicious PowerShell generation. Our experiments demonstrate the strong capabilities of RedShell in generating syntactically valid PowerShell, with fewer than 10% of the generated samples resulting in parse errors. Furthermore, our specialized model was able to produce samples that were semantically consistent with reference snippets, achieving a competitive performance on standard output similarity metrics such as Edit Distance and METEOR, with their mean similarity scores exceeding 50% and 40%, respectively. This work sheds light on the state-of-the-art research in the field of Generative AI applied to Pentesting, and also serves as a steppingstone for future advancements, highlighting the potential benefits these models hold within such controlled environments.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). First posted on arXiv 13 Apr 2026.

Builds on

No reference list yet.

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2025A Reward-driven Automated Webshell Malicious-code Generator for Red-teaming
  2. 2025PenTest2.0: Towards Autonomous Privilege Escalation Using GenAI
  3. 2025CySecBench: Generative AI-based CyberSecurity-focused Prompt Dataset for Benchmarking Large Language Models
  4. 2025PurpCode: Reasoning for Safer Code Generation
  5. 2023The "code'' of Ethics:A Holistic Audit of AI Code Generators
  6. 2025RedCoder: Automated Multi-Turn Red Teaming for Code LLMs
  7. 2024RedCode: Risky Code Execution and Generation Benchmark for Code Agents
  8. 2023TrojanedCM: A Repository of Trojaned Large Language Models of Code