‘MORRIS III’: The Self-Replicating AI Worm That Just Broke Cybersecurity’s Last Safe Assumption + Video

Listen to this Post

Featured Image

Introduction:

For decades, defenders have relied on a simple assumption: a worm has a fixed payload, patch that one bug and you stop the spread. University of Toronto researchers have now shattered that assumption, building a proof-of-concept AI worm that uses a local open‑weight LLM to reason its way through a network, generate tailored attack strategies for each target, and replicate itself—with no human help and no API key to shut off. In 15 isolated runs on a deliberately vulnerable 33‑host network, the worm autonomously compromised 62% of the network in seven days, reaching up to seven generations of self‑replication.

Learning Objectives:

  • Understand how an AI worm uses local open‑weight LLMs to dynamically generate exploits, bypassing the need for pre‑encoded payloads.
  • Learn the specific attack chain, including reconnaissance, vulnerability selection, privilege escalation, and lateral movement.
  • Acquire hands‑on defensive commands and configurations to detect, mitigate, and harden against autonomous AI‑driven threats.

You Should Know:

1. The AI Worm’s Operational Pipeline

The worm carries a copy of an open‑weight LLM (designed to run on a single GPU) and deploys it on any compromised GPU‑capable host, turning that machine into a reasoning hub for the entire infected subnet. Its workflow follows a four‑stage loop:

  • Reconnaissance: The worm scans local networks, fingerprints services, and collects version banners, open ports, and user credentials.
  • Reasoning & Exploit Generation: The local LLM analyzes the gathered data, searches for relevant CVEs (including those published after the model’s training cutoff), and generates a targeted attack command or script.
  • Execution & Privilege Escalation: The generated payload is executed. In the Toronto experiments, the worm successfully exploited vulnerabilities such as SambaCry (CVE‑2017‑7494), Dirty Pipe (CVE‑2022‑0847), PrintNightmare (CVE‑2021‑34527), Drupalgeddon 2 (CVE‑2018‑7600), and a blind SQL injection in a web app. It also used fresh advisories for CVE‑2026‑39987 (Marimo notebook pre‑auth RCE) and CVE‑2026‑31431 (CopyFail), a Linux kernel LPE that works across all major distributions.
  • Propagation & Model Deployment: After gaining elevated access, the worm copies itself and the LLM to the new host, repeating the loop.

Step‑by‑step guide to simulate reconnaissance (for authorized testing only):

 Linux: Scan local subnet for open ports and services
nmap -sS -p- -T4 192.168.1.0/24 -oA subnet_scan
nmap -sV -sC -p 22,80,443,445,3389,8080 192.168.1.0/24 -oA service_scan

Windows: Use built-in tools to enumerate network resources
net view /all
netstat -an | findstr "LISTENING"
ping -1 1 192.168.1.255

Simulate LLM-driven CVE lookup (requires local LLM or API)
 Example using Ollama + a custom prompt
ollama run llama3.2 "Given a service 'Samba 4.5.9' on port 445, list known RCE CVEs and provide a one-line exploit example."

The worm’s success rate for individual exploit attempts was about 44%, with most failures due to malformed payload syntax rather than flawed logic. Web app exploits and Windows privilege escalations were harder than Linux local escalation—a capability ceiling the researchers treat as a current model limitation.

2. The Patch‑Gap Problem on Steroids

Traditional worms ship with a fixed exploit. Patch that specific vulnerability, and the worm stops spreading. This worm does something fundamentally different: it reads fresh CVE advisories at runtime and writes its own exploit code for vulnerabilities disclosed after the model was trained. In the Toronto experiment, the worm successfully exploited three post‑training CVEs, including CVE‑2026‑39987, which was weaponized in the wild within 10 hours of public disclosure.

Step‑by‑step guide to verify and mitigate post‑training vulnerabilities:

 1. Inventory all internet‑facing services and their versions
nmap -sV --script=vuln 203.0.113.0/24 -oA internet_facing_vuln

