All right, so it may be the last day, but we still have first-time speakers, and we have a first-time speaker here. In case you weren't aware, first-time speakers must hydrate before they speak, so he is elected for hydration, and we're going to give it to him. Here's to you guys. Okay, I think you're ready. If you sat through that autonomous talk yesterday, you should probably get a shot, that's for sure. We're ready. Awesome. We up? Okay. Hey, thanks for coming. Today, we're going to be talking about the Internet and Internet. Internet security. Over the next 45 minutes, we're going to go over a little bit of fluff, who I am, why I'm here. We're going to go over some remedial networking, because there may be some network pros out here. I'm sure there's at least one person who's around at the birth of the Internet and has a staff made from transatlantic cable, and will be casting spells on me if I say anything wrong. But first, there's... There's a pretty wide range of people here. We've got reporters, we have security experts, we have people who specialize in networking, some people who never deal with networking at all. So we're going to go over just some of the basic concepts, and then we're going to transition to the basics of how the Internet works itself. And for those of us who don't have a home Cisco lab, and aren't set up to build a home network and try some of the attacks we're going to go over today, we're going to go over some tools you can use to build... ...to build your own Internet at home. And then we're going to go over some tools we can use to break it. We're going to go over some of the ways the Internet is already broken. We're going to do some demos of some of the attacks that are out in the wild right now. And then we're going to explore some ways that we can damage the Internet a little bit more. Now, who am I? I'm Lane Broadbent. I'm a security engineer with Vivid.com. Vivid Inc. Vivid is a home security, home automation company. Also does cloud storage and is a wireless Internet service provider. Some of you may know us. Some of you may have had our sales guys come to your door. The demos and tools that I'll be using today you can get on GitHub. I'll be posting them after the talk as soon as I can get reliable Internet access. I'm not exactly sure when that will be, but I'll try and get them up today, definitely. Now, what spawned this? Here's an announcement from U.S. CERT. Mentioning... Well, talking about how nation states are targeting Internet infrastructure devices and Internet routers. Now, mostly when we talk about routers being attacked, people are... What we're talking about is home routers with poorly configured credentials and back doors. From firmwares that haven't been updated in a long time. But there's also the routers that make up the core infrastructure of the Internet that have to be considered. And those are what we're going to talk about today. Now, a little bit of remedial networking. Here we have an IP address. In signer block notation. An IP address is a 32-bit number. I'm sorry, this slide actually didn't come out too great. But IP addresses are generally broken up into four blocks of eight called octets. And this is octet notation. And after the slash is your subnet mask. So the first 24 bits of our IP address signify our network address. Or, as we'll be calling it from here on, our prefix. For addresses that have the same network address as you on, say, your homeland, as a simplification, generally you can access them directly. For those that have a different network address, you generally have to go through a device called a router. Routers are connected to multiple networks. And they'll take that packet, they'll look at where it's trying to go, and they'll compare it to the information they have about where they can get to. Now, routers will have different routes to different networks. And there may be multiple routes that'll match. So they'll go through the most specific route or the route with the longest match. So, quick example. That first one, 10 dot slash 8, doesn't match at all. So that's not a route that's going to be taken. That leaves us with two routes that do work. However, one is a slash 23 and the other is a slash 24. 24 bits is longer than 23 bits. So the router's going to choose that route and send the data that direction. Now, I keep saying router. I know a lot of you probably cut your teeth on these. Raise your hand if you have one of these laying in your closet somewhere. That's right. Now, these are generally called routers, but what they are really is it's a converged device. They're a wireless access point. They're DHCP server, firewall. They provide NAT, DNS server. They have an Ethernet switch, web server configuration. And they also act as a router, which is connecting those two networks and forwarding traffic between them. What we're going to be talking about today generally look more like this. This is a dedicated router. And what it does is it functions as a router. And also, if you need a nap, it's an excellent space heater. So quickly, what is the Internet? Yeah. One of our elected officials in an earlier net neutrality debate informed us that the Internet is a series of tools. And that's why we're talking about these tubes. So let's talk about some of those tubes. Here we have a, you know, a greenie hacker. He hasn't earned his black hoodie yet. He's trying to get to the DEF CON website. Here he has this tube. And that's kind of what it feels like usually. You type in an address, you hit enter, and all of a sudden the website shows up on your screen. What's really happening is closer to this. Where to get from one side to the other, you have to go through a series of interviews. These are called intermediate networks. And these are called autonomous systems. And these autonomous systems are what actually make up the Internet. There is no one provider that gets you from point A to point B. You have these different systems, such as your ISP, which then connects to another autonomous system that it forwards the traffic to, and so on until you get to your destination. So what is an autonomous system? It's a network of groups of networks under control of a single entity. I'll use an example here of Vivint Wireless. It's a company I work for. Identified by autonomous system number. It connects to and routes traffic between one or more other autonomous systems. So this autonomous system connects to Hurricane Electric and Level 3 communications. And they announce an internal IP address space, and address space learns through their peers that they can forward traffic to. This autonomous system advertises these two particular routes as well as others. Here's a graph I pulled off Hurricane Electric's website, which has some great BGP tools, if you want to learn about BGP. Here you can see we're connected to Level 3 and Hurricane Electric. And then those two autonomous systems connect to a large number of other autonomous systems. Now, Level 3 is what's called a Tier 1 network. Tier 1 networks are the big dogs. If you think about the Internet, they would be the core of the Internet. From a Tier 1 network, you have the Internet. You can get to any address that's publicly available on the Internet. They generally have thousands of miles of cables, spanning countries, if not continents. And they don't pay anybody for access to their networks. It's either they have a no-cost agreement with other Tier 1 networks, or they have other networks that pay them. Hurricane Electric happens to be a Tier 2 network because they pay somebody else. But then they have a large number of people who also buy their services and access to their network. Now, all these autonomous systems communicate over the border gateway protocol so that they can exchange routing information. So autonomous systems, they will agree to interconnect. There's a business agreement. You pay for access to a network, or you are paid, or you have a transit-free agreement. And then your autonomous systems, your BGP routers, will then announce their routes to their neighbors. So you connect to another autonomous system, and it says, I can reach this address space, and this is how I can reach it. That's the AS path and the prefix. And then when a packet comes in that needs to get to a destination, the most specific prefix, most specific route, the route with the longest match is chosen, and the data is forwarded through that next autonomous system. After that, the shortest path, and there's other attributes, and local admins can set policies. They prefer certain networks as well. Now, I said BGP, they'll announce a space. So here we have three different autonomous systems, each one with its own prefix that it's going to be announcing. So we're going to look at Autonomous System 3 and follow its announcement over to Autonomous System 1. Autonomous System 3 says, hey, I can route to 13 slash 8. It tells that to Autonomous System 2. Autonomous System 2 then records that, says, hey, I can get to this prefix through Autonomous System 3. It then announces that to its neighbor, Autonomous System 1, and Autonomous System 1 now knows that it can get to 13 slash 8 through Autonomous System 2 and Autonomous System 3, which is the final, which is where the address space is serviced. And then that continues, and eventually every autonomous system on the internet knows how to get to 13 slash 8. Really quick primer on BGP announcements. Something to know about border gateways. The border gateway protocol and autonomous systems. There's no central authority that actively monitors, manages, enforces who can announce a prefix. When you're assigned a prefix through IANA and its regional registrars, the same as you receive an address block. Now there's no definite link between an autonomous system and an address block. You can also have an autonomous system without an address block. And you can have a block of, addresses without having an autonomous system. There's nothing that says that one person can announce a certain space. And then, when you come with an agreement to peer your autonomous systems, it's really, who manages that is between those two autonomous systems, they'll agree, hey, you can pass this information to me, and I will then pass that routing information on to the neighbors. There's no central authority. There's no central authority that says this person can announce this route. And there's some pretty good reasons for that as well. An autonomous system can connect and disconnect to its neighbors at will. You can always take down your link. And when you do that, your route will disappear, and your traffic will take a different route. You can take your IP addresses, you can move into a different autonomous system. If you have a provider that's announcing your address space for you, and you want to upgrade, or say you're under an attack, and you want to move to a different provider, then you do that. You say, announce a space for me, and they start announcing the space. They don't have to check with anyone to make sure they can do that first. And you can also announce from multiple locations. Anycast, what it does is you'll have multiple geographic locations that'll announce a certain space, and your traffic goes to the closest one. Google's DNS and other DNS servers do that, for example. And something to note, since the routing decision is made at every, every autonomous system along the way, there's no definite path that your traffic's going to take. You can take one path to the destination, and then the return traffic can always take a different route. So, let's talk about some tools that we can use to build our own internet, see how this all works, and then destroy it. First up is Mininet. Mininet is a network emulator that you can use to stand up a realistic network on your host. It doesn't require the... You don't have to set aside a host like you would with a hypervisor. Well, depending on your hypervisor. It's a simple tool that you can use to create a network namespace and stand up hosts, routers, firewalls. If you want to learn about software-defined networking, it uses OpenFlow switches, and you can set up controllers. Important for this discussion is that it is cheaper than going out and buying a bunch of Cisco equipment and setting up a home lab. And it's a lot more flexible. And you don't need the Cisco knowledge just to do it. And it's incredibly fast. So, I say it's fast. So, let's do a little demo, see how fast we can set this up. Let's create this network here. Nine hosts, four switches. Let's get over here. Oh, yeah, we already got it primed. All right. So, really quick, we're going to set up... Oh. Okay, not so quick. All right. I guess we'll do it in Windows Media Player then. Okay. So, we ran the command. It set up the network. It created all of our hosts. It created links between the switches. Oh, it's getting ahead of me now. We just did a ping test between all of them. They can all communicate with each other. We can run commands on the hosts. So, we're going to tell one host to ping another host. That works. And just to show we can still run commands, let's get the IP address. All right. So, now we've set up a network. We communicated with the hosts. And that was all 21 seconds to set up that network. And how do I get back into presentation on this? No, that wasn't it. Somebody shout out. How do I get this... You say you? View. There we go. Full screen. See, that's why... It's a good group to have a technical problem with. All right. So, another tool we're going to use is NFQ and LiveNet Filter Queue. NFQ is an IP table target that basically... instead of accepting, dropping, or rejecting a packet, it allows you to throw it into a queue. That queue is then accessible from user space. You can have a program in user space examine that packet, make the routing decision, and pass it back down to the kernel. You can also modify that packet before it's accepted. Really quick to set it up, here's the command, IP tables. We're going to add NFQ, and we're going to send traffic to destination port 23 to NFQ. And from there, it's accessible from user space. Now, what do we use to deal with those packets? We're going to use Skapy. For those of you who aren't familiar, Skapy is a Python module that allows for packet manipulation, decoding. We can craft raw packets, and we can interact with net filter queues. Now, we can craft packets, and what we have here is a quick one-liner to generate a DNS request. We can generate a DNS request without going through the different layers. We set the destination. We're saying UDP. We're going to make it a DNS packet, put a name in it, and then we send it. And that's it, one line. Okay, so let's get back to the Internet. Now, how can we exploit the Internet? There's two main things we're going to talk about today, IP spoofing and prefix hijacking. IP spoofing is changing the source address on your packets as you're sending them. While you might want to do this, you want to hide your identity, impersonate somebody else to incriminate them or just annoy them. Or you could be doing it for legitimate reasons like load balancing or testing. Again, here's another one-liner for Skapy, where we're going to forge the IP address of a packet and send it out. So why does this work? The routers aren't necessarily examining the source of a packet. What they're being concerned is the destination. And... They're not always configured to care where the packet came from. So it's hard to say that a certain autonomous system shouldn't carry the packet. Because the routes aren't set and those IP addresses are portable. And it's easier to trust somebody than to distrust them. You have a relationship with somebody, you trust them to be doing what they're supposed to and not making your life more difficult. So you say, okay, they must be sending me legitimate traffic. There's also the issue that some people don't care or they haven't configured. They don't know how to configure their systems correctly. An example of this is Bogon Routes, where an autonomous system will advertise private address spaces, like 10 dots, 192, 168s, various address spaces that shouldn't be used on the public internet. If you want to see who's doing that, Hurricane Electric has a page that will give you a report of different people who are sending out Bogon Routes. It's actually kind of interesting. Okay. So using IP spoofing, what can we do? Uh... We're going to talk about state exhaustion attacks, specifically SYN floods, and we're going to do that really quickly because it's kind of solved, but we're going to come back to that later. And volumetric attacks, specifically reflection attacks. Really quick, SYN floods, older attack, TCP. It's a form of connection. You have to go through a three-way handshake where you send a SYN packet to a server. The server responds with a SYN ACK, and then you acknowledge their SYN ACK. You synchronize and you now have a session with them. Initially, when doing that, the server would set aside a certain amount of memory to track that session waiting for the SYN ACK packet because, of course, the person's going to respond correctly to it and everyone's going to be happy and they're going to communicate. You send a lot of SYN packets, it consumes a lot of resources, the server's no longer able to take new connections. Mostly solved with things like SYN cookies, but we're going to show how we can do something similar to that again. Uh... Now volumetric attacks, specifically reflection attacks. Oh. We're going to have a demo where we go through one of the more dangerous ones that are on the internet today. Really quick, though, IP spoofing. Let's say we want to talk to a DNS server. Host A says, Host B, what's the address for ILovePuppies? With the source address of host A. It responds back, looking at the source address, and says, Host A, ILovePuppies is at whatever address. Alright, so let's say we want to spoof. Uh... Host B, give me everything you know about ILovePuppies. Sincerely, host C. We're going to throw host C's address on as the source address. Uh... It then responds to host C with all the information. Host C says, huh? I didn't ask for that. So now we can scale that up. Uh... We can have our botnet, all of our zombies that are then sending spoofed requests to a large number of DNS servers or other UDP services. These are going to act as reflectors. Uh... And they're all going to have a source address of whoever we want to target. So, our botnet's going to send a lot of traffic to our reflectors. Our reflectors are going to send an even larger amount of traffic back to our target. Our target's not going to be able to handle it. And that's the premise behind a distributed reflection denial-of-service attack. So, one way of classifying these is a bandwidth amplification factor. Uh... US cert uses that. Uh... Basically what it is, is you're looking at the size of the payload in the responses and comparing that to the payload in the request. Now, certain UDP services have different bandwidth amplification factors. Bit torrent, 3.8. So, for every byte you send, it's going to respond to 3.8 times as much to whoever your target is. SNMP v2, 6.3. DNS, 28 to 54. NTP, 550 about. And then the latest hotness is memcache. So, what memcache is, is an in-memory data store that basically allows you to put information in quickly and then quickly retrieve it. It's often used with web servers to manage web session state. 10,000 foot overview there. So, let's set up this attack. Let's set up a network in Mininet, use the tools that we have, and perform it. So, we're going to simplify it a little bit. We know the internet is just a series of routers that make routing decisions. So, we can replace that with one router. We'll call that the internet. And then we have our attacker, our reflector, and our target. So, let's see how this works. Okay. So, really quick. Set up our lab. We created our three hosts, our router, and set up links between them. In the background, we've got a packet capture running. Really quick, so it shows on the packet capture, we're just going to send a ping from our attacker to our reflector. Okay. And another one, yada, yada. All right. So, let's start up our memcache service on our reflector. We're going to tell it we want to listen on all ports and all address interfaces and that we want it to use UDP. All right. And let's quickly send our one spoof packet. Now, there's a little bit of magic sauce behind this to get a higher amplification factor, but we don't change any of the settings in it. And then we've sent our one packet using our target's IP address. Oh, well. So, let's see what happened. Like I said, we had a packet capture running in the background. All right. So, here is the spoof packet that we sent highlighted there. It's got about 15 bytes worth of payload, one single packet. And also for comparison, you've got our pings so we can see that we did actually spoof the address. Here's the response. So, the bottom one there is packet 761. That's part of the response. And these are full UDP packets. So, what do we have? We sent one packet with 15 bytes worth of payload. And our response was 753 packets with 1 million, 51,705 payload bytes. So, that gives us a bandwidth amplification factor of about 70,000. And for those of you who have been spending too much time in the wireless village, here it is in decibels. All right. So, according to USR, memcached, 10,000 to 50,000 bandwidth amplification factor. We just showed it can be 70,000. It seems to be some area of debate with how effective this is. But as you can see, no matter what, it's a very effective attack. Earlier this year, this attack was used to generate 1.7 terabit per second of traffic towards the service. When you're dealing with that, you're not actually taking down the services running on the host. You're not necessarily taking down the host either. What you're doing is you're taking down all the infrastructure around it. When you start getting 1.7 terabits worth of traffic, your upstream providers are going to start shutting off your ports, because it's taking them down as well. I provide some sample code, but the code I provide is simplified. It doesn't have the magic sauce. It just uses the stats call, so it doesn't produce 70k bandwidth amplification factor. So, really quick, what are some defenses? Know your attack surface. Know what services you're running. If you're running UDP services, why are you running them? If you don't need them, shut them off. Blot them. Form a good relationship with the upstream provider in case you're the reflector or the target. Make sure that you can work with them to filter your traffic and monitor your infrastructure so you know if you're participating. So, let's go on to BGP prefix hijacks. So, what happens in these is, as I showed earlier, autonomous systems learn how to route traffic by announcing their routes to their neighbors. What happens in a prefix hijack is that a malicious autonomous system advertises a more specific route than the route that's already out there. If there's a route for a slash 23 and announces a slash 24, all the traffic for addresses within that slash 24 will go to them because they have the most specific route. The neighbors then pass on this route to their neighbors and eventually, everyone has that route and all the traffic is heading towards that route. An early example of this, in 1997, the AS7007 incident. A network disaggregated all their routes into slash 24s through their own autonomous system number on it and then advertised that on the internet. So, now that it's 2018, we can do a high-tech computer simulation of what happened to the internet traffic on that day. So, here, that little pink dot is the AS7007. I think it was in Virginia. They announced their routes and all the internet traffic started going to them. So, now, we can do a high-tech computer simulation They also, apparently, turned into the Death Star. So, what happened was, large portions of the internet ended up black-holed for several hours. Also, their upstream providers shut them off and ended up having to reset large portions of their network. Most routes aren't slash 24s and the equipment in that time wasn't made to handle the entire internet as slash 24s. So, the routers would crash, come back up, relearn all the bad routes from their neighbors, crash, and the cycle would repeat. It really couldn't have been better if it had been planned. So, there's certain defenses you can have. Here's just a list of them. Probably the most prominent is the routing registry where you register your routes. Say, this autonomous system is going to be advertised through this and this IP prefix is going to be advertised through this autonomous system. And there's other ways to ensure that communication is secure, authorized, and secure. So, let's see how well that's worked. Here we have, in April 2018, the MyEtherWallet.com attack. I don't know if any of you... I'm sure nobody here uses cryptocurrency, right? Yeah. During the hijack, it wasn't actually a hijack against the servers themselves. It was a hijack against the DNS infrastructure that MyEtherWallet was using, specifically AWS. And malicious... Poisoned the servers and DNS requests were returned pointing to a Russian provider. Now, there were defenses in place. Not all the... Not all networks carried the bad routes, but enough did. Really, all you need is one person who's not configured correctly to pass along the information, and all the defenses break down due to these trust relationships. So, really quick, how are things supposed to work? On the left side there, we have a client trying to get to MyEtherWallet.com. On the right, Amazon, who Route 53 is providing the DNS service announces its route to the internet. So, starts to propagate its route. The client asks its DNS server how to get to MyEtherWallet.com. It doesn't know, has a miss, so it hits Amazon. It says, hey, how do I get to this? Response is returned. It caches, passes it to the client. Client then connects to MyEtherWallet.com and logs in. Okay, that's how it's supposed to work. What really happened was that another autonomous system, likely on behalf of one of its customers, began advertising a slash 24 for Amazon's DNS server space where Amazon was using slash 23s. So, advertising more specific routes. When those propagated up, all requests to Amazon's DNS servers then went to this malicious DNS server. The response was returned to the credential, for a credential harvester. Clients connect to the credential harvester. For some reason, the attackers decided not to get a validation about SSL certificate. So, they were, people were greeted with an SSL warning. And some of them decided not to heed the warning and ended up losing money. So, let's give it a try. Credit where credit's due. This is a modification of a lab. From, yeah. Oh, that's, that's a quick tip. Defcon 16, there's an awesome attack against the actual IP address for the Defcon web servers, I believe. Trying to remember exactly what it was. Go check it out. It's good. I'm not gonna demo it here because that's their thing. It was awesome. So, here we're gonna do a prefix hijack. Base and we're gonna modify a demo that's already out there on the Mininet website if you can get to it. But we've changed it to be a prefix hijack instead of a path hijack. So, here's our three networks we looked at before. 1, 2, and 3, advertising 11.8, 12.8, 13.8. We have a web server on AS3. What am I doing on time? Okay, good, not bad. Not great. Okay, so really quick. Here's our environment. Top left, we're going to start up our network. Bottom left, we're going to be controlling whether or not our autonomous systems are running. And on the right, we're going to be trying to hit our web server to see what happens. So really quick, let's pull the routing table. Okay, so looking at that routing table, sorry, this is broken up. Here's the routing table that we have from Autonomous System 1. It can see that through Autonomous System 2 and Autonomous System 3, it can get to 13.8. All right. All right, so I'm back in our attack. We're now hitting a site on that web server. Over here on the bottom left, we're going to start up our Autonomous System 4, which is going to advertise a slash 9 compared to a slash 8. For this. This is the 13 slash 8 web space, or IP space. And on the right, in a second, you'll see it switching over to the attacker web server. Okay. So pulling our routing table again. We can see that we now have another route. You probably can't see very well, so let's pull it up. We started Autonomous System 4, and it announced a more specific route. We're out for slash 13, which caused all of our traffic to divert to our malicious web server. Now, it's not the most exciting attack, and the reason for that is that everything worked the way it's supposed to. Somebody advertised a better way to get to an IP prefix, so everyone took it. So without defenses, this is the correct operation. So defenses would be register your routes in an IRR, establish that relationship with the upstream provider, so that they know what you're advertising, and they're able to defend against people trying to take over your space. Filter prefixes that you receive from others. To avoid having your website taken over, use DNSSEC, HTTPS with HSTS, and make sure you're monitoring your infrastructure. All right. So let's move on to a little bit more theoretical. So at the beginning, it showed that alert. It says nation states are trying to take over routers, basically. So why should nation states get to have all the fun? Let's do some of these attacks ourselves. We don't know exactly what attacks are going to be done, but we can make some guesses. And one of the ways we can make some guesses is because we already know what things are going to be done, because we can see them now in certain pieces of infrastructure really quick. We know that if you have control of a router, as with any, you know, just think of it as your network monitoring equipment, you can monitor traffic, you can redirect traffic, which we saw, you can modify traffic as it's passing through, you can block traffic, and you can flip the switch and just take down a chunk of the infrastructure. Now, we don't really need to imagine much because we already see this in action. There's malicious networking equipment widely deployed. Now, malicious is relative to who's performing the operation. So the intrusion detection system and intrusion prevention systems, other firewalls, internet service providers doing that, doing service prioritization or denying access to certain services, and then you have nation-level monitoring and filtering enforcement, such as, you know, a country putting up a large firewall to restrict internet access. So we can already see what can be done with this because it's already being done. Corporations are already doing it. My cell phone provider is blocking my VPN access for some reason. You know, we already see this in action. But what else can we do? So we know that when you have... We know that you can prevent IP spoofing by registering a route and making sure that people aren't passing bad routes. But we can also defeat that if we have control of one of the routers. So if you have a router on, say, an internet service provider's network, it has the ability to talk for addresses on that network, and no one's going to question it because it's supposed to be the one carrying that traffic. So we're doing that. We can defeat prefix filtering. We can spoof any host we want on that network. It doesn't need to exist. It doesn't particularly otherwise. But even in this case, we can now have a bidirectional communication. We can send traffic for a host and then receive the response. And we can reduce our botnets from thousands of devices to just a handful of routers. And I say we can have bidirectional communication. Before, you can't really spoof TCP traffic. Because you have that handshake, and you have to be able to go through the synchronization. But since we're receiving the responses, we can now open up TCP sessions other than bidirectional communication that we wouldn't have been able to do otherwise. And this is kind of concerning because it breaks our attribution models. A lot of you might get daily, weekly, or whatever threat feeds with part of what they have is a list of IP addresses associated with certain activities. You throw them into your intrusion detection systems. You block them on your firewalls, and that's good. But now, we can change our IP address at will because we can access any of these other devices. We can no longer really trust the IP addresses that we have in our threat feeds. Now, this is on a symmetric route saying it receives a response. Now, what can we do if we still want to spoof traffic from a different network and we're not receiving the response? Like I said before, you really can't spoof a TCP connection because you have to synchronize with the server, and it's going to be using a randomized sequence number. However, if we control one of the routers along the path to that spoofed host, we can still send our traffic from a different portion of the Internet, and have a... full bi-directional... be able to maintain bi-directional communication and go through our TCP handshake. So we're going to do a quick little attack here. We're going to spoof a SYN packet. We're going to capture the response on the second router, the router on the right there. And then we're going to have that router send the information to our attacker computer, specifically the sequence number that it needs to... sequence number that it needs to... complete the handshake. And then we're going to complete the handshake. So I simplified a little bit for the demo. We're replacing the routers with switches and running our interceptor on the spoofed host, but same effect. So... No, that's wrong. All right. So really quick, we're going to see what our IP address is, and we're going to request a page from a web server that's going to respond with our IP address. That matches up, 10.0.10.90. And then we're going to make it so we can no longer communicate directly with that host, just for the purpose of the demonstration. So now we can no longer communicate with the web server, just so you guys believe me. And we're going to spoof a TCP connection. So here, we're going to send a SYN packet. That's going to be intercepted and sent back to us. And then we're going to complete the handshake and request traffic. Son of a gun. That went too fast. All right. All right. So here we're making our HTTP request. And here's the response that we received back. We're able to complete our TCP handshake using spoof traffic, and then make a request and receive that response as it's being sent to the address that we're spoofing. Now, to do this, we need a communication channel. I had it out of full screen mode for a while, haven't I? Somebody tell me these things. All right. So we need a control channel to be able to do this. We need to be able to communicate between our interceptor and the host that's doing the spoofing. Now, how can we do this? One way is network steganography. Steganography is hiding data and its presence from an observer. There's numerous ways of doing this with network traffic, but some of them are pretty slow. You'll flip a flag in a header, which gives you about one bit per packet. Not the quickest thing ever. But if we want to trade a degree of stealth for increased data rate, what we can do is we can inject traffic into other packets as they're passing through a node, and then strip that data out before it's passed on to its final destination. And to do this, HTTPS, another encrypted traffic, using that as our cover medium is ideal. Really quick, here's a TCP packet. The payload can be... Assuming... Yeah. Payload usually can be up to 1,460 bytes. But a lot of traffic either has a full payload or has no payload as an ACK packet. There's a bimodal distribution on the Internet, and basically you'll have a lot of traffic that's being received and a lot of ACK packets for that received traffic. So these ACK packets have a lot of free space that we can use. There's nothing that says that you can't send data with an ACK packet. In fact, it's normal. So... Oh, yeah. I got a clap for that. Okay. Oh. Oh, yes, yes. I... I made a meme. All right. So... Running low. How are we doing on time? Okay. I can't see anyone anyway, so... All right. So what I'm proposing is we use excess space that's not being consumed, and we inject our own traffic into it. Now, we need to... We need to make sure that it can't be read as... Well... Yeah. We want to make sure that it can't be read, so we're going to encrypt everything. At the end, we're going to put a counter that... We're going to encrypt a counter that says how much data we're going to put in it so that we can quickly then pull that data out, check for the flags at the beginning and the end of the data that we're sending, and know if it's actually our traffic or if it's a mistake. So three steps before we get to our data that allows us to quickly toss out traffic that looks like our data but is not. If that makes sense. Sorry, I'm rushing to make sure I get this closed. Why are we going to use HTTPS? Most of the internet is HTTPS. It's expensive to monitor HTTPS traffic, and there's little value in recording it. You can gather metadata about it, but there's... If you record HTTPS traffic on a large scale, what you have is a bunch of data that you can't read that's going to fill up your drives. And when properly implemented, encrypted data is pretty much statistically indistinguishable from random data. So we can take this already encrypted data, throw our encrypted data on the end, and there shouldn't be any way of determining that we've added data. This was the demo that I was going to do. As you might be able to guess, it ended up being kind of busy. So we're going to simplify it, and we're going to do a demo just between two hosts that have had their traffic blocked, basically. On this, let's say Autonomous System 1 and Autonomous System 4, just to show that it works. So we're going to bypass some blocking through our covert channel. Don't let me forget to go back in full screen mode. It's on you guys. So here we're just testing that we can reach the web server on 10.0.10.90. And then we're going to set up a listener using our tunnel on local host 87.65. Now we've just blocked access to it on port 80, so we can no longer directly access that web server on port 80. So now... And that still doesn't work. So now we're going to start our covert channel. What we're going to do is we're going to start... On the other end, we've already started our listener, and then we're going to quickly run the script, starts the listener on this end that creates the channel, and then gives us a bunch of cover traffic, and I'm just using watch and choral command to generate a bunch of HTTPS traffic. There we go. Okay, so we've started it, and let's see. So now we have a channel that we can use... Here's our HTTPS request we got to the server that we couldn't access before. What we did is we hit a local listener on our box, sent that over the tunnel using... HTTPS traffic as our cover medium, and then had the other side complete the connection to the web server and return that traffic back to us. So a means of creating a covert channel there. And what does that look like at the packet level? And going back into full screen... Yes. So here's the original packet, and then here's the packet with our data added onto it. And at the end, I looked at it, and I said, we left the counter unencrypted so we could look at that. So what you have is traffic that looks like the traffic that we already have there, generally indistinguishable from what should be there. Now, if you're going to monitor sessions and keep track of acknowledgements, you might be able to detect this is going on, but if this isn't on a connection that you would expect to be malicious or you want to monitor, chances are you're not going to be doing full session monitoring, and this is going to slide by along with the other terabytes of HTTPS traffic. Okay. Thanks for listening. Appreciate you coming.