With the use of AI agents catching wind across the offensive security space, from social engineering to vulnerability research, it was inevitable that malware would follow suit. While most discussions focus on targeting AI, using it to generate malicious payloads at a malware’s runtime, or “vibe coding” it, we went a step further: we built a system where AI is the sole participant in the malware creation process itself.
We will begin by talking about how we got to this point, what sparked the idea, and jump into comparing different models – showing which gave the best code, which was most evasive, which prompts worked the best, and what we used in the agent.
We will then dig into the generation process itself – we will show the challenges with earlier approaches, how we solved them, how to build the workflow to maximize the malware’s capability and randomization, how it managed to break signatures, and how to generate millions of samples.
We will finish by showing how attackers are using similar methods, look at real examples in the wild, and discuss how to use these techniques for ourselves, both as attackers and defenders.
AI has already changed the offensive security space significantly, from autonomous phishing campaigns and deepfake based social engineering to AI assisted vulnerability research and fuzzing. Malware is the next step, and the question isn’t whether AI will be used to generate it, but how far that’s already gone and where it leads.
This talk covers a research project that builds an autonomous agent to generate new, functional, never seen before malware samples from scratch. The focus is on the full process: what models to use and why, how to prompt them, how to ensure the output compiles and works, how to break static signatures, and how to scale generation into the millions of unique samples.
The main topics covered:
AI driven offensive security and AI driven malware
AI is already being used across the offensive security space, from phishing to full vulnerability research and fuzzing, and malware seems like the obvious step as AI “will replace all developers”, why not malware developers? What does AI driven malware even mean? What are the different possibilities that AI in malware gives us?
The generation process: models, prompts, and workflow
Before automating anything, manual testing across of models and prompts is needed. After that, how can we ensure that the malware is random, compileable, and will work flawlessly? There are several steps that need to be taken before that can be achieved: from planning the malware, to writing and fixing it, to then actually validating its functionality with AI as a judge, all without human interaction.
Adding variety in the samples
The agent makes a lot of decisions based on a plan that it creates beforehand, for example, there are several ways to traverse a directory in Windows, there are several encryption algorithms that can be used, all of these and more do affect the result. In restructuring the project from one file to several, adding different languages, asking for specific capabilities (without specifying how to implement them), all adding to the number of decisions and possibilities.
AI malware in the wild
Malicious actors are already using these ideas in the wild: from general vibe coding and assisted development to full autonomous agents and workflows that create full malware and attack frameworks, to deter and disrupt defence mechanisms and blue teams.
Takeaways for defenders and attackers
AI generated malware lowers the bar for attackers significantly: guardrails on frontier models are consistently bypassed, and local models require no permissions at all, but behaviour based detection remains effective because functional patterns persist even as signature changes. The same generation pipeline can be turned into a red teaming tool to test your own systems and see what you know about your environment.
What Can You Gain From This
• A technical walkthrough of how an autonomous agent generates functional malware samples end to end, including the prompting strategies, model selection, and loops involved.
• Test results comparing different models, prompts, and methods, while sticking to actual detection rates.
• A framework for generating diverse malware samples at scale for use in testing detection systems.
• Documented real world examples of AI assisted and AI integrated malware from attributed threat actors.