Child pages
  • CERT Incident Note IN-2001-08: "Code Red" Worm Exploiting Buffer Overflow In IIS Indexing Service DLL

Pages in the Historical section of this site are provided for historical purposes, they are no longer maintained. Links may not work.

Skip to end of metadata
Go to start of metadata
The CERT Coordination Center publishes incident notes to provide information about incidents to the Internet community.

"Code Red" Worm Exploiting Buffer Overflow In IIS Indexing Service DLL

Release Date: July 19, 2001

Systems Affected

  • Systems running Microsoft Windows NT 4.0 with IIS 4.0 or IIS 5.0 enabled
  • Systems running Microsoft Windows 2000 (Professional, Server, Advanced Server, Datacenter Server)
  • Systems running beta versions of Microsoft Windows XP


The CERT/CC has received reports of new self-propagating malicious code exploiting the vulnerability described in CERT Advisory CA-2001-13 Buffer Overflow In IIS Indexing Service DLL. These reports indicate that the "Code Red" worm has already affected more than 13,000 hosts.


In examples we have seen, the "Code Red" worm attack sequence proceeds as follows:

  • The victim host is scanned for TCP port 80.
  • The attacking host sends the exploit string to the victim.
  • The worm, now executing on the victim host, checks for the existence of c:\notworm. If found, the worm ceases execution.
  • If c:\notworm is not found, the worm begins spawning threads to scan random IP addresses for hosts listening on TCP port 80, exploiting any vulnerable hosts it finds.
  • If the victim host's default language is English, then after 100 scanning threads have started and a certain period of time has elapsed following infection, all web pages served by the victim host are defaced with the message,
  • HELLO! Welcome to! Hacked By Chinese!
  • If the victim host's default language is not English, the worm will continue scanning but no defacement will occur.
Additional detailed analysis of this worm has been published by eEye Digital Security at


In addition to web site defacement, affected systems may experience performance degradation as a result of this worm.

Each instance of the "Code Red" worm uses the same random number generator seed to create the list of IP addresses it scans. Therefore, each victim host begins scanning the same IP addresses that previous instances have scanned, which could result in a denial of service against the IP addresses earliest in the list.

Furthermore, it is important to note that while the "Code Red" worm appears to merely deface web pages on affected systems and attack other systems, the IIS indexing vulnerability it exploits can be used to execute arbitrary code in the Local System security context, effectively giving an attacker complete control of the victim system. It is therefore imperative to apply the remedies described in the Solutions section of this document.

System Footprint

The "Code Red" worm can be identified on victim machines by the presence of the following string in IIS log files:


Additionally, web pages on victim machines may be defaced with the following message:

HELLO! Welcome to! Hacked By Chinese!

Network Footprint

A host running an active instance of the "Code Red" worm will scan random IP addresses on port 80/TCP looking for other hosts to infect.


The CERT/CC encourages all Internet sites to review CERT Advisory CA-2001-13 and ensure workarounds or patches have been applied on all affected hosts on your network.

If you believe a host under your control has been compromised, you may wish to refer to

Steps for Recovering from a UNIX or NT System Compromise


The CERT/CC is interested in receiving reports of this activity. If machines under your administrative control are compromised, please send mail to

Author(s): Allen Householder

CERT/CC Contact Information

Phone: +1 412-268-7090 (24-hour hotline)
Fax: +1 412-268-6989
Postal address:
CERT Coordination Center
Software Engineering Institute
Carnegie Mellon University
Pittsburgh PA 15213-3890
CERT personnel answer the hotline 08:00-17:00 EST(GMT-5) / EDT(GMT-4) Monday through Friday; they are on call for emergencies during other hours, on U.S. holidays, and on weekends.

Using encryption

We strongly urge you to encrypt sensitive information sent by email. Our public PGP key is available from

If you prefer to use DES, please call the CERT hotline for more information.

Getting security information

CERT publications and other security information are available from our web site

To subscribe to the CERT mailing list for advisories and bulletins, send email to Please include in the body of your message

subscribe cert-advisory

* "CERT" and "CERT Coordination Center" are registered in the U.S. Patent and Trademark Office.

Any material furnished by Carnegie Mellon University and the Software Engineering Institute is furnished on an "as is" basis. Carnegie Mellon University makes no warranties of any kind, either expressed or implied as to any matter including, but not limited to, warranty of fitness for a particular purpose or merchantability, exclusivity or results obtained from use of the material. Carnegie Mellon University does not make any warranty of any kind with respect to freedom from patent, trademark, or copyright infringement.
Conditions for use, disclaimers, and sponsorship information

Copyright 2001 Carnegie Mellon University.

Revision History

July 19, 2001: Initial Release
January 17, 2002: Updated Reporting section

  • No labels