Welcome to the annual DEF CON convention. This meeting was held at exciting Las Vegas, Nevada from July 9th through the 11th, 1999. This is video take number 19, Insecurities in Networking Devices. Well, I'll make them available on the DEF CON site afterwards and then you'll be able to have them there. My name is Royster and I am a network engineer. I design and implement large-scale networks, routers, switches, ATM, FIDI, whatever you want to call it. I deal with all different aspects of networking issues. So what we're talking about here today is insecurities in networking devices. But the question is, how did we come across the problem? The problem is, back in the old days... ...like way back in the Stone Age, when they were chopping wheels out of rock, they used to manage things through the console port, which is really cool when you only have, like, three routers to play with, no big deal. But then as time progressed and man became more advanced, they discovered other countries and they discovered need for offices in other countries. So they had to decide how they were going to actually manage these routers in other countries, you know. So say you set up an office with, like, five people. You put your network connectivity there. But you don't have enough people. And you don't have enough people there to make it worth getting a network administrator for every site. How do you take care of it? Hence the need for remote administration. The problem with remote administration, remote management, is that any time you leave a path for yourself to get into a device, you basically leave a path for somebody else as well. And the less you know about that path that you've opened, the more the other person is going to know how to get into it. One of the biggest problems with remote management... ...is the lack of understanding by the administrator what he's got. In fact, most networking devices actually come stock, I mean, come regularly set up with remote management turned on. You plug it in, you turn it on, it's there. People don't even realize this. In fact, with really basic configurations. Since there's no authentication for these, for a lot of these, it's pretty easy to get through. So the things that we're talking about today. We're talking about routers. We're talking about Ethernet switches. We're talking about ATM switches. Basic network infrastructure. The stuff that you start with when you design your infrastructure. So just to make sure everybody's, you know, we're all on one page. We'll talk a little bit about what the difference between a router and a switch is. So we're talking about the different devices. We don't know what we're talking about. The problem with routers and switches, marketing has come through... ...and they've totally redefined the way they work. The way that people use these terms. They've got, you know, layer 3 switches and layer 4 switches and just a bunch of marketing mumbo jumbo. It means nothing. I mean, if you really want to come down to what most likely you're talking about. If you're talking layer 3, you're talking a router. And if you're talking layer 2, you're talking a switch. Layer 3, as a general rule, your router is what's going to go between two different networks. Layer 2, you're going to segment the same network. Hope that makes sense to y'all. It's kind of bright, so I figured it was probably a waste of time telling you this stuff. Alright. The methods that people use to manage these tools. The management for networking devices. The basic protocol for this is called SNMP. I'm sure everybody knows. By the way, if anybody has any questions, like if I go too fast by something, please feel free to follow me. And then we'll have questions at the end. So SNMP stands for Simple Network Management Protocol. This provides that management capability remotely. It's actually an amazing protocol. It's really, really simple. And it can do a lot of amazing things. The problem is that it does a lot of amazing things very insecurely. As many people know. You can do just about anything, depending on the manufacturer of the device with it. For instance, Cisco has got kind of a half-assed implementation of SNMP, so you can only do so much. I mean, you can do anything. But unlike, let's say, something like Bay, where it's just like everything is completely open to SNMP. It's UDP. So anything that's UDP-based is going to be insecure. UDP is your, you know, as you know, they said, well, let's make the most basic protocol that we can. And we'll let the application worry about things like security and checksums and, you know, fragmentation and things like that. So UDP does nothing of that. Um. It goes across. Everything under SNMP goes across in clear text. There's no encryption. Nothing. No authentication. There's nothing involved at all. So you put a sticker on the wire, you're seeing exactly how the management system is working. And as such, it's completely insecure. It's probably one of the weakest protocols that we have on the internet that, as important as it is, has become. The way SNMP works. It has a really, really basic kind of primitive method of authentication. Passwords. But they're not really called passwords. They're called community strings. And what community strings are is a, basically a password that you, that each device allows access to a different part of it. Community strings usually come in two variances. There's actually three. But the two important ones are read-only and read-write. Read-only allows you access. Basically, you can look at the entire, anything that's on the router. It says read-only. Read-write actually allows you to set, to make changes on the switch of the router. I want to briefly address SNMP on your hosts. Unix boxes, you know, things like that. There's actually not a lot you can do. The manufacturers of, you know, HP and all these people haven't really put a lot of functionality for SNMP. In, in their, in their hosts. There are a few exceptions. And there, it's good to know that there are some, definitely some bugs with SNMP in hosts. I mean, the obvious ones are going to be buffer overflows for root. I mean, those, there, I saw five of them just the other day. In fact, there was one that Sun had that a good friend of mine in Germany, that Alhambra came up with. Where Sun had a SNMP community string. Hold. Hard-coded into the SNMP daemon. Or not, yeah, daemon. So that it didn't matter what you set it at. It was always, this one would always work. Nice little backdoor that they provided for everybody. Something to always watch out for. You know, it actually is a side note. Backdoors are something always to watch out for. Does anybody here use 3Com? Nobody uses 3Com routers? You realize that with a 3Com router or hub, that if you have a MAC address and you're on another 3Com hub. You can automatically gain full access to any other 3Com hub on the network. So if I come into your network and I plug it in. And I have your community string. And I have your MAC address. I just remote into your router. Just like that. It's very simple. In fact, this was 3Com's wonderful management system. Versus Telnet. Okay, another method that they use for management is called TFTP. Trivial File Transfer Protocol. Once again, this is UDP. And it has no authentication. It doesn't even have passwords. If you're lucky, you have to use community strings. TFTP was originally designed to make it so that machines that were booting up on a network would be able to get their configuration off of the server. So they wouldn't have any way of authenticating because they wouldn't even be fully booted up yet. So now, network code. Vendors will use this protocol to actually move configs on and off of a router. The main part of, the part that's important of SNMP is what's called MIBs. MIBs stands for Management Information Base. MIBs are the actual data that are on each networking device that provide the information that you can query. The amount that they have MIBs is dependent on the manufacturer. And it varies everywhere from, most manufacturers now have just about everything you could possibly think of in the MIB. From the temperature of the box, to how many interfaces there are, to the serial number that the box is. I mean, everything. You find out the IP addresses, the switch. If you're on a switch, you can see how many ports there are. You can even find out the text. The text of the port, how you've got it defined. So, like an ATM switch, you'll have a text with each port that defines, you know, where this particular OC3 is going. With that, when they first started, when they came up with SNMP, they developed this thing called Enterprise MIBs. And what an Enterprise MIB is, is a way for the huge standard for people to, for MIBs. So basically, in a way, you could consider it like DNS in a way. You start at the very root, which is 1. And it just, it actually is a string of like, you know, 8 numbers, depending on the manufacturer. But the first 6 numbers have to do with starting at the root, going through the fact that it's DOD, internet, it's a private network. All those are always the same in every MIB. And then every organization is provided with a number. And this number signifies that organization. So Cisco's number is 9. So, I have to read this to you because you can't see it. But, the actual beginning of a MIB number for Cisco is 1.3.6.1.4.1. Which basically means iso.org.dod.internet.private.enterprise.9. Which signifies Cisco. This will allow basic, you know, standard structure to the whole system. And I have, when I provide the slides. I actually have some FTP sites that provide the entire list of everybody's organization. Now, the standard ends there. Because, on one side, if I have the, how many, like say, the number for how many interfaces exist on the router is 41. That's not true across manufacturers. But, all manufacturers provide documentation on their MIBs. In fact, if you want Cisco's, you go to ftp.cisco.com. They've got, like, this huge directory with every MIB that they have. Now, there's, the question is, at this point, is what do you do with SNMP? I mean, how can you use this to get, to do any kind of exploit? So, there's tools that are actually provided for you on most Unix boxes. They're called SNMP get, SNMP set, SNMP walk. So, SNMP walk. What SNMP walk does is you put in SNMP walk. You put in the community string. And you, and all it does is it goes and it walks the entire MIB tree. Now, this may not seem like such a big deal, but this will completely take out any router you find on the internet. It will DOS it. No doubt. It actually tries to walk the entire ARP table and routing table. So, if this is a router that takes BGP routes, for instance, it's going to try to walk all 60,000 routes. Including, like I said. It's ARP table. So, all it's internal network as well. Which is more than any router can handle. And so, it will actually just take it out. The other ones are actually a little more insidious. SNMP get and SNMP set. These are the tools that you can use to access the MIBs that are available on these particular routers. Alright. Well, I have this list of really cool MIBs. Trust me on this one. . And what these particular MIBs are, if you can see them, are on a Cisco. Because, you know, I just pulled Cisco out randomly. No real reason. There are two particular MIBs that are your best friend. They go through the whole standard part. And host config set and write net. What host config set does is you pass it a particular configuration. And it will change that configuration on the router. Whatever line you want to. What's even better is write net. Which basically tells it to do, to pull from your TFTP server a config. So, you put yourself a nice little config on a TFTP server. Send that to a router. It will go to that Unix box and pull the config off. Okay. So, let's say you get inside of a router. The question is. Most people don't seem to understand what advantages they have by gaining access to the infrastructure. One of the big things you can do inside of infrastructure is you can map the entire network. These routers have ARP tables. They have routing tables. They know where everything is. If you're in a Cisco environment, it's got what's called Cisco Discovery Protocol. Which, turned on, provides every router, every information that's right next to that router. For instance, one of the benefits of this is most people don't actually have switches. You cannot see the switch. So, say you want to get access to a switch to find out what servers are on that. Well, when you trace route through a box, you can't actually see the switch. Because, obviously, it's layer two. And it just passes over the top of it. When you have access and you do show a CDP on that, you will see the switches as well as the routers. So, getting access to the switch at that point is a cakewalk. Because most people don't. They don't put passwords on their switches. It's simply amazing. But they do put up IP addresses. So, that's really nice of them to do that. So, one of the beautiful things about getting control of the network infrastructure is that the inside of somebody's network is always the soft underbelly. Nobody ever does anything totally. Say, oh, I got my routers in front of me. I got, you know, maybe some firewalls. Nobody can touch me inside. So, there's not much point in putting things like, oh, tough passwords that I'm going to change all the time. Any kind of real authentication or anything. I mean, who's going to be able to get access to that? So, I mean, you're in. Probably, it's the same kind of thing about when people have an inside job, which they don't really pay much attention to. But you can make changes to routing at this point. You can make changes in layer two. One of the big things you can do, if you're so inclined, is layer two, like, say, ATM. And you've got a site. You've got another site that you're attacking. You can very easily, when you have control, redirect all their traffic to you at a layer two level. Which means that you don't even need IP connectivity anymore. You're just pumping data at yourself that you can capture out of the ATM unit. There are things that are coming out. There have been design specs to try to alleviate this. SMP version two has respect. It's never used. And it probably never will be. I would be very surprised if it's ever used. It provides authentication. It's more streamlined. It's much more secure. But it has a lot more. It's a little bit tougher to implement. And it's really expensive. I mean, any time when you have to change a big standard like that, it's really expensive. And most people don't seem to realize the importance of things like security. Go figure. So I wouldn't bank on that being reused very much. Oops. I screwed myself up. Okay, so now you're the network. And you really don't want people accessing your router. What can you do to protect yourself? One of the most important things to protect yourself. Well, there are several. First of all, don't use private and public as your community strings. This is like the biggest mistake that, you know, people laugh. And it's funny. But I cannot tell you how many routers I find out there with these as their community strings. They turn on the routers. They don't even think about the fact that SMP is set up. And they just like walk away from it. And that is what all manufacturers put standard as their community strings. So you can pretty much just walk through the Internet and find dozens upon dozens of people who have not changed their configuration. Of course, you know, you could probably find dozens where the password is Cisco. But access lists. Now, this is going to leave out most of the ankle biters. Especially with UDP, access lists are not exactly the toughest thing to bypass. But, you know, you might as well use them because they're there and providing you access. Cisco, for instance, provides two different kinds of access lists. They provide what the standard access list where you can actually block who is allowed to do SMP queries, SMP puts, and who is allowed to do TFTP services. And you can also, you can do Telnet and things like that, NR login and things like that. Might as well put them up. It's got the extended access list on it so that you can filter even more tightly than that. What else did I say? Sorry, it's a slow computer. How important is the granularity of the extended access list to do this? Extended access lists give you the granularity of using ports, the status of the packet, meaning CERN or ACK. And by host or by range of access. So, for instance, standard access lists do not give you the option of doing by network. You can only do by host. But the extended one gives you the access to the host, I mean to the network. Oh, proper logging. Proper logging is really, really important. You really should, you need to know who's doing changes on your routers and who's not. And we're talking off-host logging as well. Not leaving the logging on your host and reading it from your host and hoping that you catch the person as you're doing it. Syslogs provide a tremendous amount of information. And they will tell you exactly if people are making configurations to your blocks or your routers. And they will tell you what configuration changes they're making. Having nice tools that go through your syslogs and pull out any possible security violations is a huge help. Because 99% of the people out there, the people trying to get in, don't really understand syslogs. So you access this. And that's pretty much it for security. So that pretty much covers it. My quick version of this to make sure we can get the experts in. Is there any questions? Sure. Do you have any feedback on like the ISL protocols for when the syslogs set up their bridge VLANs? The ISO? ISL. ISL? Oh, the Cisco bridging stuff? The switch to switch VLAN bridging over one core VM. Oh, oh. Well, I mean, that's actually not quite the focus of this. But I know what you're talking about. And whenever you're talking VLANs, you have insecurity problems. And when you map so many, trying to map VLANs to different ports. And adding extra protocols, you're adding insecurities. I don't know of anything in particular with ISL. But I wouldn't be surprised if something exists. Especially because there's no authentication of ports, right? So if I'm on a host and I send the correct command to the port, a lot of switches will actually let me change VLANs. Which is, you know, another really bad thing. Especially if people are using VLANs to, you know, try to segment their network in such a way. Actually, I almost forgot. That's what I forgot. Segment your network. One of the big problems with this is that it's clear text. So you can put access lists in to send on shine. You can put the most incredibly strong community string that exists. But if anybody pretends owns any box on your DMZ. And I'm sure most people have a machine or two that sits outside of their firewall and outside of their normal infrastructure. Probably unparalleled with the routers. They own one of those boxes. They set up a sniffer. They're going to have it. So it's good to segment out your network. I mean, throw away the hubs. And put switches in. Because it's the best thing. One of the best things there is for security on that. Keep people away from sniffing. I'm sorry. Go ahead. Actually, switches wouldn't provide much protection against sniffing. Because all you have to do is generate the MAC addresses of machines that you want to sniff. And wait for it to think that that's what it's generating. There's ways around it, sure. But as a general rule, I mean. You have to know enough about the switch to be able to pull that off. And you have to know what kind of switch they're running to pull that off. Because I don't even think that'll work on a Cisco. You know what? I've never tried that. I know it works on 3Com, but. But, yeah. I mean, they're always around it. But it's definitely better than putting a hub up. . Say it again. Say it again. Send ISTN routers. Send ISTN routers. Yes. Ascend. Ascend. Oh, Ascend. I'm sorry. Ascend. Okay. So, you want to know about those? . Ascend actually has quite a bit of security problems. A lot has to do with SNMP, because they don't really. They actually allow a lot of functionality with their SNMP MIBs. And beyond that, I know there's problems in the dial-up part of it. But. . Do you want to say something about them? . I can't. I don't want to lose my job there. Oh. Yeah. I know they have problems. . All right. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . actually, legitimately, taking my border routers down by SMP walking them. You don't have to SMP walk them by train. Well, right, you're right. That's very true. You don't. But that's, yeah. You're getting the good information out of the top. Yeah, right. Oh, that's, yeah, that's very valuable information for getting more access to the router. You learn what version of code that they're running and, you know, do a search of which else. Bugs on that one. Go ahead. Yeah. Oh, okay. It's kind of a basic question. Do you want to do an SMP walk on a router? Because you have to take the address and stuff like that. You don't want to take the address and public or private. Is there a way to find out the community's trade? Sniffing. Sniffing, yep. How do you test the router if we don't? If it's on a, if it's on a, if it's on a shared network, you'll be able to find it that way. Because basically, if, what's, what's happening is, you can be on a, you can be on a, you can be on a shared network where people are passing the data back and forth over the router. Which does happen. Because I've seen people administer routers over the internet. And it does exist. Well, was there, I don't, I don't know about those. Since I don't really deal with host. I don't really deal with host all that much. Also, you mentioned SMP3. It's a good thing now. Yeah. It's a good thing. Because it's a long iteration. Yep. Yeah. Yep. Yeah. It's a good thing. It's cool that the password is still passing. Yes. And SMP3 is like in the stage of being an IETF standard and not, or it's in draft stage if I remember correctly. Now, I think we don't have it. Has it? It was announced in December last year. So, we are still looking for connections, but the thing is that. It's very complex. Yes. I didn't talk about it. You were asking about SMP3 and that. Yeah. You got a question? Yeah. Yeah. What about the new, what about the new CKC? The new what? CKC. Is this the router that actually is on application? It's, you know, like a firewall feature setting. Oh, oh, you know, to be honest, I don't really use those app parts of Cisco because I don't really trust them. You know. So, I use it actually. I don't use their firewalls. Just so you see what you're talking about. I don't really get involved. Small services, shut them off, pretty much back down to what a Cisco router is supposed to be doing, which is routing traffic. So, it's an application proxy. I don't really use it because I use other application proxies. So, I've never really played with it. Do you have a, you mentioned simple logging everything and you like to use it, but do you have a recommendation on it? Well, you're going to love this. Pearl. I have to say, I'm a little bit jaded because one of the people I work with is a, just a scripting god. I've never seen anybody. I've never seen anybody who can do the things he can do with a script. So, I've seen pretty much in whole infrastructures based on scripts that will go through all the configurations, match it against TACX logs, compare who's actually logging into routers and who's making changes, all possible through standard Pearl tools. And not for a week. There are, I mean, you could, there's, if you go to the Pearl sites, they have tons and tons of scripts available. And, to be honest, I'm not. I'm not sure what, like, commercial tools are available to do that kind of thing. I'm going to ask, this is going to be about, this is going to be about the scanning ports. You go across there. Have you found any vulnerabilities with those special units that have, like, an IDS system where they're remote and you can be in? No, I actually haven't found any. I really looked at, I mean, I've done spanning before, but I've actually never said, I wonder how I could break this thing. Other than the fact that just by having that available, somebody gains access to it. They can then span the entire port, the entire switch, which, I want to point out, it seems like, you know, oh, of course you're going to gain access. Gaining access of a Cisco switch is trivial because nobody ever puts passwords on these things. Is there a point that access control lists can be bypassed? Sure. Spoofing can do it. Especially when you're talking about something like UDP, right? I mean, you're sending UDP packets out. You're not expecting an answer back. So it's, I wouldn't say. It's trivial to construct a script that would basically build UDP packets on the fly that would make configuration changes with spoofed IP addresses. One thing you can do, one thing that's really important to do in a Cisco router is basically put up an anti-spoofing type access list. All it does, it says, on the outside interface, I don't accept addresses coming from the inside. Very important. Thank you. One thing I want to mention about the standard port on Cisco switches. You said currently, you can only scan the ports that are on your box. You've got a network of switches for several of your chunks together. You can't see the traffic that's on them. Right. That's supposed to be a feature. We're not scanning that. We're seeing it in 4.5. Oh, that's beautiful. I mentioned on device logging, we have some problems with the web use in the previous version of iOS. The iOS service attack could be launched if somebody was logging everything that's listed on it, and the router was jammed all of a sudden, sending it as long as I want those routers to do. Which kind of points to the importance of making sure that you have the latest and greatest code. And I don't mean the latest like 12. I mean the latest code with the bug fixes and the security fixes that I'm to, I mean there's a ton of stuff that's been fixed, but I've seen people run 10.9 Cisco out there and, you know, everybody knows the problems with those. Even within certain trees. Right. Exactly. Do you have a CCO login? You know, we literally... Hence the problem with Cisco source. You mentioned that main network routers were heavily SMP managed, which is very true. Is there a lot of additional weaknesses compared to the... Actually, no, not really. Because with any of them, you can change the configuration. It's not so much as weaknesses as just it makes actually manage melody a little bit easier. But any of them you can use. There's a break in that. If you're using Cisco for an ACL block, a majority of the certificates or whatever, then I would suggest putting an outbound filter on the external interface so that it actually doesn't even respond and packets will drop and the administrative role is to send it off to null. Yeah, or don't send TCP refus... Oh, what is it? Whatever fuse in the... Don't send any packets back. That's what you can do with a Cisco. It'll just let it die. What else do you have? What about the TACACS and RADIUS? Well, the benefit of TACACS and RADIUS is login authentication. TACACS provides a one-time power, you know, theoretically a one-time password. It doesn't really work that effectively, but it provides a way for that you to have an authentication for when you do logins. It won't do anything for SMP at all, but it'll stop login type attempts. RADIUS allows you to have a central database of users and their authentication. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Oh, well, um, no comment, um, yeah, UNMT is an operating system free router, hmm, well, you know, the problem is, it's funny, because there's this one router that I saw out there that's like probably the butt-fastest router that exists, and it runs NT as its operating system, it's kind of a toned-down version of it, it's kind of, it's more of an embedded version of NT, almost an NTCE, but, um, and it's like, alright, um, but it's the fastest router that I've seen existing, and I'm, I, Berkeley Networks, I believe, is the router name, um, yeah, it's fast because of the hardware, not the operating system, I probably should make that clear. Um, so, it's, yeah, I mean, there's many problems in that, when you're doing, the benefit of using something like the Cisco and the Bay is they don't really have a real operating system, they're just this router with some protocols. Okay, one last question. Hold on, let me answer it. Oh, okay. Uh, real quick, folks, uh, if anyone knows a Brett Bressler or a Roman Israel, they need to go immediately to the second floor and talk to a lady by the name of Sharon, there is an urgent family emergency. Uh, Mr. Israel is wearing a Amish hat, so if you spot him, please kick him into play and make sure he goes upstairs. Thank you. Oh, and by the way, the, there's a gentleman in the back wearing a yellow hard hat. This gentleman's from Lenoxville, is that correct? And would love to talk to anyone who loves Lenox. Or not. What's Lenox? And, and, sir, running, I'm running NT on a router, may God have mercy on your soul. Okay, one last quick question. I just wanted to get any comments on, uh, Armand for the release. I don't really know a lot about Armand. That's kind of new for me. I would love to tell you more, but I can't. All right, well, thank you very much for coming. Oh, um, my email address is rooster at resentment dot org. If anybody has any questions. I'd like to. Do you spot the Fed? Spot the Fed. Woo! What's that? Yeah, ftp.cisco.com. All right, thank you very much. Thank you. Thank you. Thank you. Thank you.