<ol>
<li>For critical CVEs like CopyFail (CVE‑2026‑31431), check kernel version
uname -r
Vulnerable kernels: 4.17 and later (released 2017 onward) [6†L4-L6]</p></li>
<li><p>Apply live patching without reboot (if using KernelCare or similar)
kcarectl --update
kcarectl --apply CVE-2026-31431</p></li>
<li><p>Block WebSocket endpoints for Marimo (CVE‑2026‑39987) at the WAF level
Example mod_security rule (in httpd.conf or .htaccess)
<Location /terminal/ws>
Require all denied
</Location>

Because the worm operates entirely on local open‑weight models, provider‑side controls (rate limiting, content filtering, API key revocation) do not apply. Containment must happen at the network and host layer.

3. Hunting for Behavioral Signals

The prototype worm does not try to hide—it leaves a trail of distinctive artifacts that defenders can use to build detection logic. In the test runs, the following signals were consistently observed:

  • Non‑standard port activity (e.g., LLM inference APIs appearing on unexpected endpoints)
  • Automated SSH public key injection
  • Clusters of GPU inference processes (python3, ollama, llama.cpp) on hosts that normally do not run AI workloads
  • Repeated failed exploit attempts followed by successful privilege escalation

Step‑by‑step guide to detect AI worm activity:

 Linux: Monitor for unexpected LLM processes
ps aux | grep -E '(ollama|llama.cpp|python3.model|text-generation-webui)'

Check for unauthorized SSH key additions
cat /root/.ssh/authorized_keys
cat /home//.ssh/authorized_keys | grep -v "$(whoami)"

Monitor for outbound connections on unusual high ports (e.g., 50000–60000)
ss -tunap | grep -E ':(50000|60000)'

Windows: Use PowerShell to check for PrintNightmare indicators
Get-Service -1ame Spooler | Select-Object Status, StartType
Get-ChildItem -Path C:\Windows\System32\spool\drivers\x64\3 -Recurse | 
Where-Object { $_.LastWriteTime -gt (Get-Date).AddDays(-7) }

Sysmon configuration to log process creation and network connections
 Install Sysmon, then use a config that captures LLM binary execution
sysmon64 -accepteula -i sysmon-config.xml

Segment GPU‑capable machines aggressively. In a flat network, one compromised deep‑learning server becomes a reasoning hub for every infected device on the same subnet. Apply zero‑trust controls: GPU hosts should have no lateral reach to or from other production systems.

4. Hardening Against Autonomous Exploitation

Because the worm dynamically generates attack paths, traditional signature‑based defenses are insufficient. However, several layered controls can break its propagation loop.

Step‑by‑step hardening guide:

 1. Disable Samba if not needed; otherwise, update to latest version
sudo systemctl stop smbd nmbd
sudo systemctl disable smbd nmbd
 Check Samba version: smbd --version

<ol>
<li>Mitigate PrintNightmare (Windows)
Disable Print Spooler service if not required
Stop-Service -1ame Spooler -Force
Set-Service -1ame Spooler -StartupType Disabled
If needed, apply group policy: 
Computer Configuration -> Administrative Templates -> Printers ->
"Allow Print Spooler to accept client connections" -> Disabled</p></li>
<li><p>Harden the kernel against Dirty Pipe (CVE‑2022‑0847) and CopyFail
Update kernel to the latest patched version
sudo apt update && sudo apt upgrade linux-image-generic  Debian/Ubuntu
sudo yum update kernel  RHEL/CentOS</p></li>
<li><p>Rotate credentials exposed on any compromised host
List all users with saved credentials (Linux)
grep -r "password" /home//.bash_history /home//.ssh/
Force password change for all users
sudo passwd -e $(awk -F: '$3>=1000 {print $1}' /etc/passwd)</p></li>
<li><p>Implement eBPF-based runtime detection (example using Tracee)
tracee --output json --events execve,connect,ptrace --filter comm=python3

The worm demonstrated systematic credential reuse as a propagation path. Harvested credentials move laterally faster than most detection cycles. Assume any credential stored on a compromised host is compromised and rotate it immediately.

