I'm going to announce Chris McCoy. He's a good friend of mine. He's been at Cisco for 12 years. He's in this super spooky group called ASIC, like he mentioned. Nobody knows much about that village. I mean, much about that portion of Cisco. He's going to explain quite a bit about what they do. And then also open up some other information that I think you'll enjoy. He's a... well, you can see. He's a principal engineer for Cisco. He actually is going to be next door. He's been helping with setting up and running the village with us. So give a warm welcome to Chris McCoy. Thank you. Thank you, Joseph. Thank you. Thank you, Joseph. So yeah, my name is Chris McCoy. I am with ASIC, the Advanced Security Initiatives Group in Cisco. And we're primarily based out of Knoxville. We have people in Austin. We have people in RTP and all over, really all over the world. And what we do is we are the primary white hat hacker organization for Cisco. So let me go ahead and get into this. I'm actually going to show you a real security evaluation that we did on application-centric infrastructure and the results that we had. And anyway, let's just get into it. Hopefully you can see this. So these are the greats that fly. Nicholas, thank you so much. Everett, thank you so much. Amit, you know who you are. Omar and the rest of the ASIC crew, Terry, I couldn't have done this without you, so thank you. And audience, please save your questions until the end. I have a lot to get through, and I have a lot I want to show you. So just wait until the end, and then I'll answer any questions you have within reason. Okay? All right, so disclaimer. I am speaking for myself and not Cisco. I am not officially here on behalf of Cisco. I am in a Cisco group. This information is three years old. So these vulnerabilities that I am sharing with you have been around a long time. Just to give you an idea about when we got started. We got started on ACI just right after Cisco acquired NCME, which is the business unit that this came from. And so this is... a lot of this stuff has already been disclosed. It's already been released to customers a long time ago. And if this stuff still affects your network customers, it's because you aren't patching. Please patch. Okay. And this is not a rebuttal to the Black Hat 2019 talk. There was a talk called Apex Adventure in ACI Wonderland by Oliver and Frank Block. The findings might be interesting to those that have seen that. But if you haven't seen that before, it looks like I need to stay away from that speaker. But the findings may be interesting if you've seen that talk. But if you haven't seen that talk, then I'll actually go through this whole thing. Security and Trust Organization is who I'm part of with the Advanced Security Initiatives Group. And so we're security-focused. We try to find security vulnerabilities as early as possible in the product lifecycle. So we have... usually we work in about three or four team members. And we just hammer on a product. It could be for a month. It could be for six months. It's basically like a red team that lasts a long, long time looking for vulnerabilities. And we discover those zero days and we get them patched out and get our customers protected. That's what we're here for. I also wanted to tell you that networks are not that boring. I've made an entire career out of hacking networks. It's amazing. There are so many things and so many opportunities for red teaming networks you have no idea. Apps and operating systems I actually find a little bit boring. I like the plumbing. Because the plumbing has a lot of opportunities for attack surfaces and all kinds of things. And I'm going to show you one. Okay, so I'm going to get into software-defined networking, SDN. SDN means a lot of things to a lot of people. It has a bunch of different definitions. This is really what it is, kind of boiling it down. So, boiling down software-defined networking, it is really about a central point of management. That's what you want. You want to optimize your network for physical, virtual machines and containers. You also want to do some kind of policy enforcement so that you have what are called micro-segmentation. Where only certain services can talk to other services. And I'll get into that a little bit more. But really what you need is you need programmability. You need to adapt the network to the endpoints, the agile forwarding path. And you need to have some kind of discovery. You need to know where things are located. In ACI, in Cisco ACI, this is made for a data center. It is designed to scale up to one million endpoints. And an endpoint can be a VM, it's an IP address, MAC address. It scales up to that large of a data center. It also has the property of multi-tenancy. So you have many different customers that are all connecting to the same data center network. And they all want to be able to control their own policies. So it's a multi-tenant environment. You also want to control how endpoints communicate. What TCP ports are available from one source to a destination. You also want to be able to insert middle boxes. You want to do things like load balancing, real firewalls, NAT. If you're doing carrier-grade NAT, maybe you need something like that. And so the answer to all of this is the application-centric infrastructure or ACI, Cisco's ACI. And so this is the way the fabric looks. The fabric is made up of switches that are in the rolls of leafs and spines. So this is what's called a cloth network, if you've ever heard of this, a bipartite graph. You have a spine, and the spines are really responsible for routing traffic from one leaf to the other. The leafs are fully meshed up to the spines, and the spines are fully meshed down to the leafs. And the idea is that you can load balance across the spines. And this is just one layer. You have very large networks, like at Facebook, where they have multiple layers of leaf and spines. They also have other layers down here, too, where you have maybe top-of-rack switches. But typically, this is what it looks like. And then attached to the leafs, you have the controllers. Those are called your APICs. That's your Advanced Policy Infrastructure Controller, is what an APIC stands for, APIC. And attached to your leafs, you've got your servers. You've also got something called VLEAFS. This is your hypervisors that actually are running the code, the ACI code, to be able to do the fine-grained policy that I was talking about earlier. You have virtual machines and containers that are running in there. You've got your firewalls. These are your services, your Layer 4 through 7 services that you're doing for load balancing. And then you have external networks of some kind. You have to connect this somewhere. You have to connect to routers and switches that go outside. You need to sometimes maybe connect to the Internet. You need to connect to your intranet. And you'll have an external network. And so the thing to keep in mind is, for the most part, you don't attach to the spines. That's not always true. But you attach to the leaf, and you'll have things like services for leafs that you attach to. Is everybody with me so far? This is an example of what these switches look like. They are rather high-powered. The ones on the top actually do power over Ethernet, so you can attach things like phones and cameras to them. The one on the bottom, that has multiple 25 gigabit Ethernet connections, and it has, I believe, it's either 100 gig... Yeah, I think it's 100 gig uplinks that it has. So this is pretty high-powered stuff. Many, many different connections, like I was talking about earlier, up to a million endpoints. Okay, ACI, they have... So I'm a CCIE. I've been doing networking for about 25 years. And I had to completely unlearn networking to really understand how this thing worked, because it was just boggling the heck out of my mind. I just couldn't understand it. But at first, really, I had to unlearn it and then relearn it to really understand what's going on. When you have VLANs, they aren't really VLANs per se. I mean, they're not bridge domains. They represent what are called endpoint groups, EPGs, endpoint groups. And endpoint groups are a grouping of endpoints, and they are allowed to freely communicate inside of the endpoint group. So all of your endpoints that are inside of your endpoint group, they can talk to each other without any kind of policy, any kind of constraints. You can go from one endpoint group to the other without any problems. So the idea with this is that, you know, we're running out of IPv4 addresses, right? I mean, and people have to make these very large networks, and you have to be able to constrain your network so that... or you need to be able to design your network so that you don't have to be constrained by IP addresses and VLANs and all those things. And that's what EPGs are all about. Contracts. Contracts are what allow you to talk from one EPG to another. These are basically saying you have a provider and consumer relationship that says, I am providing TCP 443, HTTPS. I'm providing this to anybody that wants it. And then if I have a contract that comes along and it consumes that endpoint group, then that endpoint group can use that TCP 443. And if you're not part of that contract, then you don't get access to that port. It's the way it's supposed to work. Okay, inside of the fabric, the fabric is completely Layer 3. Even when you're doing Layer 2 connectivity, when I say Layer 3 and Layer 2, when I say Layer 3, you're actually going through a router. When you're going through from one endpoint group to another endpoint group, you're always going to be routing. And the way they do this is they use an overlay. You've probably heard of things like VXLAN. If you haven't learned VXLAN, you don't understand VXLAN, you really should, because everything is going that way. And they're starting to even use VXLAN in the edge of your network in your access layer. Cisco has software to find access, and I'm sure there's probably a lot of other ways out there. But as it turns out, it makes it really easy to be able to do policies. Please save your questions until the end of the presentation. Thank you. Okay, your links are IP unnumbered. We're using ISIS internally. That's the routing protocol that they use. And one of the things about ISIS that makes it really interesting is that it runs on link, and it runs at Layer 2. And it doesn't actually give you an opportunity to be able to inject things across broadcast domains. So if you're on a switch, what this means, if you're on a switch, you're not able to actually get access to that link to be able to inject things into ISIS. So it's a little better. But it's always Layer 3 routed, and they advertise what are called VXLAN tunnel endpoint IP addresses. So whenever you have a frame to send, it goes into the leaf switch. The leaf switch encapsulates it in VXLAN and routes it across the fabric to the destination leaf switch. The destination leaf switch then takes that encapsulated Ethernet packet frame, strips off the VXLAN stuff, and sends it on its way to where it needs to go. And they use ISIS. It's been tuned for a densely connected fabric. So of course you have many connections that are going all over the place, and it's been tuned so that it works. And they use IK multicast. If you don't know where things are going, they use anycast. So one of the things I'll talk about a little bit later on is that the spines are not dumb. The spines are actually really smart. They're the ones that do all of the tracking of who's connected where. We talk about tenants, VRFs, and bridge domains. VRFs, and they call this a context inside of ACI, but it's basically when you get boiled down to it, you've got a VRF, which is a routing table. You have a bridge domain, and the bridge domain contains subnets, and those subnets can be anywhere on any leaf switch that's in your fabric. And you have multiple of these since you have multiple tenants. So endpoint discovery. So when a device talks to the fabric for the first time, it will maybe send DHCP, send ARP, send something. It doesn't know who it is and who it's talking to. So what happens is the leaf switches are constantly listening on these things to do discovery. So when a VM, for instance, sends a packet for the first time, the leaf switch will pick it up, and it does a source lookup to see whether or not it knows where that leaf or that source is. And once the endpoint is discovered, it sends through a proprietary protocol called COOP. That's the Council of Oracle's protocol, and that's how it does location learning. So just in this example here, I'm showing something different where we have a VM that's running in vSphere. It's running VMware. It talks to the vSwitch. The vSwitch then sends it on to the vXLAN endpoint. So this is supposed to be agnostic. Pretty much vXLAN has won out. There's another encapsulation technology out there called Geneva. But there used to be NVGRE, and I think Microsoft has also kind of moved away from that. But once the ingress learns the MAC address and IP address of the arriving frame, it sends that along with the ingress port vLAN and vXLAN to the switch, and then the leaf forwards that endpoint address to the spines using the 0MQ protocol. That's what they use. And then that information is spread out, or it's distributed to all of the spines. So all of the spines know at any one time who's connected where. Hopefully that makes sense. This will come important later. And then when you send the information, when you send the frame to the egress leaf, the egress leaf then is able to learn the source address, MAC address, and all that other information when it gets to where it's going, unless you tell it not to. There's a flag in the frame that says don't learn this. So what is this for? What are we going with this? So just showing you, this is the life of the packet. This is how the packet works. It's sent from the vSwitch to the vTEP. The leaf switch then, if you're using vXLAN, it actually swaps out the vXLAN information for its own internal and semi-vXLAN protocol. It goes across the fabric. If it doesn't know the destination, it sends it to a spine using an anycast IP address. And it's just basically a range of IP addresses that are allocated to all of the spines, and all the spines are listening on that IP address all the time. Then in hardware, they're able to do that lookup to find out where that actual destination is. And then it gets sent to the destination leaf switch. The leaf switch then strips off that information and replaces it. If they're using VLANs for your endpoint groups, it can use VLANs. If you're using NVGRE, which isn't as popular anymore, they may use that. But that's basically how it all works. So then we get into VRFs. I'm going to just zip through this a little bit. But this just shows how tenants, VRFs, and bridge domains, and endpoint groups all work together. How the frame source information is kept. It's actually relayed from one leaf switch to the other through vXLAN. And the APIC controls the allocation of VNID labels across the fabric. By labels, I mean things like your actual VNIDS, that's your vXLAN network ID, and your source groups, and all those other things. And it does policy enforcement either at the source or the destination. And whether or not the policy has already been enforced is signaled through a flag in the label. And this will become important later. Central Management and ACI, they use a REST API that's load-shared through the APICs for everything. In other words, you can put a load balancer in front of this thing and it would work just fine. It doesn't matter which APIC it shows up on. It uses what's called sharding, which sounds really dirty to me. But everything is sharded. In other words, they have different instances that run on different APICs. I'm going to get into the security a little later on, I promise you. But they use this API for everything. They use it for the REST, they use it for the GUI, they even use it for the CLI. So when you're on the command line interface and you're SSH'd in, they actually run a chroot jail when you're SSH'd into the box. And even when you're talking to, even when you're configuring things through the CLI, that even gets translated up to the REST API. So they really have only one way in or out of this system. Which is good, because it only gives you one thing to secure. And they also have a Python SDK called Cobra that they use to manage. So let's actually get into the interior of this thing. This is how it all fits together. These are your switches. These could be either leafs, these could be spines, and then you have your APICs. And your APICs somehow magically can connect to and talk to the leaf switches or the spines. And the APICs run these processes inside them. These are called data management engines, or DMEs. And the DMEs have their own internal proprietary protocol called intrafabric messaging. And the primary front door through this whole thing is through NGINX. So the DMEs are responsible for a little part of something called the Management Information Tree, or MIT. And all communication happens through NGINX. So if you're going from the outside in, you're going through NGINX. And they communicate to each other from the switch, from the APICs, all through IFM. And it happens in between the VTAP IP addresses, and how they secure that I'll get into in a little bit. This is just a gee whiz diagram of how this all works. What's important here is that they have the intrafabric messaging that comes in over TCPIP. So internally, this is all proprietary the way this all works. They have the doer. They have this model that tells what they need to do in this Management Information Tree. And they have a replicator to replicate it to other DMEs if you're doing sharding. And then they have a persistifier which stores to an SQLite database. And each of these has its own database. And they also structured it so that if for sensitive data, they encrypt that data. If it needs to be encrypted, it will be encrypted on the box. It's actually not a bad design. I'm pretty impressed with it otherwise. Communication of policy and ACI, they use DME to DME communication through IFM. And they use TLS using mutual authentication. So there is authentication not only of the client but also of the server. And the certificates that they use are loaded on the switches in the APICs at the factory. So the certificates that are used, they have a very long expiration date. And the way they work is they use that certificate to authenticate the client and authenticate the server. I think you guys can see where this is going. The abstract policy on the APIC that they use, the endpoint groups, they actually take that and they make it concrete and they enforce it in the leaf switches using the DMEs. So for device discovery and ACI, if you were to plug an APIC into anything, the only protocol that it speaks at first is LLDP. That's Link Layer Discovery Protocol. If you were to plug into a switch, the only protocol that they use is LLDP. That's all we saw. So I was like, oh great, what's the attack surface going to be? Obviously, the LLDP. That's one of the main things that we're going to be using. One of the things that I'm really kicking myself in the butt for is that the folks that I was telling you about earlier that did the Black Hat talk, they found a buffer overflow in LLDP that we missed. And I feel really bad about it and I wish we had found it earlier, but hey, it's patched. And if you're listening to this video, please patch your fabric. Custom TLV, they have their own little proprietary TLV that they use for discovering the fabric so the fabric can discover the APICs. And when the switches see these custom TLV packets, they will open the underlay to the device that's connected to it. And one of the things about LLDP which makes it interesting is it doesn't travel over switches. It only travels inside of a broadcast domain, actually a collision domain. It's only from one point to the other point. There are multiple MAC addresses, but one of the MAC addresses that they actually use here will only travel one hop. It won't go any further than that. And what that also means is that unless you really screwed up with your hypervisor configuration, you have to be bare metal attached to be able to tinker with this. You can't do it from a VM. Make sense? So here's the real deal. Here's what we did. I've given you all the background. You know about DMEs, you know about LLDP and all those wonderful things. How are we going to do this? How are we going to actually own a datacenter? Here's what we're doing. Sure, let's own the datacenter. So in this case, in this situation, you have a device that maybe got owned. It's a bare metal device. Let's say it's not a hypervisor. Or maybe it could even be a hypervisor where somebody escalated privileges and got access to the hypervisor. Or maybe they were in a container and they escalated privileges and got access to the hypervisor so that they can send directly to that leaf switch and be able to talk LLDP. So that's the situation here. And what we want to do is we want to attack the APIC, which is more than one hop away. And remember, this is a Layer 3 switch fabric and it has overlays. And normally we can't even talk to the APIC because the APIC does not process packets. The packets flow from leaf to spine to leaf. They don't go through the APIC. We don't even have a way of talking to the APIC or touching the APIC. So we need something to be able to get us access to that. It's the central point of management for the entire ACI fabric. Anything that an admin can do, they can do from there and it makes it for a very tempting target. It's a sync target. It's the controller in your entire network. If you have a million endpoints, they're all being controlled from the APIC. So central management, we looked at the GUI and the GUI actually looks pretty good. They use an off-the-shelf framework. I forget which one it is right now. They probably have already changed it anyway because this is from... When we did this eval, it was on 1.1 or 1.2 was the version and I think they're up to 4 something now. So they've been around a long time. So they had cross-site request forgery protections. That's one of the first things we'll look for. They were very well protected from XSS but not for the reasons you would think. Anytime they took any kind of data from the user for any field, they would limit all of the fields to basically alphanumeric characters, spaces and things like that. And that's all you could do. You could never do anything like brackets. So we thought, well how can we do this by looking for some fields that may not be user input? And so we did XSS, actually cross-channel scripting on LLDP. So the idea is that you may do a social engineering attack. And you say, hey admin, I'm having a problem. I'm not getting connected. Can you make sure that I'm connected to something? Can you go look at my interface and look at LLDP for me and see what you see? Because I'm sending out LLDP and if you say that it's really attached to my machine, I'd really like to know. And so you get somebody to look at it. In the meantime, notice on the right hand side we have local users. We're going to run this script that just sends an LLDP frame, single frame. Boom. Did you see it? Just by taking advantage of the access that the browser had, we're able to create our own user. There's a user now called Hacker. And we'll just have this open at the same time. That happened in real time. So now if you look, we have access to pretty much everything on the APIC. Well, that's fun. So let's go a little bit further. We need a route. We need some way of getting to the APIC. Let's say the APIC's behind a firewall, which hopefully they are. We have no real way of getting to them, but we do have access to the fabric. So let's see if we can get access to that. So there is something called the infrastructure VLAN. If you've used ACI before, there's this little checkbox on the port that says give access to the infrastructure VLAN. That infrastructure VLAN is the crown jewels to your fabric. Don't give it to just anything. And the reason why is it gives you access to the underlay. Even though it's called an infrastructure VLAN, what they did is they set aside a VLAN for accessing the underlay. When we got into this, we knew that there was ISIS, we knew that things were routed, and we were like, how the hell am I ever going to get my IP address into ISIS? I was like, how is this going to work? Well, as it turned out, later on we found out that they do DHCP. When you have access to the infrastructure VLAN, that's one way. Another way is they actually learn your IP address, which I'll talk about. Enrollment of the APICs is automatic, so they do zero-touch provisioning. Anytime you ever attack a fabric or a network for the first time, look at how they do day zero configuration. Chances are you might find issues there. Communications at Layer 2, we saw LLDP, and we know that there are custom TLVs, so we wrote a Scapey plugin to generate these TLVs. And there's no authentication before them, so what happens if we tweak and replay? We find that it says, hey, you're a controller. You have access to the controller endpoint group, and you have infrastructure. So that's what we did. And this is what it looks like in the underlay. So you have the APICs. The APICs are usually dual-attached to two leaf switches, and then they have a set of subnets that are... or there's a subnet that's set aside on that leaf switch that is advertised out, and this whole thing is on the underlay IP address range that you'll specify when you first set this thing up. And you'll notice that it's all completely routed over ISIS, and if we're the attacker, we can do the same thing and represent ourselves up as an APIC. So we're spoofing ourself to the network and saying that, hey, we're an APIC, and it believes us and allows us onto the fabric. Once we're on the underlay, we have a much larger attack surface. We can get access to all of the different APICs. We can get access to the hypervisors that happen to be attached to the infrastructure VLAN, and all of the switch and APIC DME ports are accessible. We can get to them, but they're protected by TLS. They're using mutual authentication. We need access. We need some kind of way of getting access to that TLS connection. What do you think we did? Anybody guess? We need a cert and we need a private key. We could steal it from something. That's one way. What's that? Spoof it? Well, it has to be issued by Cisco because it's got a trust store. And, yeah, you steal it. The DMEs, they communicate policy throughout the fabric. That includes all of the users and credentials on the APICs. But we don't have access to the DMEs because we don't have access to TLS credentials. We don't have the certs and the private keys. So we looked at the certs, and the certs showed that they were issued by Cisco, and we know that they are issued by Cisco at manufacturing time. And they have an expiration date way, way, way out. And there's really nothing else that was really special about them. And so we tried another private key and certificate that was issued by a Cisco certificate authority. What do you think we used? If you're doing a tax against a PKI, keep a cache of certs and private keys available. You can extract them out of these things. It's not that hard. It's hard, but it's not that hard. It's just basically on flash. It's kept by Cisco. It's a certificate. It's a private key, and it's issued by Cisco. And it comes from a Cisco PKI. Not all things are that easy to get off. We actually have a module called the TAM, the Trust Anchor Module, which is tamper-resistant. And it's actually programmed somewhere else that's not in a contract manufacturer facility. And they ship those chips to be embedded on a device. Those are a little bit harder to get to. But if it's something that's on flash, you can get to it. So we use that. We get access to that key. And this is a video from soup to nuts of owning an APIC. And so we're going to get those credentials. We're going to stick those on the APIC so that we can get access to SSH. First thing we do is we're going to listen for LLDP. And you can see that we're now sending LLDP. And we have access to the endpoint group. And these are all of the VLANs that we have access to. Now from that point forward, then we can ping our default gateway that is on the infrastructure VLAN. And once we do that, we've been learned. And everybody now knows about us. The Spines, the Leafs, they all know about that IP address that we're reusing. Because they redistribute basically ARP into ISIS so that we're able to get discovered. And then from that point forward, then... So that's basically what I was telling you. And now we'll connect to the APIC. We'll do the same thing. We're going to create a user with our username and password. Then we're going to be able to SSH in. So when you have a username on the APIC, you can SSH in. You can get access as admin but not root. So we wanted root access to the APIC so that we could do something that I'll be showing you in a little bit. And the way we did that, there was a open internal service that you could only get to if you were logged in locally. It was not an external service. And it had a command injection vulnerability in it. And that service ran as root and that gave us access to the APIC as root. And then once we had that access, then we installed a root kit. I'll show you that. Now we've completely withdrawn our LLDP frame. So we no longer have access to the underlay because we don't want to attract attention to ourselves. But we want to get access to the APIC. And the APIC has a VLAN that it sets aside called in-band network. So that gives us access to the APIC. And we just netcad it directly in using our port, which is 1337. And we logged in and that gives us a bind shell. And that's something that we positioned ahead of time. And then we run script dev null and that gives us access to an actual sudo terminal so we can run anything we want. That's kind of a nice trick if you didn't know about that. Type ID, we see that we're root. And you'll notice that there's no processes that are listening on port 1337. They're hidden. There's also no directory there called rootkit. And we just log in and there's the subversive rootkit. The claim to fame with the subversive rootkit, which is really neat. If you haven't played with it, I strongly suggest you do. It runs on Linux. And it does its hooking through the debug registers of Intel. So you don't actually hook anything. You don't modify the kernel in any way. It uses the debug registers to be able to hook the different system calls. And one of the system calls they have, of course, is write. And you're hooking that and you're turning it into leetspeak by just turning lulz mode on and lulz mode off. And you can see the other things you can do. You can hide files. You can hide processes. But, of course, we didn't hide the kernel module even though we probably could have. With me so far? Okay. So after that... Oh, we're done. So this is how it worked in summary. So as a bare metal attacker, we spoofed the APIC VLLDP. We get access to the infrastructure VLAN. We use a static IP. You could have also used DHCP. And that gives us access to the local switch. Then we inject our IP into ISIS. That's automatic. That was something I was like, how the heck are we going to do this? Well, it turned out it was a lot easier to do than I thought. We gain access to overlay 1. That's the name of the infrastructure VLAN. We steal a cert from an existing switch or use the cert or key from a phone. We access the data management engine. The one that we're interested in is called the policy manager engine. And we connect to the shard leader for AAA. We create a local admin user. We then connect to the APIC over the overlay 1 via SSH. We SSH in. Skew the root user SSH keys, which we actually could have done. We did that through a command injection vulnerability. That gives us access to the APICs and the switches. We install a root kit, remove the admin user, and now they're owned. These are the kinds... Clap, if you like. Thank you. These are the kinds of things that you'll see. For our customers, you may be wondering, like, why am I doing this? Why am I talking about Cisco in this in-depth? I want you all to know that we work really hard. The ASIC team works really hard. I'm blessed every day that I get to work with such great people. It's absolutely amazing. Some of the smartest people on the earth are in ASIC. I just love it. I just go to work every day. I just love it. Owned. We have access to the APIC, but we want access to the endpoints. In CME, they have VXLAN. It is mostly standard. I think that they use a weird UDP port. But there are a couple of flags in there that says whether or not policy has been applied. The source policy applied flag. Once you have access to the infrastructure VLAN, you have direct access to be able to send NCME VXLAN encapsulated frames. They get routed through the leaf switches, and then they can get to their target. And you just say, hey, I've already done source policy. Don't worry about it. And then the destination leaf switch will forward it on to the destination. It's just as simple as that. Once you have that access, for instance, once you send something to it, you can spoof your IP address. Maybe you may respond somewhere off your network. Maybe you can get tumbled somewhere else, so then you can respond to it that way. That's basically all there is to it. It's quite easy. Here are the fixes that they did. XSS, obviously, is very easy. The XSS vulnerability was actually a DOM XSS vulnerability. It was not stored. It was not reflected or anything like that. It was in the DOM. So make sure you sanitize. Don't just rely on your back end to provide safe data to your web app. They used a single page web app. Everything was all done through single page. So sanitizing and escape anything you put into the DOM. Context, of course, matters, obviously. Strict mode. This is one of the mistakes that we made. They couldn't turn this on without breaking all the existing fabrics, so they had a flag. It was a nerd flag that we probably couldn't really talk about very much, even to our customers, because we didn't want them to know exactly how hard... We just said, turn it on. It's one of those things. Because if you don't have it turned on, then you're able to do the LLDB attack and then able to get to the underlay. So strict mode, when you have it turned on, it fixes the LLDP underlay access issue, and it wasn't, unfortunately, backwards compatible. And that's why it had to be a flag that you turned on. One of the things that just went out recently was they made it so that it was on by default. Because this has been three years now, and people probably should have had this on already. So they turned it on by default now. So when the host claims to be an APIC over LLDP, the switch will require a random bearer token to be inserted into LLDP TLV to open the underlay. And the way it learns that token is through connecting to a DME that's on the leaf. They have an ACL that they put on the port that says you can basically connect to the leaf, but no further. Once you connect to that, you'll have access to that one DME, and then that's authenticated using mutual TLS, using the certificates that have to be put in a whitelist ahead of time. Once you have that access, then you have access to the underlay, and only then. Another thing they did was they strengthened the subject distinguished name checking for certificates. This is unfortunately very common, guys, especially in embedded products. Just don't assume because they're using a PKI that they're not actually checking things. You'd be surprised. You can just go get a Let's Encrypt certificate, try to connect to something, and then it may say, well, hey, this is on my trust store. I'm going to allow it. They may not do the subject checking. Make sure you look for that because it's been in five products, I think now, so far. No reason an IP phone should be able to talk to the data management engines. The admin registers these APICs and switches. This is actually part of just what they do when they first set up the fabric, is they'll go in and you'll put in the serial number ahead of time, or you'll actually just say, accept this, and it puts that into a whitelist that's actually used for checking this. This check happens during the initial TLS exchange. And then IVXLAN spoofing, unfortunately, by design, it's part of the use cases that hypervisors be able to send directly to the leafs. That's the VLEAF use case. So, unfortunately, there's not really much you can do. It's just you really want to protect the infrastructure VLAN from untrusted hosts. Make sure you do this. There is a new feature called CloudSec that's on the newer switches that actually does encryption from VTEP to VTEP. And, anyway, it's something that I'm kind of excited about to see, but it uses something very similar to IPsec between the VTEPs. Okay, so lessons learned. Don't expect hardware to play nice. Someone else's box is plugged into your switch's user input. Don't ever trust unauthenticated information, regardless of where it's coming from. You'd be surprised. Even if you're doing LLDP, you can actually do XSS through LLDP. Who knew? Context-sensitive sanitization before inserting into the DOM. PKIs, public key infrastructures, especially in hardware, it's really hard. Because once you've done it, you've done it, and you're stuck. You can't revoke certificates. You don't have OCSP, the Open Certificate SAS protocol, or CRLs. Once you're stuck, you're stuck. You can't really check those kinds of things. Don't abuse protocols. LLDP is strictly for discovery. It's just like Cisco Discovery Protocol. Link-local discovery protocol. Any questions now? How am I doing on time? I actually got through that faster than I thought. Yes? The new Cisco certs that are in Encore, are they going to be taken into account? I don't know. You can send me, drop me an email. Or drop me a Twitter, and I'll see if I can find out. VXLAN? VXLAN is data plane. And the certificates that they do is for control plane or management plane. So they're kind of different. They're orthogonal, but they're different. Any other questions? The script, what the script does, is it connects, so when we... Yeah, it gives you a PTY. A pseudo-terminal. So normally, if you have a bind shell that's listening on a socket, it doesn't really give you a terminal. So if you try to run Vim or something like that, it won't work. So if you run script dev null, that just gives you a PTY, and it doesn't save it anymore, which is really nice. So... You'd be surprised how many little tricks that you learn, you know, just from watching other things. Yeah, I can't run anything. How do I just run... yeah, script dev null. Yes, sir? Are there any similarities between ACI and UCS? The APIC uses UCS server. It actually is a re-imaged UCS server that has its own certificate and ID for it. But other than that, it's just a UCS server. Good question. Any others? Oh, the question was, is where do we run this? We use testbeds. So we set testbeds up ahead of time. That's actually probably one of the most time-consuming parts that we're not actually doing work, is just getting testbeds to work. And for those of you who are doing, like, red teams or cloud pentests, it's the biggest... I hate doing cloud pentests, because you're always depending on somebody else to set up, like, a dev environment. And hopefully it's exactly the same as the production environment, and most of the time it isn't. But what we do is we go through and we try to set up where we can. We try to set up an on-prem environment that looks fairly complex, you know, and real. Any other questions? Any of this interest you? If you like this kind of work, please apply. Go to jobs.cisco.com and type in ASIG. I think there's only a couple jobs on there right now, but we're always trying to hire good people. Any other questions? No questions about inner fabric messaging, TLS, leaf switches, spine switches, connections, nothing like that? Thank you. Thanks for coming.