Distributed Systems Under Attack: Bitcoin and the Internet

By Alex Beal
March 27, 2013

Yesterday, the Internet withstood the largest DDoS attack in history. A squabble between Spamhaus and a spammer escalated into a 300 Gbps avalanche directed against Cloudflare and several structures that are an integral part of the Internet’s architecture. The tale of the attack and mitigation has been posted on Cloudflare’s blog, and reads like something out of an epic saga. At every turn, the attacker is foiled and becomes more desperate, first attacking Cloudflare directly, and then the networks Cloudflare relies on. As the attack escalates, and more and more networks are caught in the crossfire, an incredible thing happens: the foe is vanquished through an impressive display of cooperation between Cloudflare and various Internet Exchanges (IXs) and Tier 1 providers. As Cloudflare explains:

The attacks also exposed some vulnerabilities in the architecture of some IXs. We, along with many other network security experts, worked with the team at LINX [the London Internet Exchange] to better secure themselves. In doing so, we developed a list of best practices for any IX in order to make them less vulnerable to attacks. […] We’ve been very impressed with the team at LINX and how quickly they’ve worked to implement these changes and add additional security to their IX and are hopeful other IXs will quickly follow their lead. 1

In other words, Cloudflare was able to coordinate with LINX, and several other IXs, to help mitigate an attack that had spilled beyond its borders. The fixes were implemented quickly, and before long, a list of best practices had been drafted and sent to other IXs around the world. The cooperation between different parties all participating in the same distributed system is as praiseworthy as it is impressive, but it’s not the first time it’s happened.

In 2008, the Pakistani government decided to unilaterally knock YouTube offline in an attempt to censor videos considered blasphemous. As explained by Jonathan Zittrain in his talk The End of Crypto a Pakistani telecom decided to advertise a new, false, route to YouTube making the site unreachable. The false route quickly spread across the Internet, as other servers began to unwittingly relay the bad information, and before long YouTube was offline worldwide. But then, as Zittrain explains, something amazing happened:

This is why this YouTube hijacking was not permanent. It was only two hours long not because of anything YouTube or Google did, but because there’s NANOG, the North American Network Operator’s Group. People who rather on a nice day be in a windowless room using non-proportional font, and they’re emailing with each other, and some of them are midlevel employees at ISPs, and they say, “Look, YouTube’s IP block has been hijacked. This is not just a case of YouTube engineers doing something stupid. Here are some other paths you can use to change your own routers manually, not to be repeating the poison,” and enough people reprogrammed their routers in the right places that that message began to trump the earlier message coming from Pakistan and you got YouTube back up again. 2

In other words, a group of disparate network engineers was able to fix the Internet, communicating over a mailing list, and working together to patch their individual routers. The good routers soon overpowered the bad, and access to YouTube was restored. This is one more example of a group of unrelated people working together to keep a distributed system from collapsing.

So why is this important, and what does it have to do with Bitcoin? The idea is that examples like this give me hope that Bitcoin has a chance of surviving in the long run. In the past, I’ve been critical of its chances given its distributed architecture. No one in particular is minding the shop, so when disaster strikes, who can step in and prevent total catastrophe? Bitcoin was tested in this way recently, during the great blockchain fork of 2013. A bug in the code caused different versions of the Bitcoin software to go out of sync, and one version began creating a transaction history separate from the others. Luckily, a small core group of Bitcoin developers and mining pool operators caught the event early, and switched a majority of the network over to one version of the software thus avoiding disaster. Although they won the battle, I was skeptical of this solution scaling. It only worked because the network was, in a sense, centrally controlled by this small group, but seeing this sort of solution also work on scales as large as the Internet gives me hope that Bitcoin will be around for a while longer.

  1. http://blog.cloudflare.com/the-ddos-that-almost-broke-the-internet↩︎

  2. http://youtu.be/3ijjHZHNIbU?t=51m50s↩︎