arXiv:2610.12415cs.CROct 2026

Manuscript Offprint

arXiv:2610.12415

ORCAGen: Orchestrating Context-Aware Malware Deception with RAG-Guided Generative AI

Shihab Ahmed, Md Sajidul Islam Sajid, Teryl Taylor, Frederico Araujo, Tariqul Islam

Shihab Ahmed*, Md Sajidul Islam Sajid*, Teryl Taylor†, Frederico Araujo†, Tariqul Islam‡

*Towson University, Towson, MD, USA; †IBM Research, Yorktown Heights, NY, USA;

†University of Maryland Baltimore County, MD, USA

sahmed23@students.towson.edu, msajid@towson.edu, {terylt, frederico.araujo}@ibm.com, mtislam@umbc.edu

Abstract—Malware defenses often remove or isolate suspicious programs as quickly as possible. While effective for containment, this approach can also waste an opportunity to observe attacker behavior and deploy targeted countermeasures. ORCAGen takes a different approach: it uses GenAI to build malware-specific deception playbooks offline, validates them before deployment, and enforces only the verified logic at runtime. ORCAGen combines Retrieval-Augmented Generation (RAG) with structured prompt engineering to generate both proof-of-concept (PoC) malware and corresponding deception orchestration code. A curated knowledge base (KB) of malware procedures and active defense strategies grounds the generation process, helping the LLM produce threat-specific and executable deception logic rather than generic or hallucinated outputs. The generated PoC malware provides a safe and reproducible way to test whether a deception strategy can disrupt, redirect, or suppress targeted malware behavior before the strategy is added to the runtime playbook. We evaluate ORCAGen across GPT-4o, GPT-5.5, Gemini 3.5 Flash, Qwen3-Coder, and Claude Sonnet 4.5 using execution success, hallucination rate, refinement effort, deception effectiveness, and runtime overhead. The evaluation covers synthesized malware scenarios and 150 real-world malware samples across keyloggers, information stealers, and ransomware. Across the evaluated scenarios, GPT-5.5 required the fewest refinements and produced no observed hallucinated APIs, while Gemini 3.5 Flash achieved the lowest response time and runtime overhead. The results show that RAG-guided structured prompting can support the scalable construction of malware-specific deception playbooks that remain lightweight and deterministic during runtime enforcement.

Index Terms—Cyber Deception, Generative AI, RAG, LLM, Malware

I. INTRODUCTION

Malware defense often ends with containment: detect the process, isolate it, and remove it as quickly as possible. While this response is necessary in many cases, it also limits what defenders can learn after compromise. Once malware is terminated, defenders may lose visibility into how it searches for credentials, captures user input, scans files, selects encryption targets, or adapts to the host environment. This creates a practical gap. Modern malware is difficult to detect early because it uses polymorphism, code obfuscation, dynamic API resolution, and anti-analysis techniques, yet immediate removal can prevent defenders from observing the behavior needed to build targeted responses.

Cyber deception offers a complementary approach. Instead of only blocking or removing malicious activity, deception can engage malware in controlled ways by presenting honeyfiles, false credentials, decoy services, or manipulated API responses [1]–[3]. This allows defenders to slow, mislead, or suppress malicious behavior while preserving visibility into the attack. However, most deception systems still depend on manually configured rules and static ploys [4]–[6]. As malware behavior changes, these manually engineered strategies become difficult to scale. A practical deception system must therefore construct threat-specific responses, validate them before deployment, and enforce them at runtime without adding fragile decision logic to the attack path.

Generative AI (GenAI) creates a new opportunity for building such deceptive systems. Large language models (LLMs) can generate operational code when guided by structured prompts and domain context, and recent work has shown their usefulness in malware emulation, attack scripting, and controlled security testing [7], [8]. Yet most GenAI-based deception work focuses on generating static artifacts such as honeytokens, baits, fake user profiles, or interactive responses from general prompts [9]–[12]. These systems do not fully address how to generate malware-specific deception logic, test whether it works, and deploy it safely against runtime malware behaviors. Using live LLM inference during malware execution would also introduce latency, reliability, and safety concerns. The key challenge is therefore not simply to generate deception artifacts, but to generate deception logic that can be grounded, tested, and compiled into a reliable runtime playbook.

This paper presents ORCAGen, a GenAI-enabled framework for constructing malware-specific deception playbooks that defenders can deploy after a suspicious process, malware family, or target behavior has been identified. ORCAGen separates playbook construction from runtime enforcement. During the offline phase, it uses Retrieval-Augmented Generation (RAG) and structured prompt engineering to generate both proof-of-concept (PoC) malware and corresponding deception orchestration code. PoC malware provides a safe and reproducible way to emulate behaviors such as keylogging, credential theft, and ransomware-style file operations. The generated deception logic is then compiled, executed, and validated against the PoC behavior. Only verified logic is added to a deployable playbook, which performs runtime enforcement without live LLM inference. During incident response, defenders can inject the validated Super DLL into a suspicious process to disrupt, redirect, or suppress malware behavior through pre-tested interventions instead of immediately terminating the process and losing visibility into attacker actions. At the core of ORCAGen is a curated knowledge base that maps malware procedures to active defense strategies. The knowledge base is built from academic publications, threat intelligence reports, malware blogs, and technical documentation. During generation, RAG retrieves relevant malware procedures and defense strategies and injects them into structured prompt templates. This grounding helps the model generate code that is specific to the target malware behavior rather than generic or hallucinated. To the best of our knowledge, ORCAGen is the first framework to combine GenAI and RAG for offline generation, validation, and compilation of malware-specific deception playbooks that can be enforced at runtime through validated, deterministic logic. The key contributions of this work are as follows:

• We construct a structured knowledge base (KB) that maps malware techniques to corresponding active defense strategies, providing the grounding needed for threat-specific deception generation.

• We design a RAG-guided prompt architecture that retrieves relevant malware and defense knowledge during offline generation, enabling LLMs to produce behaviorally consistent PoC malware and deception orchestration code without additional model training.

• We design an offline playbook generation and validation workflow that adds only verified ploys to the runtime playbook by (i) creating PoC malware, (ii) generating corresponding deception logic, and (iii) testing the deception in a controlled environment.

• We comprehensively evaluate ORCAGen across multiple LLMs using execution success, hallucination rate, refinement effort, deception effectiveness, and runtime overhead.

The remainder of this paper is organized as follows. Section II provides background on GenAI, RAG, and deception-oriented orchestration. Section III provides the threat model. Section IV presents the ORCAGen design. Section V presents the evaluation. Section VI reviews related work. Section VII concludes the paper.

References (33)