So while we're still filtering in, the first slide you're seeing is just some silly stuff, but a little bit about the presenters. None of you probably know me. The last talk I gave at Nanog, or rather, DEF CON, was 11. We were still at the AP, and it was hot, and we were on the roof, and it was bad. And you almost died. I almost died. Oh, right. I really almost died. I wore yellow pants, even, just to be funny, and then no one got it. Yeah. I still don't get it. Exactly. And so I do inter-networking stuff. I like to know how routers work, think a lot about the inside guts, what's going on in code, what's going on in the logic they use. I run a co-location company in Wisconsin. My email address should let you find that. And we do a lot with anything that touches bits, facilities, power, networks, hardware. And Alex, I think, is much the same. Yep. So, are we good? Are we still coming in? We're still coming in. So, while we're still coming in here, I want to say something, and this comes from all the speaker staff and most of the goon staff. We actually like you, and we like you coming. So, thank you for coming, because I can't DEF CON if you don't come. So, thank you for coming. Thank you for bringing up with the bad food, the smells, both from yourself and others. Thank you for, you know, putting up with all the stuff that isn't so hot, for all the stuff that really is awesome. Thank you. It makes it. Sir, you have the con. I have the con. Enjoy. Thank you. This is going to fucking rock. Yeah! Yeah! Okay. So, we're here to talk about stealing the internet, as if you didn't know already. So, why does this stuff matter? Why is it relevant? I'm imagining that most of you can see quickly why it does, but we're going to go through a few points, just in case you're one of the media or someone watching who doesn't know this stuff intuitively or what. So, if someone can passively intercept your traffic, that's a big reason to care. We could also then, by knowing what's coming into your network, know what to possibly want to look at that you're sending things or receiving things from. So, if we seize packets from address X heading to Y, Y is you, we can also hijack X to see what you're sending to X. So, we can discover the other half of the communication and further this whole process. We also think this is a relative relevant thing for you, because once the data comes to our network, we can do anything. I mean, really anything. The sky's the limit. And then, the worst part about it, I guess, and one of the more concerning parts, is that as an end user with an end system, without access... or touching the core, you really can't, I use the word core wrongly, you really can't affect it, though, as an end user. If you see this stuff happening, if you can figure it out it's happening, as an end user, you really can't fix it. And if we do everything right, if the hijacker does everything right, you can't even really tell. And who can, who's using the DEF CON network today? Okay, since 12 o'clock, we've hijacked it. And we have a copy of everything you've done or received in New York. What we'll cover today is how that worked, and we'll explain how it worked through a little bit of understanding of BGP. Just to give me a consensus, I really don't want to go into all the details that we've had put into this presentation if I don't need to. Raise your hand if you've configured BGP, set it up with a neighbor, done some routing. Okay, it's minorities, so we're going to talk a little bit about the basic stuff, so you can appreciate some of the terms. It's not to bore you with BGP factoids and crap you'll never use. So, know the vernacular, know the terminology. We're going to also discuss some actual hijackings that are... interesting and have been well, well, uh, publicized, and you can find a lot more about, even more than what we'll mention today. Uh, then we'll get into the main monkey business. And we're going to talk about how our method is different from just hijacking. We're going to talk about how we construct the man-in-the-middle attack on the internet. And we'll show you some pretty pictures. We will then show you stuff in flight. Cool? Yeah? All right, so how does the internets work? There is no core. That's the first misconception. People say the core. When they say the core, they refer to a collection of networks. They refer to, like, uh, some number of them that say 15 or 20 that are considered what is called transit-free. Settlement-free networks, if you will. Where they do not pay to reach any other network. Either everyone's a customer or a peer. So they don't pay anything to get to Sprint if they're on U-Net and vice versa. Uh, the core, if you will, is made up of these largest of the large networks. They have thousands of edges, thousands of customers. And, uh, the interconnection between them becomes what we consider the core. Individual networks in BGP world, in the internet world, are identified by an autonomous system number. And this ASN is kind of just like a tag to say to another network, Hey, other network, I can reach IP address prefix X. I can reach block X. The IP, uh, information that you can, uh, convey to me is just tagged against or, if you will, indexed against that identifier. That ASN. Uh, it contains, again, the prefix we were talking about, the path. We get it. So we have this thing that's, uh, if you will, constructed as routes propagate through the net called the ASPath. That's part of an announcement. And this ASPath is simply a list of the networks the route has been learnt across. So if you are an end user looking at a route coming from Verizon, you might see your provider's upstream AS number of something with five digits because they're a newcomer and they're not that experienced. 40,000 whatever. The next AS might be, you know, 6461 then 701 because the customer comes from UNET. Okay? Example. The ASPath is a cumulative thing. And, uh, the reason that the ASPath is interesting, one final point before I go on, is that, um, it's what used in BGP to avoid having routing loops form. And our, uh, interesting method actually uses that to our advantage. So one of the important tenets to understand as well, uh, and I think we're all going to catch it, is that the longest prefix wins. The longest prefix is the most specific way to reach a certain collection of IP addresses. If you have a slash 16, that is less specific than a slash 18. If you have a slash 24, that is a lot less specific than a slash 30. And the slash denotes just the number of bits masked off in the network portion versus the host portion, if you will. So if a slash 24 was cut in half, a 25 would be the bottom half and top half. Okay? Uh. The 24 is less specific than the 225s. So, remember that. Now, this is a scribble I found for you. This is the internets on a whiteboard. And it happened to photograph well, and the guy at jungar.net put it up. So, thank you. You can look at this offline. This stuff is posted. We're not going to talk about all the elements here. But if you follow it through, it's showing an IBGP mesh in the bottom left, their provider giving a default route to AS100, 200, and 300, and they're renouncing their own prefixes back up to that parameter. So, we're going to go down to AS. Great. So, in BGP world, in network world, we have relationships between networks. And we're going to talk a bit about those here. The first relationship, which is kind of the crux of why this works, why can we get our route around different networks, is because they peer. They exchange that reachability information. Verizon needs to tell Sprint that, hey, I have a customer slash 24 or a customer slash 20. Here it is. Here is the IP next hop that you'll use to reach it. Install that to your routing table. Thanks, please. And it does so. And peers typically, at the level we're talking, the reason it works out is because if they had to pay each other, they would not want to deal with the volume of money required, and it would be senseless billing. So, in most of the core, most of the largest settlement free asses, the peering is always maintained close to one-to-one. They try to balance traffic out among multiple locations. And essentially, this is what forms the collective of reachability. The other relationship that's prevalent, which we're going to talk about from the perspective of how we get our routes into the network, is the customer aspect. If you're a customer relationship, you pay someone simply to take your announcement and give it to everybody else, and then also give you access on some amount of bandwidth, some amount of connectivity. Now, importantly, on the actual amount of information you're exchanging, the actual prefix, when we announce a route, we expect that it's going to get to the customer. We hand it off from our upstream provider to all other providers, and they won't step on it, they won't filter it, they won't reject it. And by expecting that, we engage the interesting trust model. And that means that once it gets towards these central networks, the largest, say, 10 or 20, that peer with everybody else, that if you get to one, you essentially get to all of them. This means that there is an interrelated chain of trust, but it doesn't necessarily mean anything about the address they've been given. There's no way for them to know that that's my IP address, necessarily, more than I can prove on paper. You can look at who is and say, okay, well, Tony from this e-mail address is asking to route a block registered to a different company. That's asking for a letter of authorization. And I could fake that, too. This is just how it is. And IP addresses have that as a fundamental property in the Internet routing world. How it works out is ICANN initially assigns slash-8s blocks to regional Internet registries. Aaron, Ray Bafranek, J.P. Nick, Lack Nick, whatever, assign them to their regions of customer handling, if you will. In this country, it's Aaron. And then RIR is assigned to ISPs or LIRs, like in ripe regions. So ISPs get their IP address assignments from Aaron in the United States. Aaron gets their blocks from ICANN. And interestingly, when you get an IP address range from Aaron, there is no direct association between that IP range and your ASN. Now, in some cases, like in our company's case, we happen to have an ASN that's got all of our contact information on it and registered to us and our IP blocks. In some cases, we take on customers who have their own IPs registered to their own companies, but they have no AS number. They have no network identifier. So we go ahead and announce that space for them. And no one says no because we just tell our upstreams, basically on a handshake, this is okay, and they have to really take it, or we don't get to send traffic to them. They can't bill us for the traffic. And no business is conducted. Do you want to say something? Okay. So because of these states, because of the way these things are, it creates interesting problems for the operational aspects of the network. And one of the ways to stop the problem that we're going to talk about is through filtering what you send to a provider and what they send to the customer and what providers send to providers. From a customer point of view, the problem we can see is that often your upstream provider doesn't do much at all, doesn't hardly filter anything. They might set a certain number of maximum prefixes. They might say you can only send us 300. They don't want you to leak them a full table, is what they're saying. They don't want you to give them 200,000 routes and flood them with a copy of the internet from your perspective. And sometimes they'll filter on the AS path. So they'll say we'll only take routes that claim to come from your AS number and not something beyond that, or not a set of hosts that we don't know beyond that. So this is normal. In smaller carriers, in smaller locations, they can often get away with a higher touch feature like individually allowing each IP address, static prefix lists. But generally as providers get larger, you don't see these types of things. Sometimes they'll even check you out if they have a person dedicated to doing it. And in larger carriers between them, they will typically have internet routing databases where you can build prefix lists, build filter lists between networks. And these kind of solve a lot of the problems, but don't address the ones we're going to pick at today. So when you peer with someone, this is even worse than a customer. Customers have some filtering, some sanity checks. But when you peer with another network, if you and that peers up with Telia, there's so many customers on both networks and a definite company and business interest in not exchanging all that detail. You don't want to know who's using who. They don't want to give that business information up. There's no interest then in building comprehensive, detailed filters to say, okay, you and that only have any routes that we know you have customers for and restrict the stuff that Pilo and TCAP are telling you that's wrong. They don't do that. It's really not tenable. So we have an avenue. Now, even better, if a provider happens to use a certain range of IP addresses internally, say they have 146.20 slash 16 assigned to a bunch of web servers. Some providers will not be smart enough even to filter from other customers and other upstreams their own IP addresses. So imagine this. Imagine someone's got a 16 on the net and you go and announce a slash 20 of IPs that they're using internally. So they would often accept this and pass out their own legitimate traffic out to you in lieu of their own internal machines just because they don't filter their own IP address on input. It's great. So the routing registries are my proposal that no one seems to like, and I don't blame them. That was a horrible book. So the way that registries work today is that people go and pop their entries into these databases. You go and say, hey, this company name, this AS, claims to have this stuff. And once you do that, it flies around the world. IRR servers mirror other servers. It's kind of a community of folks that do this. And filtering on this mechanism will help stop the macro problems. It'll stop Unet from leaking routes from Sprint when they shouldn't. Because it's clear who's got what general blocks, who's got what kind of interconnections happening. You should never see X behind X because you peer with them directly, for instance. But it doesn't get that far. So sometimes when you want to do this at a scale, you have certain problems. If you are a sufficiently large network, you're going to have tens of thousands of customer routes and perhaps hundreds. And if you wanted to have everybody else build filters to only accept what you tell them is actually a customer, they would have to put that and take that load on in every router in the network that touches your network. It could be 50. It could be 30 routers. It could be many, many sessions globally. And at scale, filtering aggressively is challenging because of that. Now imagine a filter list per peer at each router 20 or 30 times over in your network just sitting there in config space. Cisco can't really hold this in NVRAM. You have to source them from a TTP server at boot often. It's kind of a conundrum. Juniper has some solutions, but no one's really deploying it broadly, to my knowledge. And the worst of this is IRRs aren't maintained terribly well. When people put a route in, they rarely ever remember to take it out when the customer's gone. Oops. And, even better, they are incredibly insecure. Almost anyone can just go toss anything into it. And we'll show you. This is how we've successfully gotten the route that DEF CON uses, 24.120.56.0.22. Actually, wasn't it? Well, this is the 24 we registered and we hijacked. It comes from a parent 22. If you look in BGP, 24.120.56.0.22 is actually the bounding prefix. What you'll see here is on August 7th, 2008, at 9.48 p.m., we told AltDB, hey, AS26627 can route that IP address. And anybody who uses AltDB to build their filter lists now thinks that we're valid. We didn't even have to detect anything. It's not like we did social engineer shit. You just said it. It's like, hey, bank teller, how about a grand? So, this stuff gets you to the point of being able to announce IP space you don't belong to, you don't have the right to use, but you can. You can still do it. No one's stopping you. And further, you can do really cool stuff that we're going to show you in a bit. But there are other uses for hijacking where you don't, we do break things. And at one point, it was difficult to get address space quickly, and so folks would often just take it. People still use this stuff. People will announce IP space, use it for a few hours, send a bunch of spam, do a bunch of phishing sites, blast wherever they're going to blast, and go away. And the favorites here are using unallocated address space. So, things from blocks not assigned by ICANN to an IRR or LIR yet. Things that aren't assigned to ARIN yet. Can you think of some blocks, Alex? Like, what's it, 46 slash 8? What's a block unassigned yet? Like 46? Yeah, anything 46, like 77, I think, is not assigned. So there's a number of slash 8s that ICANN can assign to people that aren't assigned that you can go ahead and use and have almost no repercussions because there's no who-is entries for them. They point to ICANN. So who are you going to complain to? You know, who is it is the address from this block and it's not going to give you anything useful or actionable. And that's a good thing if you're a spammer, apparently. And also, you just can't get the complaints in the first place. So you can also use jacking to cause or hijacking of a prefix by announcing more specifics to cause a raw outage. And on certain types of industries or in certain industries, this is pretty popular. If you're an adult site that makes money on initial sign-ups and customers never come back, you really want to have most of the means you can have. And by keeping your competition away from the customer base, just by numbers games, you end up winning. So if you can hold them down for a few hours a day and not spend a lot of traffic on it, no denial-of-service attacks for botnets to have to do for you, this is a low-work way to hold them down. And this goes on. But it's not very popular. It doesn't get you something. It helps you if you've already got a process that benefits you by suppressing another. The best part of botjacking could be, if you didn't want to do any of the other nastiness, would be to put up fake websites for blocks that are in use. Like, for example, 121.146.024. That slash 24 is for Twitter. I could think of a ton of better sites to put up. I mean, couldn't you? You were pressed. And so naturally, we have to wonder, what are we doing in terms of whether this is legal or not? Whose turf are we trouncing on? And the first step we have to ask is, if it's unused space, unallocated, and ICANN, quote-unquote, has authority by some ridiculous amount of paperwork proxies stemming from DARPA days, who really owns it? If no one's using it, who can notice to care? Further, it's just a number. It's not like it's IP. It's not a business process. You can't patent an IP address. You can't own them. As an end user, you're assigned them. And the provider that assigned you that address doesn't own it either. They got it from their IRR. Or rather, RIR. And so up and down the chain, there's no real solid ownership. And so that's confounding. And as far as we're aware, there's been no real prosecutions, no attraction in bringing anyone to some sort of justice at all. And people know the actors, yet nothing goes on. The worst case is that your bad stuff is seen, and they pull your pointers, and maybe your upstream's turning off. So the real cool stuff. How do you do it? So the first method, full-on hijacking. Back in the day, it was popular to go traverse Whois records for subnets and find any that didn't have a valid domain name. And programmatically, that was pretty easy. Scripts, right? Any annexed returns, want to look at those again. Go register that domain. Just go become that domain. Change the contact information with Aaron, now that you have the valid domain. Or just announce it. Just take it. Forget doing it proper. And in many ways, this is fine, because people just don't care. Enough to filter. We kind of covered the problems with doing it at scale. And anyway, they want to. They want to do business with you. Upstream providers want to route that IP space if they can reasonably guess and be sure that they're not going to just go out of business because of your one act, one need. Interesting history. Anybody remember this one? 7,700. 97? So this is back when the Internet was a handful of routes as it is today, maybe a few thousand routes. And we were using RIP internally, Routing Information Protocol, which did not understand classless stuff yet. Well, actually, no, it did in 97. RIPv2 did. But in this case, these guys somehow redistributed BGP into RIP, which cut everything off 24s, which wasn't what was in the real table. They were longer. And then they redistributed them back to BGP to sprint. And all the traffic for most of the Internet chose that more specific path through sprint, DOSing sprint, and overflowing router memory that couldn't handle that many routes. It was a great day. 146.20, URI forged in steel. It was literally forged and stolen by a person that was then handing out slash 20s to a bunch of his friends. It's pretty cool. 166.188 is an interesting story. The Chilean police actually got jacked twice by the most notable one, like the company in Nevada, the Caballeros de Chile LLC. So literally, people, it's thug-on-thug hate out there, even in IP jacking. Now, interesting, if you're interested in this kind of like tracking the bad guys kind of stuff, completewhois.com is a somewhat canonical resource. This guy's mission, it seems, in life is to track these things and for reasons that we suspect in the comment in the slide. And so, aside from direct interested stuff, this stuff does happen accidentally, like the AS7007 back in the day. And one of the more recent ones, that's interesting of note in accidental hijackings, we're going to go ahead for one sec, when YouTube went down in early February, so this one we'll only spend a few minutes on because we're getting kind of towards the bottom of the hour. The YouTube hijack was clever, or not clever, but interestingly, conveniently accidental. They announced a few prefixes, some 24s, 22, a 20, and a 19. So Pakistan government one day decides, hey, there's some bad stuff out here, we need to block a few IP addresses. And somehow that turns into blocking a whole subnet. We don't know how that happened. Then Pakistan Telecom, on request, nails up a more specific route, a 24 out of the 22, which happens to be where, like, I think the main content portal happens and then it redirects you to the actual video content, CDN nodes and whatnot, but the original input node lives in that 24. And so they nail it up to null zero to discard it, which is a fine way to filter it at your borders. Unfortunately, it somehow ends up in BGP. And even worse, because PCCW doesn't fucking filter, it ends up in their table. And because PCCW appears with all the big guys, it ends up in the whole fucking internet. So now YouTube is down. And they get nothing. They go to Pakistan and they get timeouts. It's great. If only they had thought about putting up a fake site with some useful content. So the response was to try to win by a longer prefix. They announce a 24. Again, they had a 22 previously to that. They announce a 24 to try to win the specificity. And they announce some 25s. And 25s will propagate on people who, again, don't filter. Most folks filter at 24 length. That's a standard practice going back for a while. But you can pay larger providers to, internally at least, take 25s. And so they try that, and it kind of helps. It doesn't solve the problem. So PCCW finally turns off Pakistan Telecom two hours later. It just shuts down the peer. And that seems to resolve it. And after things reconverge, everyone's happy again. They're back watching YouTube, fat and happy. You guys aren't any of those, so we're fine. So here's the actual notice from the government. It only names three IP addresses. Yet, again, that turns into a clusterfuck, internally, and becomes a 24. And it leaks to the world. So we think it was unintentional. So people who do look at hijacking, more interestingly, critically, than we do here, do exist, and they happen to go to NANOG, the North American Ops Group meeting. Anybody go to NANOG? Oh, I know you. So it's a great meeting. I recommend anyone who cares about it knows where to go. And with a little bit of help from our friends, I think we have some Bombay-type people, and Sapphire, and all that. We then have exercises emerge out of those moments. And so we tried some random shit recently. And one was to announce 1-slash-8. That actually got to most of the world. 1-4-6-20, for old time's sake, got to pretty much all the world. And then we tried things just for the heck of it, longer than 24. And almost half, in some cases, down to an individual IP address, a slash-32 worked, globally speaking. We also tried some funky stuff to try to break routing table tree construction. I'm not sure if anybody knows a little bit about Ceph, but in some cases, the way the tree, the way the route resolution happens in this memory structure is indexed on the length of prefixes. By having a zero-length prefix, this resets the root of the tree, causing the entire thing to be recalculated. It's a big, heavy operation. And if you announce and withdraw that, say, every few seconds, you can really cause some problems. So we tried 0-slash-8 and 0-0-slash-16, and it got some place. It's only four or five routers. So things actually seem to not take it smart. We also tried AS0, which shouldn't work, and it used to crash some Junos stuff. That didn't get very far either. So it's been fun. This all means, really, that to deal with these problems, this is somewhat a complicated state of affairs. No one wants to go and push really hard for excessive amounts of work to do PKI or some sort of certificate chaining model to sign your routes or sign your ASN plus your routes and then wait to verify that. It adds a lot of extra work, and we're just ramming forward, scaling the net so fast and furiously, we just don't think we can do it collectively. And again, back to the weakest link problem. Unless everybody does it, just one ingress point, you're kind of screwed. And even if there are no ingress points and it's all well-filtered and you have these wonderful IRRs, now we have the whole trust problem of who can contribute to those lists in the first place. So to deal with it, we have some solutions. There are some automated systems that at least can watch announcements from various vantage points in the internet and tell you, hey, something has happened within the range of addresses that you care about. And they can let you know someone possibly is hijacking your space. The best bet today to try to do the right thing is to register your AS and prefixes in some sort of RIRs. And maybe eventually someone will start using it. But if no one uses it yet, it's never going to happen. The other problem with this little tack that we're going to talk about and show you is that you still, on an IP level, on a Layer 3 level, can be sub-visible. You can be essentially passive in the path. But your BGP aspects are still quite visible. So the hijacked route, to just have that work, necessarily has to be visible. Now it would be ultimately interesting to try to hide that. We haven't really thought through the whole problem space. But what we're doing today doesn't hide the fact in BGP we are announcing something within a larger range of somebody else's something. So... Did anybody notice anything strange happening around noon today with the DEVCON network? I think you told them already. I guess not. I guess nobody noticed. You keep that. And then further, if the security is interested in being tight, yet the stuff that we see that's popular doesn't actually cause any problems, was it of value to do in the first place? If it's working and no one's complaining, why are we spending money on that? Every executive asks the question. We can't tell them why other than that. So, say you do get hijacked. An interesting state of affairs is that once you find out you've been hijacked, you get to determine just basically yell at your upstreams. You could be an end user, end sprint on a T1 or a DS3 or something, and be part of a larger slash 16 or an 18 in your region. And a narrow 24 around you and a couple other customers happens to be hijacked. Well, the entirety of the prefix is not disturbed. Nobody else is down. And if the actual revenue or the value of those connections isn't very high, it's hard to get a good response. It's just the nature of things. So, the scale of this stuff ranges from minutes to perhaps hours and weeks. If you're like a YouTube kind of consumer of resources, of bandwidth, of networking, you can get attention quick and in a couple hours find the right people. The communities are quite small. I see the Nanog shirt now and I understand. If you know people, and you certainly would, contacting the NOCs is easy to shortcut the customer service rigmarole. They're not going to help you. They're not going to understand what this stuff really means as much as someone who runs BGP. And so, you know, compared to something that's more relevant, trying to have someone stop botnetting, flooding your server, it's about on par with that. You know, ask them nicely, maybe you'll pay the ransom. I don't know. Okay, so, boiling it down for the first half hour of nonsense. This means that you can have a whole lot of laughs and lols. You can combine things. Dan Kaminski and Jay and a couple other folks even alluded to this. Imagine that if you had a man-in-the-middle attack using our mechanism, and could monitor the return traffic to a client. Imagine all the wonderful stuff you could insert in JavaScript land and images land and controls land and Flash, everything else, all of it. Even better, no reason to even try to set up a connection or poke at stuff actively if you have the packets in both directions. So, the other interesting point is this gives you a, again, a level of, you know, of invisibility, as you'll see, that isn't paralleled. Typically, if you want to be in line with someone, you have to go to the provider or somewhere near the edge, near the constriction. And it's even worse if that person you're trying to work on has multiple connections right to their edge. They could have a couple DS3s to their site. You have to monitor both or somehow work on both. You can't get in their building. So, this solves the problem in a far more elegant and very much less intrusive way. Um, so by man-in-the-middle-ing this stuff and hijacking prefixes and doing everything else, you can also discover passively who you're talking to. From a traffic analysis point of view, it could be very valuable to know about endpoints that are VPNing to you all the time. People at home, working from home on static cable or DSL or what have you. People that you have tunnels to on static office endpoints. Not knowing the particulars of the inside tunnel traffic is one thing, but knowing how you communicate what you're doing is another. Further, if you want to just break selective traffic this way, you certainly can. Again, half the communication comes through us. Pretty much every sort of protocol is two-way. So, if you want to really mess up a sales staff, maybe you take out IPSec and leave everything else working. I don't know. Um, best, global reach from a local perspective. You can hijack stuff from China to the US. You can do it the opposite. So, perhaps it's more concerning. And again, we've kind of alluded to this, but how do you know it's not already happening? It's something you can't even tell. Let's take a laptop right now who's on a computer. Try tracerouting to your address at DEF CON and out from DEF CON. Oh, you can... Oh, come on. That's so disappointing. Who's brave enough to put their damn Wi-Fi on? I mean, I agree. We have Evdo and a VPN over that. So, I mean, I don't blame you, but come on. Well, outbound's bad. Traceroute back in. You'll see what I mean. We're going to go on while you're doing that, though. So, well, you can go to whatismyip.com and get it yourself, please. Oh. That's the total Tor experience, isn't it? Okay, so what's new about this hijack? This is the good stuff. You start listening again. So, the change here is we originate the route like we always did. That's not the change. We went to the usual means through longer prefix, that is, more specific route or a shorter path if you have multiple places to announce the route from. We don't have to have a longer prefix. We can have the same 24 and just win through numbers. That's rare. Not many attackers have a coordinated set of 16 data centers or whatever. Those are there. And so, as long as we attract a majority of the Internet to us, we consider that a win. And, yes, so our method, okay, this is the cool part. This is where it gets interesting. To do more than hijack and handle the traffic locally, pass it back out, you need to somehow get the packets you received back to the actual target. And for a long time, that was hard. We thought about it, thought about it, thought about it. Then this bright guy actually somehow came to this. You want to talk about that part? Well, right. So, the problem is that once you hijack the traffic, you get it back to you. How do you get it back to the target? So, the question is how do you tell the routers in the middle between you and the target not to take this route? And we use the BGP property that routers will not accept BGP advertisement with its own ASN in the path. So, what we do, we say that this route actually came from the target. Don't give it away yet. The other option, the other option was telling it back there. That's not so great. Reply path, yes. You got way too far ahead. So, anyway, we want to use zero as a reply path. If we don't use it as a reply path, this method doesn't work. We're back to where we are right now. You can jack a route. You can't make it keep working. You get noticed. Things get fixed. You're out of the loop. So, let's hack, hijack with them and the middle method. So, first, you got to know some stuff. We got to know what our current path to that target is. Does it go out from you to some ISP then some other? Certainly, it does, but you got to know that ahead of time. Track that. Then, figure out the AS number of each ISP that you've reversed. It might be two ISPs. Four could be six. Whatever. Record those. Then, as you announce the hijacked route, apply ASPath prepens, naming each of the ASNs you're going to use for the current reply path and on into the future. This means that the path you're forwarding in right now, which the Internet follows, is going to remain in place. Then, you nail up a static route for the prefix you're hijacking to that same neighbor tree. This, in Texas, is a little bit dense. So, done. Now, you are the man in the middle. You are there. You're announcing the hijack. You're getting it to you and back out. You're worth a thousand words. So, first, target ASN, he's routing 10, 10 to 20 because he wants to call his ma. And so, he announces that to AS 20 to 30. And that route propagates. It propagates. It propagates. Random user sees 10, 10 to 20 through this collection of crap. If you were to look at the forwarding databases on the routers, the actual forwarding entries that say where to put packets to a certain dest out, you'd see those blue lines indicating that the routers are out taken back towards 10 to 20. So, we know that we were forwarding out from the attacker ASN towards 10 and 20. So, we're gonna plan to use this reply path, okay, when we build our hijacked route. So, when we do this, what we're gonna name is the three autonomous system numbers. We're gonna name AS 10, AS 20, and 200. Now, why we would want to have AS 200 not take our hijacked route as well is a bit more subtle. We'll get to that in a moment. But we minimally need AS 10 and AS 20 not to forward to us once we start hijacking that route or else we can't get the traffic back to the users. We can't make it transparent. So, let's set up our actual hijacked route. In Cisco LAN, this is what you'd look like. A route map that actually matches our announcement are 24. Again, we're taking a longer prefix win here, so we'll get all the traffic. We're then saying in the route map, which is probably too small a font to read, sorry, this will be up online. We're saying prepend 10, 20, and 200. So, as our route goes out to AS 40, AS 60, and AS 10 and then propagates outwards, the actual forwarding path that emerges is reversed. So, as you see, we suck in all the data from 40, 60, 30, and 50 ASs and then transparently pass it back to AS 10 and 20. AS 10 and 20 keep forwarding as they always did, but we can't hijack them. So, that's a caveat, clearly. Anybody in the reply path obeys the normal, natural forwarding towards that 22. The people who actually see our 24 are the ones who don't cause the AS path loop detection to form in the router. And that's it. That's the piece. What's that? Of course it works. So, this lets us take in that 24 everywhere. Basically, this map can't show all the ASs. There's like 25,000 of them active. So, you only have two or three between you and the target typically on the well-connected internet of today. So, that's a small number of people not to catch in your net compared to the rest of the internet. So, once you have that route jacked and the forwarding is kind of ready to go, you put a static route again back in towards that neighbor AS 10. 4, 3, 2, 1 in this case is the far side of a slash 31. And that's it. Those two configs do it. So, it's nice. But, it creates some interesting stuff. If you trace route, you see this big, hairy list of paths into this weird network somewhere distant from where you were intending to go and then back out. And it just makes the path look crazy. And that would be pretty obvious. So, it's time to do some PTL jack moves. So, we want to do this because we can learn to hide our devices handling the traffic. And a lot of you who know IP tables or TC or whatever on Linux know you can mangle TTL just fine at any stage of the game. Pre-routing, post-routing, whatever. The idea here was to add TTL. So, what's this do for us? It hides all of our inbound paths, essentially, and outbound. So now, you don't even know we're in line. We've attracted your entire traffic set for whatever we announced and you just don't see it. You might see higher latency that are further away from you than you normally would be. But, you don't see our hops. You can't call anybody about it. That's the point. So, without jack moves, you probably can't even read that. But, that's 23 hops from Madison to New York, then out limelight back to switchcom group, which is the ISP for the wireless to the building. 23 hops. So, with TTL jackery, we turn to 13. 10 of them go away. That's kind of cool. So, right there, the traffic disappears after SAVIS and then just shows up in switchcom group. How's that work? It's 50 milliseconds further away. It must be MPLS, they'll say. Those hidden hops, they don't decrement, right? No PHP or anything reverse, right? And that's it. Now, compare the unjacked path to the jacked path. I'm going to read this off because it's probably too small to see there either. The providers you see from Madison, Wisconsin perspective towards DEF CON, towards this place is through AT&T to limelight to switchcom. With the jack in place, it's AT&T to SAVIS to switchcom. No different, no weird. SAVIS is a normal ISP. Switchcom, you know, switchcom buys from those guys. So, it's not unexpected that they couldn't go through SAVIS. And why it looks that way for a certain 24 out of a 22? As a user, you just don't care. You're not going to investigate that, most likely. And very few engineers even would. I know several of them. So, now it's time for Donald Zitt with PILO. So, we had this presentation the traffic is hijacked and the traffic redirected to our Linux box in New York. And let's see how much data did we get collected. Does this mic work? This mic work? Oh, yeah. Okay. All right. So, he is showing LS with all of these wonderful things. And the file at the bottom named DEF CON dot dump. Can you guys see that back there? Okay. This is about the eight gigabytes. see that? The text, right? Can you read it? Is it all good? Not too small? Okay. Yeah. So, it's like seven gigs? Do a dash. Yeah. It's like H. LS test. Yeah. I know how to use this. This is Unix. I have it in high school. I know this. Who knows the Iris GL file? Whatever. You got it. Shut the fuck up. Okay. So, for example, right now, the packets are going out through the ETH1 on this bug. So, let me back up, Alex. So, what happens is the routes are announced from a router. They get to that router. It's static over to a PC, right? Yep. And the PC is just doing TCP dump into writing the packets into the file. And then it comes back out the PC on another hijacked return path. So, go for it. Right. So, this is your traffic, you know. This is all your packets, you know. Let's look at port 53. Yep. So, this is the, whatever, the... Let's suppress the IP addresses for the heck of it. I mean, those aren't interesting. We know where they're going. Well, I have no idea how to do that. Let's just look through the file, you know. Let's do some graphing around and see what we can find. So, we found some MIME attachments coming in earlier on POP with no encryption. That was cool. Expected, though. Well, there are some... The sessions that you see here is only one-way traffic, but it is fairly trivial to see, to make it intercept packets and convert this one-way conversation into two-way conversation. We just didn't want to deal with the law enforcement looking at us and looking at the passwords that we would have captured. So, in our case, we are not capturing the passwords, but we are capturing... If you checked your e-mail over wireless and it was not encrypted, we see it. In New York? Yeah. That's important. What? Yes, we could. Sure. This is actually going through the 7-gig file on disk, so it's a little with hijacking of port 53, essentially, if you have looked at Google and if we bother to settle DNS spoof... You can see some actual text. Who knows regexps? You want to tell us some? Yeah. So, we could have... Since we control this traffic, the traffic comes through us, whatever the responses for Google, whatever, we could have returned any IP address that we really wanted. So, forget the race conditions. Yes. If you trust DNS, and you probably do, the responses you get to an A or a C name are going to be whatever we want. So, that could work. So, there's a lot of work involved in EtherCap and things that do easy man-in-the-middling work. We couldn't get the dependencies met for some of that shit and gave up on a development box. So, don't sue us. But, this is the proof of concept. So, don't tell us IPs you want to have hijacked. Don't tell us what you want us to work on. We can't. You can figure it out. Probably take care of it yourself. Thanks.