Nimda: the worm that infected 160,000 computers in 7 hours
In September 2001, the Nimda worm spread by e-mail, infected websites and attacks on web servers at once. Within 7 hours, 160,000 computers were infected.

What to do now
- On servers with IIS 4.0 or 5.0, install Microsoft’s cumulative patch MS01-044 or a later update, such as Windows 2000 Service Pack 3: it closes every IIS flaw that Nimda used.
- Update Internet Explorer 5.01 or 5.5 with the fix from MS01-020 or a later cumulative patch, or move to IE 6, so that e-mails can no longer start attachments on their own; on Windows 95, 98 and ME, install IE 6 with the Typical or Full option.
- If you find a root.exe file on an IIS server, an Admin.dll in the top folder of drive C:, D: or E:, or unexpected .eml or .nws files in many folders, treat the computer as taken over: format the system drive and reinstall from trusted media.
- Block incoming web traffic on port 80 to computers that are not meant to be web servers, block TFTP (UDP port 69) at the edge of your network, and keep computers that still run Windows NT 4.0 or Windows 2000 off the open internet.
- Year
- 2001
- CVSS 2.0 score
- 7.5 high
- computers infected at the peak, 7 hours after the outbreak began
- 160,000
- days between Microsoft's fix for the main flaw and the outbreak
- 127
- Reach met
CAIDA counted 160,000 infected computers at the peak on September 18, 2001, and Microsoft's web server software ran 27.46 % of all websites that month (CAIDA; Netcraft).
- Mass exploitation met
Nimda was a self-spreading worm: every infected computer searched for IIS servers and infected them on its own, and 450,000 internet addresses tried to spread it within 12 hours (CERT/CC; CAIDA).
- Damage not met
The only total is an estimate of USD 635 million by Computer Economics, below the threshold; CERT/CC received reports of denial of service, but the sources document no outage of critical services (Computer Economics; CERT/CC).
- Extraordinary response not met
Microsoft's fixes had been out for four months or longer; beyond them, the sources document only internet providers that cut off infected customers or blocked web traffic, and a support program by Microsoft (CAIDA; Microsoft).
| Affected | Microsoft IIS web servers, and Windows computers with Internet Explorer 5.01 or 5.5 |
|---|---|
| CVE | CVE-2001-0333, CVE-2000-0884, CVE-2001-0154 |
| CVSS vector | AV:N/AC:L/Au:N/C:P/I:P/A:P |
| Weakness (CWE) | NVD-CWE-Other |
| Fixed in | MS01-026 (May 14, 2001) for the main flaw; all IIS flaws in the cumulative patch MS01-044 (August 15, 2001); the Internet Explorer flaw in MS01-020 (March 29, 2001) |
| Found by | NSFocus reported the main flaw to Microsoft |
- 1Microsoft warns of the older IIS flaw; a patch from August 2000 already fixes it (MS00-078)
- 2Microsoft fixes the Internet Explorer flaw that runs e-mail attachments on its own (MS01-020)+163 days
- 3Fix available+209 days
- 4CodeRedII begins to spread and leaves backdoors on IIS servers+291 days
- 5Cumulative patch MS01-044 contains the fixes for all IIS flaws that Nimda later uses+302 days
- 6Outbreak begins+336 days
- 7Peak+336 days
On September 18, 2001, shortly before 12:00 UTC, a worm called Nimda began to spread around the world. Seven hours later, 160,000 computers were infected, according to the internet research center CAIDA. A worm is a program that copies itself from one computer to the next on its own. Nimda used five routes at once: e-mail, infected websites, shared network folders, two flaws in IIS, Microsoft’s web server software, and backdoors left by CodeRedII, a worm that had used the same flaw as Code Red. Microsoft had fixed every flaw it used months before.
How it worked
The CERT Coordination Center (CERT/CC), a US center for security incidents, described the worm on the day of the outbreak. Nimda arrived by e-mail as an attachment called readme.exe, labeled as a sound file. Mail programs such as Outlook Express use Internet Explorer to display e-mails written in HTML, the language of web pages. In Internet Explorer 5.01 and 5.5, a flaw made the browser run such a mislabeled attachment on its own. Just seeing the message in the preview pane was enough. Microsoft had fixed this flaw on March 29, 2001.
Once running, Nimda mailed itself to the addresses it found on the computer, and again every 10 days. Every infected computer, including ordinary desktop PCs, also searched the internet for IIS servers, and half of the addresses it tried shared the first two of the four numbers of its own address. So the worm favored its own neighborhood: once one e-mail had passed a company’s firewall, the machines behind it were likely targets.
On each server, Nimda first looked for the backdoors of CodeRedII and of an older worm called sadmind/IIS. Then it tried two directory traversal flaws. A web server should only hand out files from its web folder and block requests that contain “..”, which means “one folder up”. IIS could be fooled by writing these characters in an unusual form: with special Unicode characters in the older flaw, and encoded twice in the newer one, because IIS decoded the request a second time after its security check. This let the worm run commands on the server and make it download a copy of the worm.
On a server it had taken over, Nimda added a short JavaScript program to every web page, so visitors with an unpatched Internet Explorer could be infected just by viewing the page. It also copied itself into every folder it could write to, including shared network folders, shared the C: drive and created a Guest account with administrator rights.
- E-mailreadme.exe runs as soon as the message is previewed
- Infected PCsearches for IIS servers, preferring nearby ones
- IIS servera traversal flaw or an old backdoor lets the worm in
- Visitorthe infected web page passes the worm on
Reach and damage
Nimda had a large target: in the survey of the firm Netcraft for September 2001, Microsoft’s web server software ran 27.46 % of all websites, 8,895,343 sites. Only Apache ran more.
CAIDA, an internet research center at the University of California San Diego, counted the computers it saw spreading Nimda in steps of 15 minutes. The infection peaked around 19:00 UTC with 160,000 infected computers. By midnight UTC, CAIDA had seen 450,000 different internet addresses trying to spread the worm. An address is not always one computer, so this is not an exact count of machines.
| Computers infected at the peak, 7 hours in | 160,000 | |
|---|---|---|
| Internet addresses that tried to spread the worm within 12 hours | 450,000 |
The second bar counts internet addresses, not computers, over the whole first 12 hours. Source: CAIDA.
At the Lawrence Berkeley National Laboratory, a US research lab, researchers measured how the probes for IIS servers rose within half an hour from almost none to nearly 100 per second.
The worm’s traffic did harm of its own: CERT/CC received reports of denial of service caused by the scanning and the e-mails, and some networks were so flooded by their own infected machines that their links to the internet were saturated, CAIDA reports. The firm Computer Economics estimated the worldwide economic impact of Nimda at USD 635 million, less than a quarter of its estimate for Code Red. This is an estimate, not a measurement, and the sources document no outage of critical services such as hospitals or power supplies.
The fix and the response
When Nimda appeared, all its flaws were known. Microsoft warned of the older IIS flaw on October 17, 2000, and a patch from August 2000 already fixed it. The fix for Internet Explorer followed on March 29, 2001, the fix for the newer IIS flaw on May 14, 2001, 127 days before the outbreak. On August 15, 2001, Microsoft released MS01-044, a cumulative patch for IIS that contained all these IIS fixes. Servers infected by CodeRedII in August kept its backdoor unless they had been cleaned up.
For infected servers, CERT/CC gave blunt advice: “The only safe way to recover from the system compromise is to format the system drive(s) and reinstall the system software from trusted media.” Nimda had changed web pages and programs and created a new account, so removing the worm was not enough.
Infected machines also fell silent faster than after Code Red. Less than 24 hours after Nimda began to infect large numbers of computers, half of the infected machines no longer spread it; after Code Red and CodeRedII, this had taken 11 days. Part of this came from cutting machines off rather than cleaning them, CAIDA explains: organizations disconnected themselves, and internet providers cut off infected customers or blocked web traffic.
| Nimda, less than a day | 24 h | |
|---|---|---|
| Code Red and CodeRedII, 11 days | 264 h |
Hours until half of the infected machines no longer sent out the worm. Source: CAIDA.
Nimda did not disappear. In the months after the outbreak, the Berkeley lab confirmed attacks from 63,000 different Nimda hosts, possibly an undercount, its researchers note, because they only counted the attacks on web servers.
Two weeks after the outbreak, Microsoft announced an “unprecedented mobilization” of its staff, with free virus-related support and a tool to lock down IIS. The announcement does not name Nimda; Microsoft later wrote that Code Red and Nimda led some customers to rethink their use of IIS.
Which flaw counts as the main one
Nimda used three flaws with a CVE number: two in IIS, one in Internet Explorer. This page counts the newer IIS flaw, CVE-2001-0333, as the main one: the attacks on web servers made Nimda a worm that needed no help from anyone, and every infected computer launched them. This flaw also worked on more servers than the older one: Microsoft’s fix for it contained the older fix, but Windows 2000 Service Pack 2 contained only the older one. No measurement shows how many computers each route infected. The National Vulnerability Database rates all three flaws 7.5 out of 10 on CVSS 2.0, so the choice does not change the score.
Read next: Code RedPrevious: SQL SlammerOverview: Vulnerabilities