computer worm
termKept in this browser · My desk
A self-contained program that copies itself to other machines over a network, needing no host program and often no human action.
RFC 4949 defines a worm as a program that can run independently and propagate a complete working version of itself onto other hosts, and NIST adds that worms spread through vulnerable network services or by mass mailing. That is the difference from a virus, which lives inside a host program and runs only when the host runs, and from a trojan horse, which does not copy itself. The worm of 2 November 1988 needed nobody to run anything; the mass-mailing worms of 1999 to 2004 needed one click each, and then mailed themselves on.
What makes a worm. RFC 4949, the Internet Security Glossary (Request for Comments), defines a worm as a program that can run independently and propagate a complete working version of itself onto other hosts. The 2005 malware guide of the National Institute of Standards and Technology (NIST), Special Publication (SP) 800-83, puts the difference from a virus in two words: worms are self-contained, needing no host program, and self-propagating, creating working copies of themselves and running them without user intervention. It splits them into network service worms, which exploit a vulnerable service and then scan for more machines running it (its examples are Sasser and Witty), and mass mailing worms, which harvest addresses and send themselves on (Beagle, Mydoom, Netsky). The scanning alone often overwhelms networks and intrusion detection sensors, and many worms also install backdoors or launch distributed denial-of-service (DDoS) attacks.
The word came from fiction and from Xerox. John Brunner's 1975 novel The Shockwave Rider imagined a self-perpetuating tapeworm loose in a network. In 1980 John Shoch and Jon Hupp of the Xerox Palo Alto Research Center (PARC) borrowed the idea for useful programs, described in Internet Experiment Note 159 and in Communications of the ACM (Association for Computing Machinery) in March 1982: a worm was a computation made of segments, each running on a different machine among the more than 100 Alto computers on PARC's Ethernet, finding idle machines and copying itself into them. They also recorded a runaway: a small worm left running one night had left dozens of machines dead by the morning, apparently because a corrupted copy crashed every machine it seized.
The first ones. The first program to travel a network on its own was a worm, not a virus. Creeper, written at BBN (Bolt Beranek and Newman) in 1971, moved between at most 28 TENEX machines on the Advanced Research Projects Agency Network (ARPANET) with the agreement of their operators; a later version by Ray Tomlinson made copies instead of moving, and Tomlinson's Reaper went after it. Neither was malicious.
The worm of 1988. The first worm to do real damage was the one RFC 1135 describes, released on the evening of 2 November 1988, which reached VAX and Sun-3 machines running Berkeley Unix through flaws in sendmail and fingerd. The appeal court's opinion in United States v. Morris (Second Circuit, 7 March 1991) adds the rest: Robert Tappan Morris, a first-year doctoral student at Cornell, released it from a computer at the Massachusetts Institute of Technology to hide where it came from; it entered through a sendmail bug, a bug in the finger daemon, the trusted hosts feature and password guessing; to avoid detection it asked each machine whether a copy was already there, but copied itself anyway one time in seven, so that a fake yes could not stop it, and that ratio made it reinfect machines far faster than he had expected until many crashed or became catatonic. A warning sent anonymously from Harvard arrived too late through the clogged network. Cleaning up cost each site from $200 to more than $53,000. A jury convicted him under the Computer Fraud and Abuse Act, section 1030(a)(5)(A) of title 18 of the United States Code, and he was sentenced to three years of probation, 400 hours of community service and a fine of $10,050; the court held that the statute required intent to access, not intent to cause the damage.
Two families, one lesson. Mass mailing worms ride on a person once: LoveLetter, found worldwide on 4 May 2000, was a Visual Basic Script that mailed itself through Outlook as a chain letter. Network worms need nobody: they scan for a vulnerable service and copy themselves in, which is why the worm decade from Melissa to Conficker was above all a story about patches that already existed. Code Red infected more than 359,000 hosts on 19 July 2001, doubling about every 37 minutes. Sapphire, also called Slammer, began a little before 05:30 Coordinated Universal Time (UTC) on 25 January 2003; the measurement by David Moore, Vern Paxson, Stefan Savage and colleagues found that it doubled every 8.5 seconds, infected more than 90 percent of vulnerable hosts within 10 minutes and at least 75,000 in all, because the whole worm, 376 bytes, fitted in a single 404-byte UDP packet to port 1434 of Microsoft SQL Server and needed no reply; the flaw had been found in July 2002 and Microsoft had released a patch before it was announced. Conficker used the flaw that Microsoft's bulletin MS08-067 of 23 October 2008 had warned could be used to craft a wormable exploit, a remote procedure call (RPC) request to the Server service that needed no authentication. Worms reached phones too: Cabir, in 2004, spread over Bluetooth between Symbian phones, though the recipient had to accept and install it.
Modern malware mixes the categories. Emotet arrived as a trojan in a macro document and then spread laterally inside networks like a worm; NotPetya entered through a software update and then moved with the EternalBlue exploit. WannaCry, which from 12 May 2017 reached tens of thousands of machines in more than 150 countries according to the reports cited by the Cybersecurity and Infrastructure Security Agency (CISA), carried a dropper that scanned the local network and, whenever port 445 answered, exploited the Server Message Block version 1 (SMBv1) flaw that Microsoft had patched on 14 March 2017 in bulletin MS17-010. MITRE ATT&CK (Adversarial Tactics, Techniques, and Common Knowledge) catalogues this behaviour as T1210, Exploitation of Remote Services, with Conficker, WannaCry and NotPetya among its examples.
What stops a worm. The defences against the worm proper are those of exposure: patch the services that are reachable, close the ones that need not be, and segment networks so that one infected machine cannot reach every other one. ATT&CK's mitigations for T1210 say the same in its own terms: update software, disable or remove features that are not needed, segment the network, minimize the permissions of service accounts and use exploit protection. The decade of the great worms is in the Learn article on the worm era, and the 1988 worm has its own.
Also known as: worm, network worm, mass-mailing worm, email worm, worm de computador
Sources
- RFC 4949, Internet Security Glossary, Version 2, August 2007 (read 2026-11-23): a worm can run independently, propagate a complete working version of itself onto other hosts on a network, and may consume resources destructively
- NIST SP 800-83 Revision 1, Souppaya and Scarfone, July 2013 (read 2026-11-23): worms are self-replicating, self-contained programs that spread through vulnerable network services or by mass mailing
- Jan Kopriva, SANS Internet Storm Center diary 27208, 2021 (read 2026-11-23): Creeper, written at BBN in 1971, first moved between at most 28 TENEX machines removing itself as it left; Ray Tomlinson's version made copies; Reaper removed it
- J. Reynolds, RFC 1135, The Helminthiasis of the Internet, December 1989 (read 2026-11-23): the self-replicating program of 2 November 1988 infected VAX and Sun-3 machines running Berkeley Unix through sendmail and fingerd
- F-Secure, LoveLetter description (read 2026-11-23): a Visual Basic Script worm that spreads by email as a chain letter through Outlook; found globally on 4 May 2000, apparently from the Philippines
- F-Secure, Cabir description (read 2026-11-23): a family of Bluetooth worms for Symbian Series 60 phones; the recipient must accept and install the file; a bug limits its spread
- Peter Mell, Karen Kent and Joseph Nusbaum, NIST SP 800-83, Guide to Malware Incident Prevention and Handling, November 2005, withdrawn July 2013 (read 2026-11-23): worms are self-contained, needing no host program, and self-propagating, creating working copies and executing them without user intervention; network service worms (Sasser, Witty) exploit a service and scan for more hosts, often overwhelming networks and intrusion detection sensors; mass mailing worms (Beagle, Mydoom, Netsky) harvest addresses and mail themselves; many install backdoors or launch DDoS attacks
- John F. Shoch and Jon A. Hupp, Xerox Palo Alto Research Center, The 'Worm' Programs: Early Experience with a Distributed Computation, Communications of the ACM 25(3), March 1982, copy hosted by UC Berkeley EECS (read 2026-11-23): opens with John Brunner's tapeworm from The Shockwave Rider (1975); a worm is made of segments each running on a different machine, finding idle machines and replicating into them; over 100 Alto computers on an Ethernet; a small worm left running overnight left dozens of machines dead, apparently through a corrupted copy
- John F. Shoch and Jon A. Hupp, Notes on the 'Worm' programs, IEN 159, May 1980, revised September 1980, abstract (read 2026-11-23): programs that span machine boundaries and replicate themselves in idle machines; a worm composed of segments on different machines; paper for the ACM workshop on distributed computing of December 1980
- United States Court of Appeals for the Second Circuit, United States v. Robert Tappan Morris, 928 F.2d 504, decided 7 March 1991, Caselaw Access Project (read 2026-11-23): first-year Cornell computer science doctoral student; released the worm on 2 November 1988 from an MIT computer to disguise its origin; four entry routes (sendmail bug, finger daemon bug, trusted hosts, password guessing); copied itself on every seventh 'yes' so it could not be stopped by a false answer, and reinfected far faster than he expected; an anonymous fix from Harvard arrived too late; cost per installation from $200 to more than $53,000; convicted under 18 U.S.C. 1030(a)(5)(A), three years of probation, 400 hours of community service, a $10,050 fine and supervision costs; affirmed, the intent requirement applying to the access, not to the resulting damage
- David Moore, Vern Paxson, Stefan Savage, Colleen Shannon, Stuart Staniford and Nicholas Weaver, The Spread of the Sapphire/Slammer Worm, CAIDA (read 2026-11-23): began slightly before 05:30 UTC on Saturday 25 January 2003; doubled every 8.5 seconds; over 90 percent of vulnerable hosts within 10 minutes; at least 75,000 hosts; a 376-byte worm in a single 404-byte UDP packet to port 1434 of SQL Server or MSDE 2000; over 55 million scans per second after about three minutes; flaw discovered July 2002, patch released before announcement; Code Red infected over 359,000 hosts on 19 July 2001 with a doubling time of about 37 minutes
- Microsoft Security Bulletin MS08-067, Vulnerability in Server Service Could Allow Remote Code Execution (958644), published 23 October 2008 (read 2026-11-23): a specially crafted RPC request to the Server service allows remote code execution, without authentication on Windows 2000, XP and Server 2003; possibly usable to craft a wormable exploit; CVE-2008-4250
- Microsoft Security Bulletin MS17-010, Security Update for Microsoft Windows SMB Server (4013389), published 14 March 2017 (read 2026-11-23): remote code execution through specially crafted messages to an SMBv1 server; rated Critical for all supported Windows releases
- CISA, Alert TA17-132A, Indicators Associated With WannaCry Ransomware, last revised 7 June 2018 (read 2026-11-23): discovered the morning of 12 May 2017; reports of tens of thousands of infections in over 150 countries; the MS17-010 update of 14 March 2017 and patches for Windows XP, 8 and Server 2003 on 13 May 2017; a dropper propagating through the MS17-010/EternalBlue SMBv1 exploit, scanning the local network on UDP 137 and 138 and TCP 139 and 445
- MITRE ATT&CK, T1210 Exploitation of Remote Services (read 2026-11-23): exploiting remote services for lateral movement; Conficker through MS08-067, NotPetya through EternalBlue and EternalRomance, WannaCry through an SMBv1 exploit; mitigations include sandboxing, disabling unneeded features, exploit protection, network segmentation, privileged account management, threat intelligence, software updates and vulnerability scanning