SQL Slammer: The 376-Byte Worm That Infected 75,000 Servers in 10 Minutes and Is Still the Fastest Malware Ever
At 05:30 UTC on January 25, 2003, a single 376-byte UDP packet began propagating across the internet. By 05:40 - ten minutes later - the number of infected hosts had doubled seven times. By 06:00, SQL Slammer had infected nearly 75,000 systems. Routers began failing under the scan load. Bank of America's ATM network went offline. The internet itself became noticeably degraded across multiple continents. The entire event was effectively over - the worm had reached most of its available targets - before most people in North America had woken up.
SQL Slammer remains the fastest-spreading piece of malware in internet history. It doubled in size every 8.5 seconds during its exponential growth phase, reaching its scanning ceiling in approximately 10 minutes. No worm before or since has spread as fast. The technical reasons for its speed are inherent to its design: it was stateless, carried entirely in a single UDP packet, required no file I/O, and needed no OS interaction beyond sending packets. It was, in the most precise technical sense, the fastest possible worm for its vulnerability class.
The Vulnerability: SQL Server Buffer Overflow
SQL Slammer exploited a heap buffer overflow in Microsoft SQL Server 2000's resolution service - specifically the SQL Server Resolution Service that ran on UDP port 1434. This service existed to help clients figure out which TCP port a named SQL Server instance was running on. CVE-2002-0649 was disclosed in July 2002. Microsoft released a patch (MS02-039) the same day, six months before the Slammer outbreak.
The overflow was triggered by sending an oversized packet to UDP port 1434. The resolution service copied the packet data into a fixed-size stack buffer without bounds checking, overwriting the return address. The shellcode then caused the SQL Server process to generate random IP addresses and send the worm payload - the 376-byte UDP packet - to each generated IP on port 1434.
Impact: Saturated Networks and Failed ATMs
Slammer's scanning traffic was so intense that it caused collateral damage far beyond SQL Server hosts. Each infected machine generated scanning traffic at rates that saturated many routers' packet-processing capacity. The worm effectively created a distributed denial-of-service attack against the internet's routing infrastructure as a side effect of its propagation. Packet loss spiked dramatically on internet backbone links, causing degraded performance for all traffic, not just SQL Server traffic.
Bank of America's ATM network failed because its ATM transaction processing relied on SQL Server infrastructure that became unreachable. 13,000 ATMs went offline. Continental Airlines experienced check-in system failures. The city of Seattle's 911 call system was degraded for hours. South Korea and New Zealand experienced internet connectivity problems severe enough to be publicly reported. The 2003 blackout across the US Northeast - which occurred six months later - was partly attributed in NERC's postmortem to an energy management system running an unpatched version of SQL Server 2000 that would have been vulnerable to Slammer.
What Slammer Taught Defenders
SQL Slammer spread exclusively via UDP port 1434. Organizations that filtered UDP port 1434 at their perimeter were completely protected, even with unpatched SQL Server installations. This was a stark demonstration of network segmentation's value: the organizations hardest hit were those that had SQL Server instances with direct internet exposure or whose internal networks allowed the worm to propagate without filtering. The organizations that escaped were not necessarily better patched - they were better segmented.
The incident accelerated practical thinking about network segmentation and the principle of least exposure. SQL Server's resolution service had no business being accessible from the internet for the vast majority of installations, yet tens of thousands of deployments had it exposed. The appropriate control was not just patching but ensuring that database services were never accessible from untrusted networks in the first place - a defense-in-depth principle that patching alone could not substitute for.