AI Agents Enable Adaptive Computer Worms

Jonas Guan, Tom Blanchard, Hanna Foerster, Hengrui Jia, Gabriel Huang, Nicolas PapernotarXiv 2026

TL;DR

This paper introduces a fundamentally new cybersecurity threat: an autonomous, self-replicating AI computer worm that generates tailored attack strategies at runtime using a locally hosted, open-weight Large Language Model (LLM). Unlike traditional malware with fixed exploit code, this worm adapts to heterogeneous targets (Linux, Windows, IoT) and scales its reasoning capabilities by parasitically deploying copies of its LLM on compromised GPU nodes. Running entirely on local hardware, it completely bypasses centralized API safety controls, creating a highly destabilizing economic asymmetry where the attacker's marginal cost per infection drops to zero.

What Problem Does This Paper Address?

Traditional computer worms, like WannaCry or NotPetya, operate on encoded logic—pre-compiled exploit chains targeting a fixed set of vulnerabilities. Once defenders patch those specific flaws, the worm's spread is halted. This paper addresses a critical question: Can generative AI be coupled with self-replication to create an autonomous adversary capable of generating attack logic on the fly?

If possible, this collapses a historical trade-off in cybersecurity economics. Previously, highly tailored attacks required expensive, manual human engineering, while automated worms were highly scalable but easily blocked by patches. An AI-driven worm could achieve both massive scale and target-specific adaptation, fundamentally altering the defensive landscape.

Methods

The authors constructed a proof-of-concept worm driven by an off-the-shelf, quantized open-weight LLM running on a single local GPU. To overcome the typical limitations of smaller models (brittleness, short context windows, poor instruction-following), they engineered a sophisticated agentic harness:

  • Execution Phases: The attack lifecycle is split into 8 discrete phases (from network discovery to privilege escalation and replication) to keep the model's focus narrow.
  • Reasoning Graph: A directed graph of specialized LLM nodes (Plan, Judge, Action, Summary, Progress) ensures that each LLM call handles only a single, well-defined analytical task.
  • Hierarchical Memory: A three-tiered memory system (General, Host, and Vulnerability) prevents context pollution.
  • Swarm Orchestration: Multiple active replicas coordinate via a distributed service to share harvested credentials, avoid duplicate work, and forward reasoning queries from low-compute IoT devices to compromised GPU nodes.
Figure 1: An AI-driven worm propagates across a heterogeneous network by parasitically acquiring compu- tational resources for autonomous reasoning. a) Propagation of the worm through a simulated corporate network. The network contains servers, workstations, and IoT devices, each running common services or operating systems (representative examples shown via icons). The depicted propagation reflects a real trajectory of the worm spreading in an isolated test environment over 48 hours. The worm uses stolen computing power from compromised GPU nodes to host LLMs for generative reasoning. It then uses this reasoning to detect vulnerabilities and devise tailored attacks against additional targets, furthering its spread. Red arrows indicate worm propagation between machines. Compromised low-compute machines extend the worm’s reach, and query upstream GPU nodes for reasoning. Blue arrows indicate the flow of reasoning queries. For simplicity, unsuccessfully targeted hosts are omitted. b) Internal architecture of the worm. The system consists of two main components: a single-GPU LLM running on a compromised GPU, and the surrounding agentic framework. This agentic framework is organised into three modules: an agent core (recursive reasoning over observations), a memory module (context and information management), and a tools module for interacting with target machines (shell session management, file transfers, payload deployment, etc.).
Figure 3: Worm agent execution phases. The agent progresses through eight phases: network and host discovery (blue, 1–2), foothold exploitation (coral, 3), privilege escalation discovery and exploitation (amber and crimson, 4–5), and replication (green, 6–8). The execution phases determine the high-level context and tool family exposed to the agent at each stage. Operational details are intentionally redacted. Dashed arrow: privilege escalation is skipped when the foothold already grants elevated privileges. Dotted arrow: the agent abandons or defers a target when exploitation does not progress within the allowed execution policy.

