Just before 18:48 UTC, Pakistan Telecom, in response to government order to block access to YouTube (see news item), started advertising a route for 208.65.153.0/24 to its provider, PCCW (AS 3491). For those unfamiliar with BGP, this is a more specific route than the ones used by YouTube (208.65.152.0/22), and therefore most routers would choose to send traffic to Pakistan Telecom for this slice of YouTube's network.

I became interested in this immediately as I was concerned that I wouldn't be able to spend my evening watching imbecilic videos of cats doing foolish things (even for a cat). Then, I started to examine our mountains of BGP data and quickly noticed that the correct AS path ("Will the real YouTube please stand up?") was getting restored to most of our peers.

The data points identified below are culled from over 250 peering sessions with 170 unique ASNs. While it is hard to describe exactly how widely this hijacked prefix was seen, we estimate that it was seen by a bit more than two-thirds of the Internet.

This table shows the timing of the event and how quickly the route propagated (this is actually a fairly normal propagation pattern). The ASNs seeing the prefix were mostly transit ASNs below, so this means that these routes were distributed broadly across the Internet. Almost all of the default free zone (DFZ) carried the hijacked route at least briefly.

Since BGP relies on a transitive trust model, validation between customer and provider is important. In this case, PCCW (3491) did not validate Pakistan Telecom's (17557) advertisement for 208.65.153.0/24. By accepting this advertisement and readvertising to its peers and providers PCCW was propagating the wrong route. Those who saw this route from PCCW selected it since it was a more specific route. YouTube was advertising 208.65.152.0/22 before the event started and the /24 was a smaller (and more specific) advertisement. According to usual BGP route selection process, the /24 was then chosen, effectively completing the hijack.

Because of the fast detection and reaction of the YouTube staff and cooperation with other providers, service for their (sub-) prefix was interrupted for only thirty minutes for some lucky customers and, at most, a bit more than two hours. The exact duration of the outage depends on your vantage point on the Internet.

Ultimately, though, the problem remains one of transitive trust. A provider can and should limit the advertisements it will accept from a customer. The mechanics can be arranged manually or can be configured using Routing Policy Specification Language (RPSL) to communicate the policy and drive configuration. In the case of Pakistan Telecom, they originate or transit fewer than 1000 prefixes.

So, it's heartwarming to know that two things are still true. It is still trivially possible to hijack prefixes (whether maliciously or inadvertently). I can go to sleep knowing that my neighbors are happily watching their LOLCATS.

This post reproduced here with kind permission from Renesys. To visit the blog maintained by Renesys click here.

Comments

I'm actually surprised this doesn't happen more often, if not inadvertently then as a form of attack. So much of the Internet indeed depends on trust, it's a wonder it doesn't break down more often. Smaller ISPs don't have the resources necessarily to check out every route to make sure the advertiser is also the owner or otherwise authorized to advertise it if they are the owner's ISP, and their policies may not be implemented strictly enough to prevent leaks. Regardless of whether you are doing AS path or prefix-based filters, mistakes can easily be made. More often then not, mistakes usually lead to the inadvertent filtering of a route rather than the advertisement of an incorrect route. But I'm betting there are a whole bunch of misconfigured filters sitting out there vulnerable to the announcement of an incorrect route, just waiting to let it through, surviving only on the correct configuration of downstream customers' routers. The trust model mostly works, but is definitely vulnerable.