Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
Malware

Code Red

Code Red is a computer worm first observed on the Internet in July 2001 that targeted Microsoft IIS web servers by exploiting the IIS Index Server/ISAPI .ida buffer overflow vulnerability (MS01-033, CVE-2001-0500), for which Microsoft had already released a patch on June 18, 2001. It propagated by scanning for additional hosts and sending a crafted request containing a long overflow string to vulnerable servers, executing with system-level privileges. Early variants were memory-resident, so rebooting removed the worm from memory, but unpatched systems were immediately vulnerable to reinfection.

The original Code Red worm spread during days 1-19 of the month, then from days 20-27 launched a denial-of-service attack against fixed targets including www1.whitehouse.gov / the White House web server IP, and then entered a sleep phase near month end. Its payload also defaced some websites with messages including "HELLO! Welcome to http://www.worm.com ! Hacked By Chinese!" / "Hacked by Chinese." Researchers Ryan Permeh and Marc Maiffret of eEye Digital Security analyzed and named the worm. A first version used a static random seed, which limited spread because infected hosts probed the same addresses repeatedly; a more virulent random-seed variant, commonly referred to as Code Red v2, began spreading around July 19, 2001 and infected more than 359,000 machines in under 14 hours, peaking at over 2,000 new infections per minute.

Code Red caused widespread global disruption across North America, Europe, and Asia. Beyond direct compromise of IIS servers, its massive scanning traffic caused broader infrastructure impact and reportedly crashed or rebooted some routers, switches, DSL modems, printers, and other devices with web interfaces when probed. CAIDA measurements cited infected hosts concentrated in the United States, Korea, China, and Taiwan, with infections also observed in .GOV and .MIL domains.

A related but distinct worm, Code Red II / CodeRedII, appeared on August 4, 2001 exploiting the same IIS flaw. Despite the name, the content states it was substantially different from the original Code Red family behavior: it installed a persistent backdoor enabling remote root-level access, used locality-biased scanning that favored nearby subnets, and unlike the original did not focus on web-page defacement or the White House denial-of-service routine. Code Red II was not memory-resident and required both patching and malware removal. The outbreak also prompted release of controversial self-propagating 'anti-worm' tools such as Code Green and CRclean, which attempted to patch and clean Code Red-infected systems without administrator consent.

High-confidence indicators and artifacts mentioned in the content include exploit requests to /default.ida with long encoded payloads, long sequences of repeated 'N' characters in Code Red exploit traffic, and web defacement text referencing worm.com and 'Hacked By Chinese.'

Share:
For your environment

Hunt this family in your stack

Mallory pivots from this family to the IOCs, detections, and named campaigns that touch your stack, and pages you when something new lands.

MITRE ATT&CK

Techniques & procedures

7 distinct techniques documented for this family, organized by ATT&CK tactic.

Initial Access

1 technique
T1091Replication Through Removable MediaEvidence1

In much the same way that Code Red works, Code Green then uses the host machine to start scanning for more victims.

Execution

1 technique
T1203Exploitation for Client ExecutionEvidence2

On June 18, 2001 eEye released information about a buffer-overflow vulnerability in Microsoft's IIS webservers. The remotely exploitable vulnerability ... allows system-level execution of code ... the ISAPI .ida filter fails to perform adequate bounds checking on its input buffers. On July 12, 2001, a worm began to exploit the aforementioned buffer-overflow vulnerability in Microsoft's IIS webservers.

Discovery

1 technique
T1046Network Service DiscoveryEvidence1

If so, the worm generates a random list of IP addresses and probes each machine on the list in an attempt to infect as many computers as possible.

Lateral Movement

1 technique
T1091Replication Through Removable MediaEvidence1

In much the same way that Code Red works, Code Green then uses the host machine to start scanning for more victims.

Command and Control

1 technique
T1105Ingress Tool TransferEvidence1

“The Morris Worm… launches a worm… spreads to 6,000 networked computers… The Father Christmas worm spreads over DECnet… Christmas Tree EXEC ‘worm’…”

Impact

3 techniques
T1491.001Internal DefacementEvidence1

The worm did deface web pages on some machines with the phrase "Hacked by Chinese."

T1498Network Denial of ServiceEvidence1

In its next attack phase, the worm launches a Denial-of-Service attack against www1.whitehouse.gov from the 20th-28th of each month.

T1499Endpoint Denial of ServiceEvidence1

"A vulnerability in Microsoft IIS 4.0 allows an attacker to crash IIS 4.0 servers if they are configured to use URL redirection... Intruders can crash vulnerable IIS 4.0 systems."

INDICATORS OF COMPROMISE

IOCs tracked for this family

1 indicator attributed across vendor reports, sandbox runs, and researcher write-ups. Full values are available in Mallory.

View more in app
Network
1 tracked

IPs, domains, and DNS infrastructure linked to this family.

TypeValueLatest sighting
domain●●●●●●●●●●●●View more in app25 years ago
What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets match these IOCs, which detections are missing, which campaigns to expect next, and what to do in the next 30 minutes.
IOC matching1

Match every observed IP, domain, and hash against your live telemetry.

Threat actor attribution

Named campaigns wielding this family, with evidence pinned to each claim.

Exploited vulnerabilities

CVEs this family uses for access and lateral movement.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

MITRE ATT&CK mapping7

Every documented technique, ranked by evidence weight.

Researcher chatter

Reddit, Mastodon, and CTI community discussion around this family.