Datasets

To safely evaluate the worm, the authors built FakeCorp, a custom, isolated virtual network environment consisting of 33 heterogeneous virtual machines spanning various flavors of Linux (Ubuntu, Debian, Alpine, CentOS) and Windows Server.

The hosts were seeded with real-world vulnerabilities drawn from authoritative threat taxonomies like the CISA Known Exploited Vulnerabilities (KEV) catalog, the OWASP Top 10 (2025), and the MITRE ATT&CK framework. Crucially, the environment included three "one-day" vulnerabilities disclosed in 2026—well after the LLM's training cutoff date—to test the worm's ability to ingest and operationalize new public advisories at runtime.

Key Insights and Ideas

  • Scaffolding Beats Model Size: The most surprising insight is that raw model capability is not the primary bottleneck for cyber-offense. A highly structured agentic harness can elevate a small, single-GPU open-weight model to execute complex, multi-step network attacks that were previously thought to require massive frontier models.
  • The Irrelevance of Centralized Guardrails: Because the worm relies entirely on local open weights, cloud-vendor API monitoring, rate-limiting, and service refusals are completely bypassed.
  • Dynamic Knowledge Absorption: The worm doesn't just rely on its training data; it can read a newly published vulnerability advisory at runtime and synthesize a working exploit zero-shot.
  • Compute as a Parasitic Resource: By treating compromised GPUs as infrastructure to host its own reasoning nodes, the worm achieves self-sustaining, decentralized execution with no single point of failure.

Key Results

In 15 independent, fully autonomous 7-day experimental runs on the FakeCorp network:

  • The worm successfully exploited an average of 73.8% of the network and replicated to 61.8% of it, reaching up to 7 generations of self-replication.
  • It achieved an 82% success rate in vulnerability detection across both specific CVEs (Common Vulnerabilities and Exposures) and abstract CWEs (Common Weakness Enumerations).
  • While individual exploit execution was fragile (a 44% success rate due to payload syntax errors), the swarm's parallel, independent reasoning trajectories compensated for this per-attempt fragility.
  • The worm successfully weaponized post-cutoff 2026 vulnerabilities with a 61.2% success rate across 67 attempts.
  • Full GPU-tier replication (staging the worm, configuring the model-serving stack, and launching a local inference API on a newly compromised GPU) succeeded in 68.8% of attempts.
Figure 2: Radial propagation tree showing the spread of the AI worm in a network instance. The propagation begins from an agent process running on the kali machine (Generation-0), and then spreads to Generation-1 hosts by exploiting a detected vulnerability, and replicating itself once it gets control over the host. This process then repeats. This figure reflects the result of 7 days of autonomous propagation in a single network instance. The hostnames are unique IDs (refer to Appendix B for details). Arrows are labelled with the names of vulnerabilities or weaknesses that the agent exploited to control the host. Refer to Figure 12 for trees of all propagation experiment instances.

Limitations and Future Work

The authors emphasize that individual exploit attempts remain mechanically fragile due to the code-generation ceiling of current single-GPU models, which frequently produce malformed syntax. Furthermore, the FakeCorp network was artificially dense with vulnerabilities and lacked active defensive measures like Endpoint Detection and Response (EDR) software or firewalls.

Future work must focus on developing defensive countermeasures, such as using AI agents defensively to automatically discover and patch vulnerabilities before adversaries do. The authors also call for urgent community-wide standards for offensive AI research, including independent peer reviews of containment protocols and shared frameworks for responsible redaction.

Summary updated

BibTeX
@misc{guan2026ai,
  author = {Jonas Guan and Tom Blanchard and Hanna Foerster and Hengrui Jia and Gabriel Huang and Nicolas Papernot},
  title = {{AI Agents Enable Adaptive Computer Worms}},
  year = {2026},
  eprint = {2606.03811},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.03811},
}
Figure