Welcome to the annual DEFCON convention. This meeting was held in exciting Las Vegas, Nevada from July 9th through the 11th, 1999. We asked Dee to set up a firewall gateway. If you missed, maybe like you're here sitting listening to me talk about firewalls, gateways, and actually secured servers because you're dealing with like pretty much a lot of the same concepts by that point. And the target implementation is with NetVSD on the grounds that that's what I'm running, that's what I can field questions on, and it runs on a lot more platforms stably under one source base. You can't see it. It's a work in progress. Anyway, it's a work in progress, which means that things are still under development. I'm still working on scripts to automate things, still fine-tuning and getting examples set up, and eventually this will all be on a website so you can take a look at how this is. This is all laid out, and you can actually really easily see the example code, example configuration. Yes, BSD is a, I mean, it's Berkeley-derived code. It is open source. It is underneath the Berkeley copyright, not the GnuP public license. And, um... I actually prefer the Berkeley copyright versus the Gnu public license just due to the way the Gnu license is set up as far as getting other companies interested and so forth. Does that answer your question? Theoretically, a lot of the concepts are the same. How you might go about implementing it may or may not be the same. I'm not... When I say it's targeting NetVSD... That's because if you ask me about command line options and so forth and you're running, like, pico-bsd or something and pico-bsd doesn't have the dash-qzz option of some command, I'm not going to know how to do the equivalent because I don't run pico-bsd. So, that's why the slides actually say NetVSD because that's the platform that I actually did this on. So about intuitive manual milling... No, this is actually... Actually hold on. Let me see what I can do. With... ... ... Um... This slide... ... ... and yes, I want to include this soon... ... Okay, firewall versus gateway versus secure server, basically this is all depending on the purpose of the machine. One of the key things you want to avoid is overloading the purpose of the machine. If you're putting a single machine out on the network, you don't necessarily want to have that one machine do everything. You basically want to isolate it by task, if at all possible. By the time you get down to a personal server, trying to locate four or five machines out on the net simultaneously, each doing their own function, may not be feasible, and actually some of the topics I cover help isolate you. So you want to isolate down multiple functionalities on the same machine and protecting individual functionalities from each other, but generally you want to try to avoid overloading a particular machine such that if something gets compromised in one area, you lose the whole thing. As you're building these machines, yeah, you can use NetBSD for a firewall. If you're a corporate entity, you can use NetBSD for a firewall. If you've got to look at those threat levels and the cost versus the threat, if you've got a lot of information or you need a lot of reputation capital that needs to be protected, you probably don't want to use any Unix-based firewall. You probably want to give Cisco a call and go out and buy a PIX, basically because that's all it does. It protects your machine. It's a firewall. It's dedicated. And if you're a major corporation, you may want to go that route. It's all based on cost versus threat models. Basically, most people think of firewalls as you're out there protecting some machine or some service on the inside from attacks on the outside. So you're expecting people on one side coming in and attacking on the inside. And there's no whiteboard. In order for people to actually get work done when you've got a firewall in place, you've got to allow various services to be able to pass through that. If you don't, people are going to attempt to find ways around the firewall and open up other security holes, which basically undoes your carefully laid plans. Users are very tenacious. We're not going to do that. They're going to do whatever they want to do when it comes to what they want to do, so especially in a corporate environment, you've got to have mechanisms in place to ensure that what you're doing and what you're blocking and what you're allowing is what the users need. There's times when, yes, users may want a particular thing, but you have to say no. You need to have a corporate policy and effect that says you can say no, otherwise, they're going to try to go around it, and there's nothing you can really do. Okay. Okay. Thanks. Basically, you've got this machine sitting in between two networks and there's at times where you need to allow the inside to get out into the open area and sometimes you need the outside to have the ability to get in. If you've got your personal machines fireballed off on the internet, it works really good when you're at home sitting right in front of it. But when you go out and you're roaming, you've got your laptop and you've got your ricochet, whatever wireless or remote connectivity means, and you suddenly realize that you've left a phone number at home and it's sitting on your machine at home, you tend to really, really want to be able to log into your home machine and get at that number. So there are mechanisms to allow you to get back into your machine behind the firewall securely. A lot of times, if you've got multiple machines on the inside, you may want to set up a proxy servers. Most common is the web proxies. This also helps with caching and so forth. And a lot of times, most corporations will locate this on separate machines to not bog down the actual firewall machine itself. As home users, you can consolidate this into one machine and, especially in the case of home users, unless you've got nice fast cable modems, you may want that caching, if you've got a lot of people on the inside. So you can get that same site. There's a couple different levels that we're going to talk about as far as dealing with what you're firewalling. Okay, who did that? Hear what? Cool. There's some routing you can do to help. You can have your firewall routing different packets into different networks and ensuring that that traffic goes to its destination. Filters, you can start protecting things at the IP level, not allowing certain traffic to go to certain machines on the inside, but allowing the rest of the traffic to go to other machines. And this basically cuts down on the number of attacks people can hit on those machines. And in the case of small corporations, small offices, it will help prevent individual users from starting to run their own programs and their own machines that allow access into your network. A common thing is for people to run remote access servers on their own machines. Not tell anyone in the IS department, just so they can log in from home. Same thing applies to people setting up modems on their personal workstations, to allow people to dial in. That immediately bypasses any firewall you can put up, and that's really dangerous because it doesn't take much now for a user to set something like that up. It's a few mouse clicks under Windows, and suddenly anything goes. Anybody can dial in to that workstation and have access to your internal network, and a firewall will do absolutely nothing to protect that. You can actually have TCP wrappers to watch what's going on and determine what's connecting to what service. NetBSD actually has TCP wrappers built in, so it's something that comes with the OS. As far as filtering, IP filtering is built in and ships with the OS, so it's like right there, out of the box. You can start writing rule sets and so forth to actually deal with that, and you don't have to worry about downloading additional software. It's all right on the box from the beginning. By writing a Google IP address, you can actually set up your own network. If you write rule sets, you can really cut down on the number of attacks. Scanners. It is actually possible to go out and get software that will look at TCP streams coming in and analyze them for certain textual sequences. A lot of times, they will look for the string rootkit and set off all sorts of alarms and kill the connection. Basically, if it sees tar, it's like, oh, there's a problem. There's a tar.xf rootkit. It's like, wait a minute. Something's wrong here. Someone's unpacking a rootkit from a remote site on an internal machine, kill off this connection, log the attempt, and notify someone. There's actually software out there that will do real-time analysis of the streams going through a machine. Personally, I'm opposed to that just due to privacy considerations. It's a good thing. If you're running SSH like you all should be, your streams going through your firewall are encrypted anyway. Running that sort of scanner is not going to work. Logging is also very important because we can collect and look at and have available at our fingertips all the data that's going through the machine constantly, but if we don't do anything with it, if we don't do the correct things with it, it's absolutely useless. The key point is if you log into a machine and you don't have access to the data, you can log to the machine itself. If it ever gets compromised, people can mess with the logs. What you want to do is set up another machine internally, highly locked down, that is basically a log server. The only thing it does is it takes syslog messages and writes them to disk. I've actually seen cases where they've gone to the extreme since syslog is UDP based and doesn't require an ACK. They've actually taken machines that are plugged into the network via the AUI connectors, the old style connectors, and have cut off the transmit pin from the machine so the machine could not possibly talk back to the network. The only thing that can happen is that machine can receive UDP packets. There is no way to really break into a machine like that because the only thing you can fire at it is UDP. You're never going to get it back. You're never going to get a TCP connection. You're never going to get a response back. And so you're really, really limiting what can be done. The worst case in that is someone can attempt to try to fill up the log disk on that machine and then try more malicious attacks. But disk space is very, very cheap. You can go out and get 10 plus gigs for under 200 bucks. So trying to fill up that much space before someone notices is very, very difficult. But the main point is logging is very important. Routing. A lot of sites will only need to set up static tables as far as the routing of their internal network. Most people will only have one connection to the outside world. And so static tables are fine. If you're on a larger corporate-style network, we may have multiple paths to the outside world. Maybe running dynamic routing protocols. And one of the key things you've got to watch for is various poisonings of your routing tables. At home, I actually had a little bit of a problem in Fremont a few months back when a user broadcast a BGP packet. It was a BGP packet. And then the user was like, oh, it's in the internet. I can't get the BGP packet out to the routers. That basically told them to get to anywhere in the world, you go to that machine. It's pretty much shut down Fremont. Network address translation, NAT, is very common amongst home users and small offices, basically turning a single IP address or a small handful of IP addresses that were given to you by your service provider into a DBA. a fairly large pool. In my bedroom, I've got probably eight or nine machines. My network connection, they've given me one IP address. It's working just fine for me. I've had no problems with it. Works great. You can actually deal with world sets. I'm so dead by the end of it. Thank you. Yeah, it's a little bit more difficult, but a lot of the cache poisons I've seen, it's theoretically possible on a single pipe out. Actually, I don't know what set of slides they actually used earlier, but I've worked with both Pete and Pankus on presentations before, so I've seen a lot of those slides. It's possible with a single pipe. Thank you. In a situation like this where you're writing data in proxy, I don't have a dialogue or something. That's not going to be a problem processing that machine. Is that going to put a load on your server that you might experience going on at some point? Not really, because with NAT, you're only changing a few bits, and you're doing some checksum recalculation at one level higher. But you're doing a lot of that calculations and twiddling of bits the next layer down anyway, because you're changing you've got to drop it out on the wire on the Ethernet, so you're writing a new MAC address into it. So you're changing fields anyway. So it's not going to work to be done, so yes, it's going to add a load, but it's not all that significant. I've seen 486s, doing IPSec, that are saturating 10 megabit links. So, granted that was like single DES, but you can't buy a 486 anymore, so anything you're going to find now you shouldn't have any problem even when you start trying to do IPSec and encrypting everything. IP filters, this is the core of what you need to do in order to protect a machine. You've got to have a really good set of filter rules to make sure that what's getting through is what you want to get through. Basically, if you've got a set of IP filter rules in the file that contains those rules, about half of those lines should be rules. The other half of those lines should be textual comments. It should be exactly what you're trying to accomplish with those rules. I've seen instances in corporations where people have, in different departments, have requested IS, oh well, I need this port open. And IS has gone in and opened the port. And the need for that port being open dies off after several months. IS has never notified that that port is no longer needed open. So, you know, but IS didn't document who requested the port to be opened, why it's open, so it gets left in there for basically all eternity. So someone sits down, says, okay, fresh start, we're going to lock everything out and wait for people to complain. This usually gets IS into a lot of hot water in, I'd say, 99% of the companies, because a lot of times those security groups just don't have the political power within the organization. to be able to stand up to marketing. The company is driven by marketing and a lot of times they can, oh well, we need this. And management will say, okay, well, you guys make this happen. Allow them to do this. And there's not, a lot of companies just can't stand up to that. But your IP filter rules are really important in what you're protecting and how you protect it. So you really have to use those to lock down your system. Basically, the rule of thumb is deny everything and then only allow through what you want to allow through. There's a lot of rule sets out there that are attempting to block certain ports. If you know what you're doing, you can get away with just blocking certain ports. However, the safest bet is to deny everything, pass through what you want passed through. Like I said, I accidentally jumped ahead of the slide there. Like I said, comment what is allowed, when, by whom, and any authority that said this has to happen. An additional point is note that if that rule is ever to expire, that is if we need this port open from now until next February, note that it can be closed off next February. That way, you don't end up with this huge file with all sorts of ports open and nobody knows how long it's supposed to be opened. You can go back and deal with cleaning up your rule sets. You also want to make sure that when you're opening up a port, you find out what that port needs to go, what machine it needs to go to. So you don't want to open up a port on all the machines going through because that can be used to attack other machines that may not be running that server, or maybe having other resources and other types of servers running at that port address, which can then be attacked because one group needed a port open for only their servers, but it was opened up for everybody's. TCP wrappers basically allow you to deal with monitoring who's connecting to what and dealing with services and basically give you a little bit of another layer of denying control. This is at the next layer up. Basically, you're trying to establish a connection rather than just looking at the raw packets. This gives you better control over application-based security and wording things. Whether you write rule sets and deal with rules on a TCP wrapper layer, just logging what's happening versus blocking ports, it's up to your particular implementation. And what you feel more comfortable with. Yeah, that would be one way of putting it, because it's assuming that all your, well, at least under the BSD kernel, all your routing and your filter rules are happening in user land. It may, I mean, sorry, in kernel space and other implementations, some of those packets may be popping up into user land. If you know you can deny connections, you want to, like, get them, those packets, out of the mix as soon as possible. It's less work for your higher-up layers if you can just eliminate them as soon as you know you can eliminate them. As we got scanners looking for bad things happening, a couple products I want to mention that's out there. Port Sentry, which was formerly Abacus Sentry. You can set this up to start watching people trying to connect. This is working off of your IP filter logs. So if you don't have services running on 65,531 of your ports, but you have services running on just those last remaining four, you're going to want to be able to detect if someone's trying to scan you. You don't want to wait until they stumble across those four ports that you actually have something bound to. You want to see that, hey, someone's trying to pass packets on all these other ports and trying to find out what's open. So software like Port Sentry will help you determine what's going on. Dripwire is actually software that tends to run on the machine. It allows you to determine if the machine has been compromised by doing checksums of the binaries and looking for things that have been replaced, trojaned, et cetera. Content scanning, like I mentioned earlier, you're looking at the individual streams, looking for people typing suspicious or malicious content through the wire. Usually these things are fairly flexible in setting that up so you can determine what's going on. What exactly you want to look for. And it's not limited to just interactive like telnet sessions. You can scan basically pretty much any IP stream looking for this potentially bad content. Logging, like I mentioned, the best logging is both remote and secure. You want to be able to protect that logging machine because generally you're not going to set up a logging machine for every machine you want to attempt to log to. So you're going to be coalescing a lot of your logging functions onto one machine. So you want to make sure that that machine is really, really secure. I've got a machine called SD... Sorry, go ahead. Yeah, you can actually tell Syslog to log to a remote machine. And that's a capability built in. There is secure versions of Syslog out there that add additional layers. So if someone else does manage to compromise an internal machine, they can attempt to set up a sniffer or something. They can block out... There we go. It's a little strange to be jumping that far ahead. Providing services. So you've got machines out there that need to do something. Aside from just having your firewall to keep protecting your network, do you need to have machines that need to talk to the internet as a whole? Web servers, mail servers, FTP servers, etc. So in order for any site to be useful, you've got to be able to offer services and you've got to do something to be able to protect them. With web, it's basically broken down into two categories. The web service itself, where people browsing the web will connect and get pages down. And the other half of that is content management. You've got to have some way of dealing with the web content that's there. And a lot of times you want to break this off into two categories. As far as how you want to lock down the permissions. Interactive traffic is a hard one to nail down because you're opening up the system to allow people to log into it. And one of the reasons you may want to do this is for content management of a web server or an FTP server so that people can update it and keep it fresh. Deal with content and other logs there. The other thing that people may need to have in direct account on the machine is for them hopping out either from inside the firewall, onto the firewall and then out to the outside world or in some instances you may need to allow people in through the firewall. So being able to access resources both on the outside and on the inside of the firewall, you may need some sort of an interaction or interactive capability. Administrative considerations. Basically you've got this machine there. It's going to require some administration to deal with it. You need to be able to protect the access that's required to actually administrate a machine. Since administration requires additional privilege you've got to be a lot more careful about how people who are doing administration of the machine are going to do it. If you've got a large machine or a lot of machines what you would need to do is decide on, with multiple administrators, decide on who is going to be doing what and what they're actually going to need to do in order to get their job done. One thing you want to avoid in a corporate environment is role-oriented or role-based accounts. Basically an account called web admin. If you have one account that's called web admin and you've got five web administrators, you really don't want to have all of them trying to log into this one account with one password because now you've got five people with one password to one account. If any individual writes it down on a post-it note, loses his day runner with it in it, it's harder to track how that password got compromised and there's also no accounting of who did what. If someone decides they want to reorganize the entire website, there's no trail saying, oh well, this person came in as administrator, changed all these directories around. If you've got an administrator who has multiple duties and you've decided that he needs multiple access on both web and FTP, but you've got other administrators who only need web, only need FTP, one solution is to provide them with their own web administrator account and then with another FTP administrator account. So the admin who has to manage multiple services would have multiple accounts so that he knows that, okay, he is logging in to do this function. And it's a little bit more work for the administrator to deal with the additional passwords, but at the same time he's not likely to accidentally do damage to another service area. So once you actually have all these accounts, one of the things that you're going to want to do is reduce the privileges down to what is absolutely needed to get the job done. All these people who have their own accounts, they should not all be root equivalent accounts. That defeats the purpose. This is a little harder in Unix-based systems than systems that have like, B2 level security, where you actually have a capabilities-based permissions model where you don't have a root account other than an account called root that just happens to be, by default, assigned all priorities. Some of those higher end systems have neat accounts like backup, which basically gives read access to all files, write access to tape drives, and that's it. They can't change or modify or create any file they want. They can read anything. They can write to a tape drive, and actually they can read from the tape drive and write to a restore area, and that's it. Unfortunately, this hasn't gotten popular amongst even most of the commercial Unixes, and it hasn't hit the free OSs yet. It is something I would like to see because it would vastly improve security because you can really lock down who can do what. Another thing that you're going to want to pay attention to, and there's mechanisms to do this, is compromise protection. This is an era where we've got a lot of free software out there, and by that same token, we can't always guarantee the code quality, so any given version of Apache may have a bug that allows YouTube to compromise the root onto the system. SendMail is notorious for having this problem where you can break SendMail and get root access. The problem is once you've got root access through SendMail in most installations, you now have root access over the entire machine. As you're reducing your privileges, you have to understand that the defaults may be way too open as far as what permissions are set on what directories and how things are set up. This is done a lot of times because a lot of the newer users are expecting to be able to do things easily with their own accounts, so rather than really securing a system and getting tons of email from new users saying, well, it won't let me do this, I've actually seen instances where various OS camps have opened up the security on the OS just to stop getting email saying, well, it won't let me do this. Unfortunately, that's not the best route. The best route would have been to educate the users and provide more upfront information saying, hey, you've got to do this and this first. So the really big things that we're going to need to compromise our protection are web and your mailers. FTP occasionally has had some problems, but it's not as much. We still want to attempt to do some compromise protection for web and send mail. So how do we do this? There's a wonderful, wonderful system called chroot. And with it, we can change what the system will allow the root of a directory tree to be. So basically, we've got four, five key areas here. We've got user space, basically areas of the directory tree that users need to be able to access or various applications need to be able to access to do their job. We've got things in slash dev that allow things to communicate within and out of the system. We've got shared files, which are basically files that are needed by most users. We have more than one service, such as if you're providing web, the web server needs to be able to access the files. So does the people who are administrating the content. VAR is needed in a lot of instances because, like, you've got your mailers who are pulling mail in. They want to be able to write to VAR. And at the same time, you've got people who are reading mail who also want to see the same VAR spool that the mailer sees so they can actually pick up their mail. So a neat way of getting users into these ch-rooted cages is by starting up SSH in its own ch-rooted area. This will allow any user who logs in via that particular SSH daemon to end up in the ch-rooted cage, which is then very carefully built to only put into that cage what is necessary for them to do what they need to do. To get things into these ch-rooted cages, especially like in the shared areas, our goal is to protect the outside from being able to access it. So we've got to take care to deal with permissions, both the user IDs and the group IDs. The way we get things into these cages is their actual disk, undisked storage lives in another portion of your directory tree. What you'll do is make local mounts from that point in the file system into the ch-rooted cage. Sim links will not cross a ch-root boundary, but if you mount something inside a ch-rooted area, it will show up. By doing this, we can control exactly what any individual cage sees. And as we're mounting... Oh, this is so not going to work. As we're mounting these files systems into these ch-rooted cages, we can take advantage of a lot of mount options, such as not being able to exec, not being able to make device nodes, not being able to run set UID binaries, not being able to allow core dumps, and so forth, basically all your mount options. So you can really lock down what is possible in binary. If you're mounting your binary tree for users to execute certain programs, you may want to mount that. Read only. So that if the cage does get compromised, they can't change any of the binaries. A ch-root is actually a system call, so it's down at the kernel level, and basically it doesn't allow you to traverse above the kernel. So if you have a certain point, whatever you ch-root into, you'll give ch-root an argument of a directory and then an executable, and the executable is relative to that directory. Any program that is then fork-exec off of that, its root, as far as the root file system is concerned, is the directory that you pass as that argument to ch-root, and it just can't go any higher than that. And so it's locked into that portion of the directory tree. So, now we get to... Um, the PowerPoint slides will eventually be available as soon as I can convert them into a real format, and they will be available actually on this website. Yeah, unfortunately I got caught up with, uh, my real job, and they, uh, I spent, like, the past three weeks writing and then giving two courses on a particular API set that I wasn't planning on, and basically that, that consumed, like, literally three solid weeks of my time, which I lost a lot, a lot of sleep over. SDF1. Um, any anime, uh, fans out there may recognize, uh, SDF1. Um, so I actually have a machine named SDF1 that is sitting out, um, on the net, and on it I've got right now, um, a web server that is managing, uh, three domains, um, and each one of those has content that is in varying degrees of completion. Um, and due to the fact that I'm completely over, overworked because work likes to just, uh, hit me with, can you please design a course and teach it, um, next week, I've, I've gotten a couple friends, or suckered a couple of friends, I hope they're not in here, um, to, to actually do content management, uh, for a couple of those, those sites. So I then realized, okay, I've gotta let these guys be able to log into this machine, um, to be able to, to edit these web pages. My original plan was to create all the content on my machine at home, and have a really simple, uh, script that allowed me to SSH in with, uh, RSA authenticated keys, so it's basically doing mutual authentication, push the info, uh, push a new tar file of the entire web content up, and a script would run that moved the old content out of the way, dumped the new content in, and everything was happy, with no user intervention, no user logging in, um, really limited ability. Unfortunately, I don't have that type of time, so I had to let them log in. And of course, they do not want to sit there the entire time. They do not want to sit there the entire time and use VI to create the content. They want to be able to do the, to create this content, um, in the comfort of their own home. So I had to provide them a way with getting the content up to the machine. And they're unfortunately all on Windows machines, which doesn't have a nice, neat, uh, secure copy, uh, interface installed. So I had to provide them with FTP. And the last thing I wanted was them typing in their passwords to FTP. So, okay, anonymous FTP only. And this was done to allow them to do content management, so the only writable areas are some hidden directories and are incoming. So in order to accomplish all of this, I set up, uh, I cut several ch-rooted cages, one for the web, uh, one for users, one for FTP. And basically, inside the, the user's area, when they SSH in, they SSH in, they end up in a ch-rooted, uh, cage. And mounted in from another portion of the tree is slash HTML, which is the web content. This exists on another portion of the disk. It's mounted into, to that area, so they can go ahead and access it. Uh, the FTP, which is sitting off in its own ch-rooted cage, um, the directory that's, that they're FTP-ing into, that is mounted from that ch-rooted cage into the user's ch-rooted cage so they can access it. Since I've got to administrate the machine, I've got another SSH running at another port, so that will let me log in and actually get to the real root so I can really log in and, and deal with the administration of all of this. Um, with that, I can control and set up these various ch-rooted cages. But the fact that I've got two SSHs going now, um, two SSHDs going now, I just have to start worrying about dev entries because the way dev permissions are restored is they're, uh, set back to, uh, to 666 for some bizarre reason. Unfortunately, there is not one place that I can go in and tweak the code to say, set the mode to zero when, uh, you deallocate a, uh, a TTY-PTY pair. It seems that every single daemon does this itself. I looked through the SSH code and saw what it did it there. I looked through telnet and saw what it did it there. I looked through login and saw that it did it there and went, this is not good. This means that I've got to make changes to several daemons every single time I want to upgrade to make sure that the TTY permissions are reset correctly so that as I'm going along and people are logging in and out, that as I log in as root, um, in one domain, that someone logging in as a user in that CH rooted cage and sees the dev entries there, um, can't mess with them. So having multiple device nodes was not going to work because of these permissions. So what I ended up doing was creating a subdirectory under slash dev that only had, uh, hard links from it into the, uh, TTY-PTY pairs. Hard link into standard in, standard out, standard error, um, dev zero, dev null, and dev random. And then mounted this, this subdirectory, which had a very limited set of dev entries, into the CH rooted users, uh, directory. This allowed the, the CH rooted users cage to have access to the dev entries that it needed, but not all the dev entries. So even if someone was able to, to get root in there, they weren't able to, to make the dev entries to create, um, dev entries for the hard disk. And basically I, I mount, you can mount those, uh, the file systems in with, with the appropriate permissions but set so people cannot, uh, cannot deal with, uh, creating new dev entries in the slash dev. Mount all the other file systems no dev so they can't create dev entries anywhere else. And you can really lock the system down and prevent people from, from making changes even if root is compromised. Um, for situations like FTP, um, I don't remember exactly what version of FTP I've actually got running, um, but it's, most of the shellcode out there for FTP exploits assumes you have a bin SH. There's no bin SH in that CH rooted cage. You're not going to be able to exec it. It just won't work. Um, the only thing that lives in that directory is the FTP D binary itself. Um, so unless you want to write an entire shell in shellcode, um, even if you can find the buffer overflow in that version of the FTP D, it's not going to do you much good. And even if you are able to break root through FTP D, you now have access to the FTP files. And if I'm serving any FTP out, well, you're not going to be able to compromise those because those have been mounted read-only into that CH rooted area. So the capabilities that you're left with after compromising root are really, really limited because of this extra effort set up to create these particular cages and lock, um, what resources are available down to only what is needed for that service. And the same things can be done for, for send mail, for your POP, any other internet related services that you need. You just duplicate these CH rooted cages on out and only provide binaries that are, they're absolutely needed. In fact, um, I haven't had actually any of my users complain yet, but they can't even do a who to find out who's on the system because who doesn't exist, um, in that CH rooted cage. And even if who did exist, there's no dev came in. So even if they copy in a who binary, um, it's not going to do them any good because it's just not going to work. And, and by those tokens, um, you can really, really keep, keep people out of what you don't want them to do. And if you ever do need to administrate the machine, you've got an entirely different port set up where you can log in as a, as an administrator and, and do the things that you need. And if we flip back real quick to those IP filtering rules, since you've got a different port la, uh, for administrator, you can control from what sites someone can log in to that port. So basically you can say, I can allow users into the user CH root cage from anywhere, um, because I have no control as to where my friends may actually want to log in from. Or I can limit, limit them to logging in from machines I know they have accounts on. But for logging in, uh, in that, uh, the real root of the, the directory tree, I know that I really only want people to get in from, um, my disorg account, my remark.org account, and, and maybe my DSL address. So I can lock it down to, to those three systems and prevent, prevent people from, from getting in. Or I can just leave it as, if you want to administrate the machine, use console. And just not allow any network access to the root of the tree, but at the same time we still have people able to log in to do work. As I mentioned, we can, uh, scan for, for activity of, uh, of maliciously users attempting to do things, even if they have an account. Um, there's a lot of ways you can, you can detect this. You've got scanners, um, locking down what, what executables they can actually run. Um, this kind of reeks of, of big brother, so I'm really, really hesitant to actually even endorse this. Um, if you're working for a, a corporation that has a, a very well-written security policy saying this is what you're allowed to do, this is what you're not allowed to do, if you do something you're not allowed to do, you're fired. Um, you might be able to be, have a better chance of getting away with scanning, uh, the interactive traffic to, to find out what people are doing and logging, shutting down connections as appropriate. Um, other new feature I've seen in the, uh, in a B-level secure system is, uh, the kernel keeps track of what network interfaces you're talking to. And if you attempt to, to bind to, to more than one network interface, it can detect this and kill off that process and then log who, what, and when attempted this violation. So basically, if you've got a system that's a firewall and basically you're authorized to log into that, uh, internally to manage some content, um, you're coming in from the internal address, you can go in and say, okay, I can log in, I can do my work, but you wouldn't be able to set up a daemon that listens on both the internal and the external to allow it to pass any sort of traffic. So you'd always have to do this, if you're trying to, to move any content in and out, you'd have to do a, a sort of a bounce. Move the content onto the machine, then move the content, uh, off and you've got better control over what's going on by, by adding that additional restriction. Um, other things that may want, that could be, uh, done in the future that just aren't really set up, uh, smoothly right now is additional login restrictions where you're controlling who can log in, from where, when. Um, basically, uh, time-based, location-based logging in, um, without filtering, uh, at the, uh, the IP level. Basically you say, okay, it's okay for, for Joe to log in from home after 5, but before 9 a.m. No problem, he works from home at that time. It's cool, but we don't want to let him log in remotely from, um, 9 to 5. We want him to be here in the office doing his job. So that's, that's an additional, uh, direction for the future. Any questions? Sorry. So. Back there. Pardon? I'm on the initial stages of packaging this for general consumption. Um, the machine that I described, SDF1, is it set up this way? It's been set up that way for, um, quite some time now. And I haven't had too many user complaints. Uh, the only thing that has really come up is it would be really nice if we had Pico. So that's, that's been, like, the only comment on that. Any other questions? So. Occasionally, you, you enter a situation where your firewall just isn't enough. So you, you really have to take it to, to the, uh, the next level. This may be a little hard to see, but if you talk to John afterwards, um, that's a GE minigun. And... That's... That's a really cool drawing. You'd probably be blown back a bit if you actually, if you actually fired that, but I'd like to see it. I'd like to see the malicious user he was targeting, too. So, if you're interested in the shirt, back to John. Any other questions? How would you compare pre-BSD with BSD, net BSD, whatever? I would compare it as, uh, Judaism, Hinduism, Christianity. It's, it's, it's, I mean, it gets down to, to a religious war. Um... I've had lots of luck with, uh, with net BSD. Um, I've been running it since I was probably 93, 94. I probably still have 0.8 install floppies floating around, which is one of the first publicly consumable versions. Um... That was well before the, the open BSD split. Um... Net BSD runs on currently 16 different hardware architectures, so pretty much it's almost, it's got a 32-bit CPU or greater and an MMU. You've got a good chance of it running or getting it running without too, too much work. Um... As far as free BSD, their, their goal used to be the best optimized, uh, free BSD, free version of a, of a BSD for the Intel platform. Um... Linux, unfortunately, it's just, it's just way too, too diversified. Some of its strengths have really contributed to, to some of its weaknesses. Um... Yes, it's got a lot of, a lot of drivers available for it because you've got a lot of people writing drivers for it. Unfortunately, YouTube, we do have a lot of people writing drivers for it, and so the code quality may not be the, uh, the same, uh, across the board. Also... Pardon? From the firewall standpoint, um... There's a lot of driver sharing between, uh, like free BSD and, and Net BSD. Um... I know OpenBSD is, is in there looking at the same code as well. Um... They're all BSD stack derived. Um... I don't know what Linux did to the BSD code when they moved it into, into their kernel, but they've been having a lot of problems with it. Um... I know, um, NFR was having, having issues with, uh, with running on, on Linux because the stack just wasn't up to it going at full speed. So Linux may not be the best option, uh, in light of that. Um... I haven't had a chance to, to actually test that out. Um... But that's something I have heard. Um... But there were issues with the, with the Linux stack. So, um, each is his own. But that, that may be a potential issue. Does that sort of answer your question? Anybody else? Questions? Comments? More beer? Okay. Uh, thank you. If you have any additional, uh, questions or longer questions, feel free to come on out. Bye. Bye. Bye. Bye. Bye.