5. Building a Zero‑Trust GPU Segmentation Policy

The worm’s design routes LLM inference through any compromised GPU host it can reach. Without segmentation, one GPU foothold gives the worm a reasoning engine for the entire subnet.

Step‑by‑step segmentation guide (using iptables / nftables on Linux and Windows Defender Firewall):

 Linux: Isolate GPU hosts in a dedicated VLAN with strict egress filtering
 Example nftables ruleset
nft add table inet gpu_seg
nft add chain inet gpu_seg input { type filter hook input priority 0\; policy drop\; }
nft add chain inet gpu_seg output { type filter hook output priority 0\; policy drop\; }
nft add rule inet gpu_seg output oifname "eth0" ip daddr 192.168.10.0/24 accept
nft add rule inet gpu_seg input iifname "eth0" ip saddr 192.168.10.0/24 accept
nft add rule inet gpu_seg output oifname "eth0" tcp dport 443 accept  Allow only necessary outbound

Windows: Create firewall rules to block lateral movement
New-1etFirewallRule -DisplayName "Block SMB inbound from GPU subnet" `
-Direction Inbound -Protocol TCP -LocalPort 445 -RemoteAddress 192.168.10.0/24 -Action Block
New-1etFirewallRule -DisplayName "Block RDP inbound from GPU subnet" `
-Direction Inbound -Protocol TCP -LocalPort 3389 -RemoteAddress 192.168.10.0/24 -Action Block

Apply the principle of least privilege to inference APIs. If you must expose an LLM endpoint, enforce strong authentication and rate limiting at the reverse proxy level.

What Undercode Say:

  • Key Takeaway 1: The era of “patch and forget” is over. Autonomous AI worms that read public advisories and write their own exploits turn the patch gap from a window into a permanent vulnerability. Defenders must move from reactive patching to proactive segmentation, behavioral detection, and assume‑breach postures.
  • Key Takeaway 2: Open‑weight models are a dual‑use technology. The same local LLM that powers innovative edge applications can be weaponized into a self‑replicating worm with no kill switch. The AI supply chain now includes malware distribution.

Analysis: The Toronto worm is not science fiction; it is a working prototype that succeeded on 62% of a 33‑host network without human input. Its ability to exploit post‑training CVEs by ingesting advisory text means that the window between disclosure and weaponization has effectively collapsed to zero for an autonomous agent. The lack of a vendor‑controlled kill switch (no API key to revoke) means containment must be entirely local—a challenge for most enterprises that do not have mature zero‑trust segmentation. Defenders should start by identifying and isolating GPU‑capable assets, implementing eBPF‑based runtime monitoring for LLM process artifacts, and treating published advisories as near‑term weaponization targets. The research is currently not publicly released, but the direction is clear: autonomous AI‑driven worms are coming, and the only question is whether defenders will be ready.

Prediction:

  • -1 Over the next 12–18 months, threat actors will adapt this proof‑of‑concept into operational malware, focusing on environments with high GPU density (cloud ML platforms, research labs, crypto miners). The first real‑world AI worm will likely target misconfigured Kubernetes clusters running Jupyter or Marimo notebooks.
  • -1 The absence of a central API kill switch will drive a new class of “model‑less” attacks where the worm carries a lightweight LLM and deploys it on each compromised host, making take‑down impossible without physically cleaning every infected machine.
  • +1 However, the same techniques will accelerate defensive AI: blue teams will deploy local LLMs to analyze network traffic, generate tailored detection rules in real time, and autonomously respond to incursions, creating an AI‑vs‑AI arms race where speed and segmentation, not patching, determine the outcome.

▶️ Related Video (82% Match):

🎯Let’s Practice For Free:

🎓 Live Courses & Certifications:

Join Undercode Academy for Verified Certifications

🚀 Request a Custom Project:

Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands

IT/Security Reporter URL:

Reported By: Mohit Hackernews – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow UndercodeTesting & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin | 🦋BlueSky