Slammer Worm Dissection Inside the Slammer Worm DAVID MOORE The Slammer worm spread so quickly that human Cooperative Association for response was ineffective. In January 2003, it packed Internet Data Analysis and a benign payload, but its disruptive capacity was University of California, San surprising. Why was it so effective and what new Diego challenges do this new breed of worm pose? VERN PAXSON International Computer lammer (sometimes called Sapphire) was the first real-world Science fastest computer worm in history. As it began demonstration of a Institute and spreading throughout the Internet, the worm high-speed worm’s capabilities. By comparison, Slam- Lawrence S infected more than 90 percent of vulnerable mer was two orders of magnitude faster than the Code Berkeley hosts within 10 minutes, causing significant disruption to Red worm, which infected more than 359,000 hosts on National financial, transportation, and government institutions 19 July 2001,2 and had a leisurely 37 minutes of popula- Laboratory and precluding any human-based response. In this article, tion doubling time. we describe how it achieved its rapid growth, dissect por- While Slammer had no malicious payload, it caused STEFAN SAVAGE tions of the worm to study some of its flaws, and look at considerable harm by overloading networks and disabling University of our defensive effectiveness against it and its successors. database servers. Many sites lost connectivity as local California, Slammer began to infect hosts slightly before 05:30 copies of the worm saturated their access bandwidths. Al- San Diego UTC on Saturday, 25 January 2003, by exploiting a though most backbone providers appeared to remain sta- buffer-overflow vulnerability in computers on the Inter- ble throughout the epidemic, there were several reports COLLEEN net running Microsoft’s SQL Server or Microsoft SQL of Internet backbone disruption. For a single snapshot of SHANNON Server Desktop Engine (MSDE) 2000. David Litchfield the activity, see www.digitaloffense.net/worms/mssql Cooperative of Next Generation Security Software discovered this un- _udp_worm/internet_health.jpg. Additionally, Tim Association derlying indexing service weakness in July 2002; Mi- Griffin of AT&T Research, has plotted Internet routing for Internet crosoft released a patch for the vulnerability before the data (an overall view of Internet routing behavior) that Data Analysis vulnerability was publicly disclosed (www.microsoft. shows a substantial perturbation in network connectivity com/security/slammer.asp). Exploiting this vulnerability, resulting from Slammer’s spread, (www.research.att. STUART the worm infected at least 75,000 hosts, perhaps consider- com/~griffin/bgp_monitor/sql_worm.html). STANIFORD ably more, and caused network outages and unforeseen If the worm had carried a malicious payload, attacked a Silicon consequences such as canceled airline flights, interference more widespread vulnerability, or targeted a more popular Defense with elections, and ATM failures (see Figure 1). service, its effects would likely have been far more severe. Slammer’s most novel feature is its propagation speed. For more on how we tracked Slammer, see the “Net- NICHOLAS In approximately three minutes, the worm achieved its full work telescope operations” sidebar. WEAVER scanning rate (more than 55 million scans per second), Silicon after which the growth rate slowed because significant How Slammer Defense and portions of the network had insufficient bandwidth to ac- chooses its victims University of commodate more growth. The worm’s spreading strategy uses random scanning—it California, Although Stuart Staniford, Vern Paxson, and randomly selects IP addresses, eventually finding and in- Berkeley Nicholas Weaver had predicted rapid-propagation fecting all susceptible hosts. Random-scanning worms worms on theoretical grounds,1 Slammer provided the initially spread exponentially, but their rapid new-host PUBLISHED BY THE IEEE COMPUTER SOCIETY I 1540-7993/03/$17.00 © 2003 IEEE I IEEE SECURITY & PRIVACY 33 Slammer Worm Dissection Sat Jan 25 06:00:00 2003 (UTC) www.caida.org Number of hosts infected with Slammer: 74, 855 Copyright © 2003 UC Regents Figure 1. The geographical spread of Slammer in the 30 minutes after its release. The diameter of each circle is a function of the logarithm of the number of infected machines, so large circles visually underrepresent the number of infected cases in order to minimize overlap with adjacent locations. For some machines, we can determine only the country of origin rather than a specific city. 250,000 with its scans, and bandwidth consumption and network outages caused site-specific variations in its observed spread. Figure 3 shows a data set from the Distributed In- 200,000 trusion Detection System project (Dshield; www.dshield. org) compared to an RCS model. The model fits ex- 150,000 tremely well up to a point where the probe rate abruptly levels out. Bandwidth saturation and network failure (some networks shut down under the extreme load) produced 100,000 this change in the probe’s growth rate. Number seen in an hour 50,000 Why Slammer was so fast While Slammer spread nearly two orders of magnitude 0 faster than Code Red, it probably infected fewer ma- 0 2 4 6 8 10 12 14 16 18 20 chines. Both worms use the same basic scanning strategy Hour of the day to find vulnerable machines and transfer their exploitive actual number of scans predicted number of scans payloads; however, they differ in their scanning con- straints. While Code Red is latency-limited, Slammer is Figure 2. The Code Red worm was a typical random-scanning worm. bandwidth-limited, enabling Slammer to scan as fast as a This graph shows Code Red’s probe rate during its re-emergence on 1 compromised computer can transmit packets or a net- August, 2001, as seen on one Internet subnetwork, matched against work can deliver them. Slammer’s 376 bytes comprise a the random constant spread worm behavior model. simple, fast scanner. With its requisite headers, the pay- load becomes a single 404-byte user diagram protocol (UDP) packet. Contrast Slammer’s 404 bytes with Code infection slows as the worms continually retry infected or Red’s 4 Kbytes or Nimda’s 60 Kbytes. immune addresses. Thus, as with the Code Red worm Previous scanning worms, such as Code Red, spread shown in Figure 2, Slammer’s infected-host proportion via many threads, each invoking connect() to open a follows a classic logistic form of initial exponential TCP session to random addresses. Consequently, each growth in a finite system.1,2 We label this growth behav- thread’s scanning rate was limited by network latency. ior a random constant spread (RCS) model. After sending a TCP SYN packet to initiate the connection, Slammer’s spread initially conformed to the RCS each thread must wait to receive a corresponding model, but in the later stages it began to saturate networks SYN/ACK packet from the target host or time-out if no re- 34 IEEE SECURITY & PRIVACY I JULY/AUGUST 2003 Slammer Worm Dissection sponse is received. During this time, the thread is blocked 1,100 and cannot infect other hosts. In principle, worms can 1,000 compensate for this latency by invoking a sufficiently large 900 number of threads. In practice, however, operating system 800 limitations, such as context-switch overhead and kernel 700 stack memory consumption, limit the number of active 600 threads a worm can use effectively. So, a worm like Code 500 Red quickly stalls and becomes latency limited, as every 400 thread spends most of its time waiting for responses. 300 In contrast, Slammer’s scanner is limited by each com- 200 promised machine’s Internet bandwidth. Because a single Probes in a two-second sample 100 packet to UDP port 1434 could exploit the SQL server’s 0 vulnerability, the worm was able to broadcast scans without 1,760 1,770 1,780 1,790 1,800 1,810 1,820 requiring responses from potential victims. Slammer’s Seconds after 5:00 a.m. UTC inner loop is very small, and with modern servers’ I/O ca- DShield data K = 6.7m, T = 1808.7s, Peak = 2050, Const. 28 pacity to transmit network data at more than 100 Mbits per second, Slammer frequently was limited by Internet access bandwidth rather than its ability to replicate copies of itself. Figure 3. The early moments of the Distributed Intrusion Detection In principle, an infected machine with a 100-Mbps System (Dshield) data set, matched against the behavior of a Internet connection could produce more than 30,000 random-scanning worm. scans per second. In practice, bandwidth limitations and per-packet overhead limit the largest probe rate we di- rectly observed to 26,000 scans per second, with an Inter- represents the range of the result, and a and b are carefully net-wide average of approximately 4,000 scans per sec- chosen constants. Linear congruent generators are very ond per worm during its early growth phase. efficient and, with appropriate values of a and b have rea- Slammer’s scanning technique is so aggressive that it sonably good distributional properties (although they are quickly interferes with its own growth. Subsequent in- not random from a sequential standpoint). Typically, you fections’ contribution to its growth rate diminishes be- “seed” a generator’s initial value with a source of high- cause those instances must compete with existing infec- quality random numbers to ensure that the precise se- tions for scarce bandwidth. Thus, Slammer achieved its quence is not identical between runs. maximum Internet-wide scanning rate in minutes. Slammer’s author intended to use a linear congruent Any simple-loop approach creates a bandwidth- parameterization that Microsoft popularized, x' = (x × limited UDP scanner, so any future single-packet UDP 214013 + 2531011) mod 232. However, we found two worm probably would have the same property unless its implementation mistakes.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages7 Page
-
File Size-