Dan Kaminsky got rival firms to patch a DNS flaw in secret in 2008

Photo: Dan Kaminsky (Dan_Kaminsky.jpg : Dave Bullock derivative work: Emdee ( tal · CC BY 2.0 · Wikimedia Commons)

On March 31, 2008, about 16 researchers dropped what they were doing and converged on the Microsoft campus in Redmond, Washington. They had traveled from as far apart as Japan and Germany. The question waiting for them was as simple to state as it was hard to answer: how do you fix something that everyone uses without tipping off the attackers who would love to exploit it?

Dan Kaminsky had summoned them, and he had kept the reason to himself. Secrecy around his discovery was so tight that none of the visitors knew what he had found until they sat down in the room. Only once they were seated did Kaminsky show them what he had.

The briefing also started a clock. The group had one day to make its plan. Whatever they decided had to reach companies that compete with one another, and it had to reach users who would never be told the real reason. A fix that looked too urgent could point attackers straight at the hole. A fix that came too late would leave the hole open for anyone who stumbled onto it.

Photograph: Dan Kaminsky
Photograph: Dan Kaminsky. Photo: Dan_Kaminsky.jpg : Dave Bullock derivative work: Emdee ( talk ). Wikimedia Commons · CC BY 2.0. Resized and converted to WebP; no retouching.

“I broke the Internet”

Weeks before anyone booked a flight to Redmond, Kaminsky was lying in bed in February, trying to understand an odd behavior in DNS, the system that turns website names into the numeric addresses computers actually use. He had not gone looking for a catastrophe. About six months before the July 2008 patch, he later said, he had simply stumbled on the problem by accident.

Something stood in his way, and it was not a technical wall. It was a belief. Security people had known for years that a forged answer could be planted in a DNS server's memory, a trick called cache poisoning. They also believed it would take weeks of patient guessing, which made it more of a textbook worry than a working threat.

Then Kaminsky watched it work. The attack did not take weeks. It took seconds.

He picked up the phone and called his girlfriend, Crystal Williams, still in bed, and told her he had broken the Internet.

The moment he saw the attack succeed, he understood that it was universal. It did not depend on one vendor's bug or one unlucky company. Any kid could use it to redirect your Internet, sending you to a site of the attacker's choosing while your browser showed the name you had typed.

Kaminsky now held something that could not safely be kept in one head. Staying quiet meant the hole stayed open for anyone who found it next. Telling the wrong people, or telling them carelessly, might hand the attack to the very kids he feared. He needed somebody who understood DNS more deeply than he did, someone who could tell him whether he was right or merely sleepless.

Vixie says it can't be

Kaminsky's next call went to Paul Vixie, one of the people who knew DNS best. Vixie listened and said no. A design flaw of that size could not have been missed, he told him. Someone would have caught it years ago.

So Kaminsky started explaining. The usual defense, he said, rested on a field called the TTL, the "time to live" that tells a server how long to keep an answer before asking again. Attackers had always been told to aim at a name like www.example.com. Once the real answer sat in the cache, the TTL shut the door, and a guesser got only a few tries a day.

Kaminsky aimed somewhere else, at sibling names like 83.example.com. Nobody had ever asked for that name, so the server held no entry for it and no TTL to wait out. The attacker could ask again immediately, with a new name each time. And the forged response could carry information about the target too.

The guessing itself was small. A query ID is the first sixteen bits of a DNS packet, which leaves only 65,536 possible transaction IDs. Dan Bernstein, author of the DNS software djbdns, had reported that weakness as early as 1999. The DNS community had answered that if the TTL is one day, an attack will take years, and the reply had nearly become an RFC titled "Forgery Resilience." Kaminsky's sibling names made the answer obsolete.

The write-up that Matasano later published put a number on it: a Mallory, its stock name for an attacker, could finish the job in less than 10 seconds on a fast Internet link.

An attacker could finish the job in less than 10 seconds on a fast Internet link.

Vixie's confidence did not survive the explanation. By the end of the call he was very worried.

“Call Paul Vixie”

Vixie's verdict on the flaw left no room for a small fix: everything in the digital universe would have to be patched. He alerted the Department of Homeland Security, then executives at Cisco and Microsoft, and asked them to start work on a fix.

Other vendors got stranger messages. Sandy Wilbourn, chief engineer at Nominum, a company that builds DNS software, opened an email from someone who said the subject could not be discussed by email or by phone. The note gave him one instruction: "Call Paul Vixie."

Wilbourn made the call, and what he learned put him in an awkward spot. He needed his customers to install a patch, but he could not tell them why until the fix was ready. Asking busy network operators to trust him blindly, he later said, led to an "interesting dynamic."

Kaminsky, meanwhile, had a rule for himself. He could have tried to cash in on what he knew, but he felt it would be morally wrong to profit from the flaw, and he did not want his mother visiting him in prison. She had been through something like this once. When he was 11, he broke into military computers, and a government security administrator told her the family's Internet would be cut off. She threatened to take out an advertisement in the San Francisco Chronicle. Instead of a disconnection, the two sides negotiated a three-day Internet "timeout."

Rival companies would have to work together in secret, and they needed a room and a day. The group chose Microsoft's campus in Redmond, and the invitations went out.

One day to build a sneaky fix

Inside the Redmond room, nobody asked whose product would look bad or who would profit. Kaminsky later said the group ignored company boundaries and private interests, and that no politics came to the meeting. Rivals sat at one table and argued only about the problem.

A real cure meant making the name server pick a different UDP source port, the numbered channel a reply comes back through, for every question. That would give an attacker a second number to guess on top of the transaction ID. But the operating system's kernel was never built to open and close thousands of sockets a second, and name servers that tried it risked slowdowns and crashes. Most had left the issue alone for that reason.

One program had not. Bernstein's djbdns already randomized its source ports, using the port as a second identifier and pushing the number of possible IDs into the billions.

So the group chose it. The fix would pair the 16-bit transaction ID with the UDP source port, and Kaminsky said they hoped it was "so sneaky" that attackers could not use it to find the hole. A vendor could ship the change without announcing what it protected against, and reverse engineering it would not be directly possible.

The patch had a limit, and Kaminsky did not hide it. It did not repair DNS. It only stretched the attack from under ten seconds to more than ten seconds, a delay that bought time but closed nothing for good.

A fix existed, but it worked only if everyone installed it at once. A single vendor shipping early would put the whole plan at risk. Now Microsoft, Sun, ISC and Cisco had to ship on the same day.

July 8: everyone patches at once

On July 8, 2008, the secret Kaminsky had kept for months finally had to face the public. The patches he had worked on with the DNS vendors went out that day, and the world saw only a stack of routine updates with no explanation attached.

Four sets of fixes were ready: from Microsoft, Sun, ISC's BIND and Cisco. Kaminsky said the group had selected them to be as non-disruptive as possible. A patch that crashed servers or slowed them to a crawl would have made administrators hesitate, and hesitation was the one thing the plan could not afford.

Kaminsky called the release the first coordinated multi-vendor synchronized patch release ever carried out. The result was the largest synchronized security update in the history of the Internet.

The vendors, though, did not believe silence would last. In their overview, they warned that the vulnerability would very likely become public within weeks of the release. Kaminsky answered with a promise and a deadline: he would publish the details at a security conference on August 6th. Until then, he asked the security world to trust him and install the patches.

He also gave people a way to check their own exposure. On Doxpara.com he posted a "DNS Checker," a tool that told a visitor whether the name server behind his connection was still vulnerable.

The cat gets out of the bag

Picture Kaminsky on July 21, scrolling through the Matasano blog. He had meant to give the world a month of quiet after the patch, and the Internet had just refused. The post was called "Reliable DNS Forgery in 2008," and its first line must have been painful to read: "The cat is out of the bag." Halvar Flake, a researcher, had figured out the flaw, the post went on, and the details were out.

The leak came down quickly, but the damage was done. Others had already mirrored it, so deleting the original changed little. By late July the secret was gone, and hackers had built attacks that were "fully weaponized." The patch Kaminsky had hoped to protect with silence now had to race the people who had read the post.

The race turned out to be closer than the pessimists expected. The day after the patches shipped, 15 percent of the servers tested were safe. Two weeks later, half were.

By early August, two-thirds of the tested servers were safe. Kaminsky's own slides show how far that outran the forecast: the expected patch rate was 50% after a full year.

Server safety rates reached 15 percent the day after, 50 percent two weeks later, and 66 percent after a single month.

The reality was 66% after a single month. Kaminsky then went to Black Hat, the security conference, to present his findings in person. He walked onto the stage wearing both a suit and rollerskates.

Idiot or Paul Revere?

Within weeks, the secrecy had cost Kaminsky more than a few late nights. The coordinator of the CERT security advisory wrote that reactions were mixed but overall negative, and that Kaminsky had been called an idiot for how he managed the disclosure. Security researchers who wanted the attack explained at once felt shut out, and the backlash landed on him personally. One author at CircleID, a website for Internet infrastructure, answered a critic who demanded the details right away. "Do you mind if we patch the important parts of the infrastructure first?"

Kaminsky refused to let anyone call the patch a cure. When DNSSEC came up, the system of cryptographic signatures that lets a resolver check that an answer is genuine, he admitted he had never been a supporter, and that before all this he had been at best neutral. Now he looked at what the patch had and had not done, and he put it plainly: "not like we repaired DNS. We made the Internet less flammable." The root of the DNS was signed in July 2010, and.com the next year. Still, fewer than 15 percent of users sat behind resolvers that actually checked the signatures.

The slowness lasted: by March 2026, DNSSEC worked in only 83 of the country-code domains, fewer than half. Still, the fix had done something for one person who had once held the family's Internet hostage. In 2008, after the DNS fix, the administrator who had threatened to cut off the Kaminsky household thanked Kaminsky and asked to be introduced to his mother. The woman who had once threatened a newspaper advertisement now had a visitor at her door, hand out to shake hers.

Cover: Dan_Kaminsky.jpg : Dave Bullock derivative work: Emdee ( tal · CC BY 2.0 · Wikimedia Commons. Layout and headline text by Signal Titans.

Source: The Flaw Fixed in Secret: Dan Kaminsky and the Summer of 2008 When the Internet's Address Book Could Be Forged · DNS spoofing (Wikipedia) · Domain Name System Security Extensions (Wikipedia) · ISPs' Error Page Ads Let Hackers Hijack Entire Web, Researcher Discloses | WIRED · Sony Numbers Add Up to Trouble | WIRED · DNSSEC Project Archive – Launch TCR Selection · resources.finalsite.net · EarthLink redirect service poses security risk, expert says | InfoWorld · Major DNS flaw could disrupt the Internet – Network World · Dan Kaminsky Discovers Fundamental Issue In DNS: Massive Multivendor Patch Released | Securosis · Not a Guessing Game · DNS bug leaks by matasano: beezari — LiveJournal · Seattle security expert helped uncover major design flaw on Internet · Pwnie Awards 2008 · cr.yp.to · Measures to prevent DNS spoofing · Dan Kaminsky's DNS Vulnerability of 2008 | Decipher · www.blackhat.com · Dan Kaminsky Feels a disturbance in The Internet – Semiaccurate · Kaminsky Issues Developer Tool To Kill Injection Bugs · Dan Kaminsky: Tributes pour in for security researcher who died after short illness | The Daily Swig · Security Researcher Dan Kaminsky Passes Away – SecurityWeek · arxiv.org

Share this article
FacebookThreadsLinkedInX

Leave a Reply

Your email address will not be published. Required fields are marked *