1 00:00:01,780 --> 00:00:09,240 Welcome to the annual DEFCON convention. This meeting was held in exciting Las Vegas, Nevada from July 9th through the 11th, 1999. 2 00:00:09,940 --> 00:00:13,040 We asked Dee to set up a firewall gateway. 3 00:00:20,120 --> 00:00:26,200 If you missed, maybe like you're here sitting listening to me talk about firewalls, gateways, and actually secured servers 4 00:00:26,200 --> 00:00:30,380 because you're dealing with like pretty much a lot of the same concepts by that point. 5 00:00:31,520 --> 00:00:41,580 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, 6 00:00:42,070 --> 00:00:49,340 and it runs on a lot more platforms stably under one source base. 7 00:00:54,540 --> 00:00:55,900 You can't see it. 8 00:00:56,200 --> 00:00:57,120 It's a work in progress. 9 00:01:06,680 --> 00:01:11,760 Anyway, it's a work in progress, which means that things are still under development. 10 00:01:11,980 --> 00:01:19,020 I'm still working on scripts to automate things, still fine-tuning and getting examples set up, 11 00:01:19,380 --> 00:01:26,100 and eventually this will all be on a website so you can take a look at how this is. 12 00:01:26,100 --> 00:01:33,320 This is all laid out, and you can actually really easily see the example code, example configuration. 13 00:01:41,620 --> 00:01:45,600 Yes, BSD is a, I mean, it's Berkeley-derived code. 14 00:01:46,120 --> 00:01:47,540 It is open source. 15 00:01:47,840 --> 00:01:52,760 It is underneath the Berkeley copyright, not the GnuP public license. 16 00:01:53,700 --> 00:01:55,020 And, um... 17 00:01:56,100 --> 00:02:05,100 I actually prefer the Berkeley copyright versus the Gnu public license just due to the way the Gnu license is set up 18 00:02:05,100 --> 00:02:09,100 as far as getting other companies interested and so forth. 19 00:02:10,160 --> 00:02:11,320 Does that answer your question? 20 00:02:18,220 --> 00:02:20,320 Theoretically, a lot of the concepts are the same. 21 00:02:20,460 --> 00:02:23,540 How you might go about implementing it may or may not be the same. 22 00:02:23,680 --> 00:02:24,240 I'm not... 23 00:02:24,240 --> 00:02:26,080 When I say it's targeting NetVSD... 24 00:02:26,080 --> 00:02:38,440 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, 25 00:02:38,820 --> 00:02:42,520 I'm not going to know how to do the equivalent because I don't run pico-bsd. 26 00:02:43,300 --> 00:02:49,640 So, that's why the slides actually say NetVSD because that's the platform that I actually did this on. 27 00:02:58,680 --> 00:02:59,840 So about intuitive manual milling... 28 00:02:59,840 --> 00:03:01,380 No, this is actually... 29 00:03:01,380 --> 00:03:02,580 Actually hold on. 30 00:03:02,640 --> 00:03:04,220 Let me see what I can do. 31 00:03:05,240 --> 00:03:05,820 With... 32 00:03:06,980 --> 00:03:07,560 ... 33 00:03:07,560 --> 00:03:08,640 ... 34 00:03:08,640 --> 00:03:08,700 Um... 35 00:03:08,700 --> 00:03:14,440 This slide... 36 00:03:14,440 --> 00:03:15,000 ... 37 00:03:16,000 --> 00:03:16,580 ... 38 00:03:19,820 --> 00:03:22,840 and yes, I want to include this soon... 39 00:03:22,840 --> 00:03:23,680 ... 40 00:03:41,820 --> 00:03:47,820 Okay, firewall versus gateway versus secure server, basically this is all depending on 41 00:03:47,820 --> 00:03:49,160 the purpose of the machine. 42 00:03:49,820 --> 00:03:54,420 One of the key things you want to avoid is overloading the purpose of the machine. 43 00:03:54,420 --> 00:03:58,880 If you're putting a single machine out on the network, you don't necessarily want to 44 00:04:00,480 --> 00:04:02,800 have that one machine do everything. 45 00:04:03,820 --> 00:04:06,960 You basically want to isolate it by task, if at all possible. 46 00:04:08,160 --> 00:04:15,040 By the time you get down to a personal server, trying to locate four or five machines out 47 00:04:15,040 --> 00:04:21,060 on the net simultaneously, each doing their own function, may not be feasible, and actually 48 00:04:21,060 --> 00:04:24,400 some of the topics I cover help isolate you. 49 00:04:24,400 --> 00:04:30,660 So you want to isolate down multiple functionalities on the same machine and protecting individual 50 00:04:31,400 --> 00:04:37,400 functionalities from each other, but generally you want to try to avoid overloading a particular 51 00:04:37,400 --> 00:04:41,760 machine such that if something gets compromised in one area, you lose the whole thing. 52 00:04:46,900 --> 00:04:51,740 As you're building these machines, yeah, you can use NetBSD for a firewall. 53 00:04:52,380 --> 00:04:54,380 If you're a corporate entity, you can use NetBSD for a firewall. 54 00:04:54,400 --> 00:04:59,080 If you've got to look at those threat levels and the cost versus the threat, if you've 55 00:04:59,080 --> 00:05:05,540 got a lot of information or you need a lot of reputation capital that needs to be protected, 56 00:05:05,800 --> 00:05:10,560 you probably don't want to use any Unix-based firewall. 57 00:05:10,980 --> 00:05:17,200 You probably want to give Cisco a call and go out and buy a PIX, basically because that's 58 00:05:17,200 --> 00:05:18,460 all it does. 59 00:05:18,760 --> 00:05:21,220 It protects your machine. 60 00:05:21,280 --> 00:05:22,380 It's a firewall. 61 00:05:22,560 --> 00:05:23,300 It's dedicated. 62 00:05:24,440 --> 00:05:28,320 And if you're a major corporation, you may want to go that route. 63 00:05:29,100 --> 00:05:32,080 It's all based on cost versus threat models. 64 00:05:38,320 --> 00:05:43,120 Basically, most people think of firewalls as you're out there protecting some machine 65 00:05:43,120 --> 00:05:47,240 or some service on the inside from attacks on the outside. 66 00:05:47,500 --> 00:05:53,400 So you're expecting people on one side coming in and attacking on the inside. 67 00:05:54,540 --> 00:05:55,860 And there's no whiteboard. 68 00:05:59,540 --> 00:06:05,260 In order for people to actually get work done when you've got a firewall in place, you've 69 00:06:05,260 --> 00:06:08,520 got to allow various services to be able to pass through that. 70 00:06:09,660 --> 00:06:14,760 If you don't, people are going to attempt to find ways around the firewall and open 71 00:06:14,760 --> 00:06:20,360 up other security holes, which basically undoes your carefully laid plans. 72 00:06:22,420 --> 00:06:24,220 Users are very tenacious. 73 00:06:24,240 --> 00:06:24,380 We're not going to do that. 74 00:06:24,400 --> 00:06:26,340 They're going to do whatever they want to do when it comes to what they want to do, 75 00:06:27,120 --> 00:06:31,180 so especially in a corporate environment, you've got to have mechanisms in place to 76 00:06:31,180 --> 00:06:36,300 ensure that what you're doing and what you're blocking and what you're allowing is what 77 00:06:36,300 --> 00:06:37,100 the users need. 78 00:06:38,320 --> 00:06:42,040 There's times when, yes, users may want a particular thing, but you have to say no. 79 00:06:42,740 --> 00:06:47,040 You need to have a corporate policy and effect that says you can say no, otherwise, they're 80 00:06:47,040 --> 00:06:49,240 going to try to go around it, and there's nothing you can really do. 81 00:06:51,900 --> 00:06:52,340 Okay. 82 00:06:52,620 --> 00:06:52,760 Okay. 83 00:06:53,940 --> 00:06:54,380 Thanks. 84 00:06:54,400 --> 00:07:00,380 Basically, you've got this machine sitting in between two networks and there's at times 85 00:07:00,380 --> 00:07:05,960 where you need to allow the inside to get out into the open area and sometimes you need 86 00:07:05,960 --> 00:07:09,300 the outside to have the ability to get in. 87 00:07:09,960 --> 00:07:14,640 If you've got your personal machines fireballed off on the internet, it works really good 88 00:07:14,640 --> 00:07:16,520 when you're at home sitting right in front of it. 89 00:07:18,620 --> 00:07:23,860 But when you go out and you're roaming, you've got your laptop and you've got your 90 00:07:23,860 --> 00:07:30,380 ricochet, whatever wireless or remote connectivity means, and you suddenly realize that you've 91 00:07:30,380 --> 00:07:34,620 left a phone number at home and it's sitting on your machine at home, you tend to really, 92 00:07:34,680 --> 00:07:38,620 really want to be able to log into your home machine and get at that number. 93 00:07:39,680 --> 00:07:45,520 So there are mechanisms to allow you to get back into your machine behind the firewall 94 00:07:45,520 --> 00:07:45,880 securely. 95 00:07:48,880 --> 00:07:53,840 A lot of times, if you've got multiple machines on the inside, you may want to set up a 96 00:07:53,840 --> 00:07:55,100 proxy servers. 97 00:07:55,400 --> 00:07:58,000 Most common is the web proxies. 98 00:07:58,840 --> 00:08:01,340 This also helps with caching and so forth. 99 00:08:01,560 --> 00:08:08,120 And a lot of times, most corporations will locate this on separate machines to not bog 100 00:08:08,120 --> 00:08:09,960 down the actual firewall machine itself. 101 00:08:10,540 --> 00:08:17,520 As home users, you can consolidate this into one machine and, especially in the case of 102 00:08:17,520 --> 00:08:21,780 home users, unless you've got nice fast cable modems, you may want that caching, if you've 103 00:08:21,780 --> 00:08:22,960 got a lot of people on the inside. 104 00:08:23,840 --> 00:08:26,280 So you can get that same site. 105 00:08:28,200 --> 00:08:32,980 There's a couple different levels that we're going to talk about as far as dealing with 106 00:08:32,980 --> 00:08:34,300 what you're firewalling. 107 00:08:40,160 --> 00:08:41,340 Okay, who did that? 108 00:08:43,260 --> 00:08:44,000 Hear what? 109 00:08:47,740 --> 00:08:48,240 Cool. 110 00:08:51,520 --> 00:08:53,820 There's some routing you can do to help. 111 00:08:54,780 --> 00:09:02,700 You can have your firewall routing different packets into different networks and ensuring 112 00:09:02,700 --> 00:09:04,720 that that traffic goes to its destination. 113 00:09:06,340 --> 00:09:13,780 Filters, you can start protecting things at the IP level, not allowing certain traffic 114 00:09:13,780 --> 00:09:18,400 to go to certain machines on the inside, but allowing the rest of the traffic to go to 115 00:09:19,400 --> 00:09:20,420 other machines. 116 00:09:20,420 --> 00:09:28,340 And this basically cuts down on the number of attacks people can hit on those machines. 117 00:09:28,760 --> 00:09:38,020 And in the case of small corporations, small offices, it will help prevent individual users 118 00:09:38,020 --> 00:09:42,720 from starting to run their own programs and their own machines that allow access into 119 00:09:42,720 --> 00:09:44,060 your network. 120 00:09:44,780 --> 00:09:50,400 A common thing is for people to run remote access servers on their own machines. 121 00:09:50,400 --> 00:09:56,860 Not tell anyone in the IS department, just so they can log in from home. 122 00:09:57,440 --> 00:10:04,640 Same thing applies to people setting up modems on their personal workstations, to allow people 123 00:10:04,640 --> 00:10:05,160 to dial in. 124 00:10:05,240 --> 00:10:11,940 That immediately bypasses any firewall you can put up, and that's really dangerous because 125 00:10:11,940 --> 00:10:16,340 it doesn't take much now for a user to set something like that up. 126 00:10:16,440 --> 00:10:20,380 It's a few mouse clicks under Windows, and suddenly anything goes. 127 00:10:20,400 --> 00:10:25,600 Anybody can dial in to that workstation and have access to your internal network, and 128 00:10:25,600 --> 00:10:28,300 a firewall will do absolutely nothing to protect that. 129 00:10:32,340 --> 00:10:45,040 You can actually have TCP wrappers to watch what's going on and determine what's connecting 130 00:10:45,040 --> 00:10:46,260 to what service. 131 00:10:47,500 --> 00:10:53,300 NetBSD actually has TCP wrappers built in, so it's something that comes with the OS. 132 00:10:53,920 --> 00:10:59,120 As far as filtering, IP filtering is built in and ships with the OS, so it's like right 133 00:10:59,120 --> 00:11:00,220 there, out of the box. 134 00:11:00,340 --> 00:11:05,980 You can start writing rule sets and so forth to actually deal with that, and you don't 135 00:11:05,980 --> 00:11:07,960 have to worry about downloading additional software. 136 00:11:08,100 --> 00:11:10,320 It's all right on the box from the beginning. 137 00:11:14,320 --> 00:11:16,240 By writing a Google IP address, you can actually set up your own network. 138 00:11:16,240 --> 00:11:19,540 If you write rule sets, you can really cut down on the number of attacks. 139 00:11:21,540 --> 00:11:22,140 Scanners. 140 00:11:22,340 --> 00:11:29,920 It is actually possible to go out and get software that will look at TCP streams coming 141 00:11:29,920 --> 00:11:33,780 in and analyze them for certain textual sequences. 142 00:11:35,060 --> 00:11:41,160 A lot of times, they will look for the string rootkit and set off all sorts of alarms and 143 00:11:41,160 --> 00:11:42,060 kill the connection. 144 00:11:42,400 --> 00:11:46,220 Basically, if it sees tar, it's like, oh, there's a problem. 145 00:11:46,220 --> 00:11:47,380 There's a tar.xf rootkit. 146 00:11:48,040 --> 00:11:49,080 It's like, wait a minute. 147 00:11:49,240 --> 00:11:50,340 Something's wrong here. 148 00:11:50,620 --> 00:11:57,300 Someone's unpacking a rootkit from a remote site on an internal machine, kill off this 149 00:11:57,300 --> 00:12:01,520 connection, log the attempt, and notify someone. 150 00:12:02,360 --> 00:12:07,200 There's actually software out there that will do real-time analysis of the streams going 151 00:12:07,200 --> 00:12:08,620 through a machine. 152 00:12:10,660 --> 00:12:15,220 Personally, I'm opposed to that just due to privacy considerations. 153 00:12:15,960 --> 00:12:16,200 It's a good thing. 154 00:12:16,220 --> 00:12:21,400 If you're running SSH like you all should be, your streams going through your firewall 155 00:12:21,400 --> 00:12:22,420 are encrypted anyway. 156 00:12:23,140 --> 00:12:25,460 Running that sort of scanner is not going to work. 157 00:12:28,100 --> 00:12:32,800 Logging is also very important because we can collect and look at and have available 158 00:12:32,800 --> 00:12:37,400 at our fingertips all the data that's going through the machine constantly, but if we 159 00:12:37,400 --> 00:12:41,460 don't do anything with it, if we don't do the correct things with it, it's absolutely 160 00:12:41,460 --> 00:12:41,960 useless. 161 00:12:43,020 --> 00:12:46,200 The key point is if you log into a machine and you don't have access to the data, you 162 00:12:46,200 --> 00:12:48,020 can log to the machine itself. 163 00:12:48,240 --> 00:12:51,460 If it ever gets compromised, people can mess with the logs. 164 00:12:51,720 --> 00:12:59,540 What you want to do is set up another machine internally, highly locked down, that is basically 165 00:12:59,540 --> 00:13:00,580 a log server. 166 00:13:00,980 --> 00:13:07,860 The only thing it does is it takes syslog messages and writes them to disk. 167 00:13:08,480 --> 00:13:16,100 I've actually seen cases where they've gone to the extreme since syslog is UDP based and 168 00:13:16,100 --> 00:13:17,420 doesn't require an ACK. 169 00:13:17,600 --> 00:13:23,580 They've actually taken machines that are plugged into the network via the AUI connectors, the 170 00:13:23,580 --> 00:13:29,640 old style connectors, and have cut off the transmit pin from the machine so the machine 171 00:13:29,640 --> 00:13:32,160 could not possibly talk back to the network. 172 00:13:32,500 --> 00:13:36,940 The only thing that can happen is that machine can receive UDP packets. 173 00:13:39,160 --> 00:13:44,260 There is no way to really break into a machine like that because the only thing you can fire 174 00:13:44,260 --> 00:13:45,080 at it is UDP. 175 00:13:45,360 --> 00:13:46,080 You're never going to get it back. 176 00:13:46,100 --> 00:13:47,160 You're never going to get a TCP connection. 177 00:13:47,440 --> 00:13:48,900 You're never going to get a response back. 178 00:13:51,220 --> 00:13:55,440 And so you're really, really limiting what can be done. 179 00:13:55,600 --> 00:14:00,960 The worst case in that is someone can attempt to try to fill up the log disk on that machine 180 00:14:01,780 --> 00:14:04,180 and then try more malicious attacks. 181 00:14:05,440 --> 00:14:07,700 But disk space is very, very cheap. 182 00:14:08,320 --> 00:14:13,420 You can go out and get 10 plus gigs for under 200 bucks. 183 00:14:13,420 --> 00:14:18,880 So trying to fill up that much space before someone notices is very, very difficult. 184 00:14:19,480 --> 00:14:22,280 But the main point is logging is very important. 185 00:14:27,800 --> 00:14:28,360 Routing. 186 00:14:30,960 --> 00:14:36,860 A lot of sites will only need to set up static tables as far as the routing of their internal 187 00:14:36,860 --> 00:14:37,240 network. 188 00:14:37,940 --> 00:14:41,500 Most people will only have one connection to the outside world. 189 00:14:41,500 --> 00:14:44,220 And so static tables are fine. 190 00:14:45,540 --> 00:14:50,640 If you're on a larger corporate-style network, we may have multiple paths to the outside 191 00:14:50,640 --> 00:14:51,020 world. 192 00:14:51,600 --> 00:14:53,920 Maybe running dynamic routing protocols. 193 00:14:54,200 --> 00:14:59,980 And one of the key things you've got to watch for is various poisonings of your routing 194 00:14:59,980 --> 00:15:00,400 tables. 195 00:15:01,880 --> 00:15:08,320 At home, I actually had a little bit of a problem in Fremont a few months back when 196 00:15:08,320 --> 00:15:10,960 a user broadcast a BGP packet. 197 00:15:11,040 --> 00:15:11,480 It was a BGP packet. 198 00:15:11,480 --> 00:15:12,240 And then the user was like, oh, it's in the internet. 199 00:15:12,420 --> 00:15:14,480 I can't get the BGP packet out to the routers. 200 00:15:14,560 --> 00:15:19,140 That basically told them to get to anywhere in the world, you go to that machine. 201 00:15:20,920 --> 00:15:23,000 It's pretty much shut down Fremont. 202 00:15:25,760 --> 00:15:32,860 Network address translation, NAT, is very common amongst home users and small offices, 203 00:15:33,080 --> 00:15:39,100 basically turning a single IP address or a small handful of IP addresses that were given 204 00:15:39,100 --> 00:15:41,460 to you by your service provider into a DBA. 205 00:15:41,460 --> 00:15:43,280 a fairly large pool. 206 00:15:45,800 --> 00:15:47,300 In my bedroom, 207 00:15:47,460 --> 00:15:49,400 I've got probably eight or nine 208 00:15:49,400 --> 00:15:49,700 machines. 209 00:15:51,200 --> 00:15:53,420 My network connection, they've given me 210 00:15:53,420 --> 00:15:54,940 one IP address. 211 00:15:57,400 --> 00:15:59,640 It's working just fine for me. 212 00:15:59,920 --> 00:16:01,280 I've had no problems with it. 213 00:16:03,700 --> 00:16:04,640 Works great. 214 00:16:06,260 --> 00:16:07,580 You can actually deal 215 00:16:07,580 --> 00:16:08,600 with world sets. 216 00:16:09,940 --> 00:16:11,360 I'm so dead by the end of it. 217 00:16:18,340 --> 00:16:21,140 Thank you. 218 00:16:44,080 --> 00:16:45,520 Yeah, it's a little bit 219 00:16:45,520 --> 00:16:47,260 more difficult, but a lot of the 220 00:16:47,260 --> 00:16:48,640 cache poisons I've seen, 221 00:16:48,760 --> 00:16:51,120 it's theoretically possible 222 00:16:51,120 --> 00:16:52,780 on a single pipe 223 00:16:52,780 --> 00:16:53,720 out. 224 00:16:55,440 --> 00:16:57,260 Actually, I don't know 225 00:16:57,260 --> 00:16:59,080 what set of slides they actually used 226 00:16:59,080 --> 00:17:01,100 earlier, but I've worked with 227 00:17:01,100 --> 00:17:02,940 both Pete and 228 00:17:02,940 --> 00:17:05,100 Pankus on presentations before, 229 00:17:05,220 --> 00:17:06,620 so I've seen a lot of those slides. 230 00:17:07,360 --> 00:17:09,120 It's possible with a single 231 00:17:09,120 --> 00:17:09,720 pipe. 232 00:17:12,320 --> 00:17:12,800 Thank you. 233 00:17:12,800 --> 00:17:15,540 In a situation like this where you're 234 00:17:15,540 --> 00:17:16,500 writing data in proxy, 235 00:17:16,720 --> 00:17:18,440 I don't have a dialogue or something. 236 00:17:18,600 --> 00:17:19,400 That's not going to be a problem 237 00:17:19,400 --> 00:17:20,580 processing that machine. 238 00:17:21,420 --> 00:17:23,660 Is that going to put a load on your 239 00:17:24,300 --> 00:17:25,020 server that 240 00:17:25,020 --> 00:17:27,200 you might experience 241 00:17:27,900 --> 00:17:29,100 going on at some point? 242 00:17:30,340 --> 00:17:31,380 Not really, because 243 00:17:31,380 --> 00:17:33,280 with NAT, you're only changing 244 00:17:33,280 --> 00:17:35,520 a few bits, and you're 245 00:17:35,520 --> 00:17:37,700 doing some checksum 246 00:17:39,600 --> 00:17:40,080 recalculation 247 00:17:40,080 --> 00:17:41,200 at one level higher. 248 00:17:41,460 --> 00:17:42,480 But you're doing a lot of that 249 00:17:43,520 --> 00:17:45,520 calculations and twiddling 250 00:17:45,520 --> 00:17:45,920 of bits 251 00:17:45,920 --> 00:17:48,840 the next layer down 252 00:17:49,280 --> 00:17:50,880 anyway, because you're changing 253 00:17:52,840 --> 00:17:53,360 you've got 254 00:17:53,360 --> 00:17:55,320 to drop it out on the wire on the Ethernet, so you're 255 00:17:55,320 --> 00:17:57,200 writing a new MAC address into it. 256 00:17:57,540 --> 00:17:59,320 So you're changing fields anyway. 257 00:18:00,320 --> 00:18:00,980 So it's not going to 258 00:18:00,980 --> 00:18:03,400 work to be done, so yes, 259 00:18:03,440 --> 00:18:05,140 it's going to add a load, but 260 00:18:05,140 --> 00:18:06,720 it's not all that 261 00:18:08,340 --> 00:18:09,400 significant. I've seen 262 00:18:10,940 --> 00:18:11,340 486s, 263 00:18:11,460 --> 00:18:13,560 doing IPSec, that are 264 00:18:13,560 --> 00:18:15,040 saturating 10 megabit links. 265 00:18:16,480 --> 00:18:17,760 So, granted 266 00:18:17,760 --> 00:18:18,780 that was like single DES, 267 00:18:19,720 --> 00:18:21,560 but you can't buy 268 00:18:21,560 --> 00:18:23,640 a 486 anymore, so 269 00:18:23,640 --> 00:18:25,580 anything you're going to find now 270 00:18:25,580 --> 00:18:27,480 you shouldn't have any problem 271 00:18:27,480 --> 00:18:28,780 even when you start trying to do 272 00:18:29,700 --> 00:18:31,660 IPSec and encrypting everything. 273 00:18:38,120 --> 00:18:39,240 IP filters, 274 00:18:39,560 --> 00:18:40,700 this is the 275 00:18:40,700 --> 00:18:44,700 core of what you need to do in order to protect a machine. 276 00:18:45,200 --> 00:18:48,500 You've got to have a really good set of filter rules 277 00:18:49,180 --> 00:18:50,400 to make sure that 278 00:18:51,160 --> 00:18:53,460 what's getting through is what you want to get through. 279 00:18:55,320 --> 00:18:58,100 Basically, if you've got a set of IP filter rules 280 00:18:59,260 --> 00:19:01,780 in the file that contains those rules, 281 00:19:02,620 --> 00:19:06,320 about half of those lines should be rules. 282 00:19:06,600 --> 00:19:09,620 The other half of those lines should be textual comments. 283 00:19:09,620 --> 00:19:12,680 It should be exactly what you're trying to accomplish with those rules. 284 00:19:14,600 --> 00:19:18,340 I've seen instances in corporations where 285 00:19:19,580 --> 00:19:22,600 people have, in different departments, have requested 286 00:19:22,600 --> 00:19:24,660 IS, oh well, I need this port open. 287 00:19:24,940 --> 00:19:27,560 And IS has gone in and opened the port. 288 00:19:28,020 --> 00:19:32,260 And the need for that port being open 289 00:19:33,080 --> 00:19:34,860 dies off after several months. 290 00:19:35,140 --> 00:19:38,960 IS has never notified that that port is no longer needed open. 291 00:19:39,040 --> 00:19:39,600 So, you know, 292 00:19:39,620 --> 00:19:43,120 but IS didn't document who requested the port to be opened, 293 00:19:43,220 --> 00:19:44,860 why it's open, 294 00:19:45,140 --> 00:19:48,260 so it gets left in there for basically all eternity. 295 00:19:48,580 --> 00:19:50,560 So someone sits down, says, 296 00:19:50,700 --> 00:19:54,260 okay, fresh start, we're going to lock everything out 297 00:19:54,260 --> 00:19:55,300 and wait for people to complain. 298 00:19:57,200 --> 00:20:01,040 This usually gets IS into a lot of hot water 299 00:20:01,040 --> 00:20:03,860 in, I'd say, 99% of the companies, 300 00:20:03,900 --> 00:20:07,860 because a lot of times those security groups just don't have the political power 301 00:20:07,860 --> 00:20:09,340 within the organization. 302 00:20:09,620 --> 00:20:12,300 to be able to stand up to marketing. 303 00:20:13,300 --> 00:20:15,060 The company is driven by marketing 304 00:20:15,060 --> 00:20:17,700 and a lot of times they can, 305 00:20:17,820 --> 00:20:19,300 oh well, we need this. 306 00:20:19,460 --> 00:20:21,720 And management will say, 307 00:20:21,820 --> 00:20:24,040 okay, well, you guys make this happen. 308 00:20:24,120 --> 00:20:25,120 Allow them to do this. 309 00:20:25,620 --> 00:20:28,380 And there's not, a lot of companies just can't stand up to that. 310 00:20:28,940 --> 00:20:31,720 But your IP filter rules are really important 311 00:20:31,720 --> 00:20:35,400 in what you're protecting and how you protect it. 312 00:20:35,540 --> 00:20:38,140 So you really have to use those to lock down 313 00:20:38,140 --> 00:20:39,640 your system. 314 00:20:40,680 --> 00:20:42,580 Basically, the rule of thumb is 315 00:20:43,280 --> 00:20:44,400 deny everything 316 00:20:45,040 --> 00:20:46,420 and then only allow through 317 00:20:46,420 --> 00:20:48,520 what you want to allow through. 318 00:20:49,460 --> 00:20:51,120 There's a lot of rule sets out there 319 00:20:51,120 --> 00:20:54,060 that are attempting to block certain ports. 320 00:20:54,860 --> 00:20:56,160 If you know what you're doing, 321 00:20:56,240 --> 00:20:59,180 you can get away with just blocking certain ports. 322 00:21:01,480 --> 00:21:04,040 However, the safest bet is to 323 00:21:04,720 --> 00:21:07,840 deny everything, pass through what you want passed through. 324 00:21:11,960 --> 00:21:12,920 Like I said, 325 00:21:13,080 --> 00:21:16,500 I accidentally jumped ahead of the slide there. 326 00:21:16,620 --> 00:21:17,980 Like I said, comment what is allowed, 327 00:21:18,160 --> 00:21:19,360 when, by whom, 328 00:21:19,480 --> 00:21:22,500 and any authority that said this has to happen. 329 00:21:23,340 --> 00:21:24,780 An additional point is 330 00:21:24,780 --> 00:21:27,960 note that if that rule is ever to expire, 331 00:21:28,300 --> 00:21:31,100 that is if we need this port open 332 00:21:31,100 --> 00:21:34,480 from now until next February, 333 00:21:34,660 --> 00:21:37,420 note that it can be closed off next February. 334 00:21:37,420 --> 00:21:39,760 That way, you don't end up with this huge file 335 00:21:39,760 --> 00:21:41,160 with all sorts of ports open 336 00:21:41,160 --> 00:21:43,620 and nobody knows how long it's supposed to be opened. 337 00:21:44,220 --> 00:21:46,220 You can go back and deal with 338 00:21:46,220 --> 00:21:47,500 cleaning up your rule sets. 339 00:21:48,340 --> 00:21:49,880 You also want to make sure that 340 00:21:51,760 --> 00:21:53,360 when you're opening up a port, 341 00:21:53,540 --> 00:21:57,160 you find out what that port needs to go, 342 00:21:57,200 --> 00:21:58,400 what machine it needs to go to. 343 00:21:58,660 --> 00:22:01,520 So you don't want to open up a port 344 00:22:01,520 --> 00:22:04,120 on all the machines going through 345 00:22:04,120 --> 00:22:06,600 because that can be used to attack other machines 346 00:22:06,600 --> 00:22:08,000 that may not be running that server, 347 00:22:08,180 --> 00:22:09,640 or maybe having other resources 348 00:22:09,640 --> 00:22:11,240 and other types of servers 349 00:22:11,240 --> 00:22:12,840 running at that port address, 350 00:22:13,720 --> 00:22:15,800 which can then be attacked 351 00:22:16,760 --> 00:22:19,160 because one group needed a port open 352 00:22:19,160 --> 00:22:20,640 for only their servers, 353 00:22:20,680 --> 00:22:22,100 but it was opened up for everybody's. 354 00:22:26,180 --> 00:22:28,980 TCP wrappers basically allow you to deal with 355 00:22:30,000 --> 00:22:31,920 monitoring who's connecting to what 356 00:22:31,920 --> 00:22:32,920 and dealing with services 357 00:22:34,900 --> 00:22:36,580 and basically give you a little bit 358 00:22:36,600 --> 00:22:39,640 of another layer of denying control. 359 00:22:40,100 --> 00:22:42,460 This is at the next layer up. 360 00:22:42,960 --> 00:22:44,920 Basically, you're trying to establish a connection 361 00:22:44,920 --> 00:22:47,660 rather than just looking at the raw packets. 362 00:22:48,180 --> 00:22:50,060 This gives you better control 363 00:22:50,060 --> 00:22:52,420 over application-based security 364 00:22:52,420 --> 00:22:56,160 and wording things. 365 00:22:57,180 --> 00:22:59,120 Whether you write rule sets 366 00:22:59,120 --> 00:23:00,860 and deal with rules on a TCP wrapper layer, 367 00:23:00,980 --> 00:23:02,160 just logging what's happening 368 00:23:02,160 --> 00:23:03,600 versus blocking ports, 369 00:23:03,920 --> 00:23:05,440 it's up to your particular implementation. 370 00:23:05,440 --> 00:23:08,620 And what you feel more comfortable with. 371 00:23:16,940 --> 00:23:19,660 Yeah, that would be one way of putting it, 372 00:23:19,740 --> 00:23:21,980 because it's assuming that all your, 373 00:23:22,620 --> 00:23:24,640 well, at least under the BSD kernel, 374 00:23:24,740 --> 00:23:27,480 all your routing and your filter rules 375 00:23:27,480 --> 00:23:29,140 are happening in user land. 376 00:23:29,380 --> 00:23:31,340 It may, I mean, sorry, in kernel space 377 00:23:31,340 --> 00:23:32,680 and other implementations, 378 00:23:32,720 --> 00:23:34,600 some of those packets may be popping up 379 00:23:34,600 --> 00:23:35,800 into user land. 380 00:23:36,120 --> 00:23:38,980 If you know you can deny connections, 381 00:23:40,220 --> 00:23:42,420 you want to, like, get them, 382 00:23:42,480 --> 00:23:44,740 those packets, out of the mix 383 00:23:44,740 --> 00:23:45,800 as soon as possible. 384 00:23:46,100 --> 00:23:49,520 It's less work for your higher-up layers 385 00:23:49,520 --> 00:23:51,720 if you can just eliminate them 386 00:23:51,720 --> 00:23:53,360 as soon as you know you can eliminate them. 387 00:23:58,840 --> 00:24:02,640 As we got scanners looking for bad things happening, 388 00:24:02,640 --> 00:24:05,340 a couple products I want to mention 389 00:24:05,340 --> 00:24:06,220 that's out there. 390 00:24:06,400 --> 00:24:10,140 Port Sentry, which was formerly Abacus Sentry. 391 00:24:10,300 --> 00:24:12,560 You can set this up to start watching 392 00:24:12,560 --> 00:24:14,140 people trying to connect. 393 00:24:14,260 --> 00:24:17,400 This is working off of your IP filter logs. 394 00:24:17,780 --> 00:24:19,640 So if you don't have services running 395 00:24:19,640 --> 00:24:26,040 on 65,531 of your ports, 396 00:24:27,600 --> 00:24:29,260 but you have services running 397 00:24:29,260 --> 00:24:31,580 on just those last remaining four, 398 00:24:32,360 --> 00:24:33,780 you're going to want to be able to detect 399 00:24:33,780 --> 00:24:35,260 if someone's trying to scan you. 400 00:24:35,760 --> 00:24:37,560 You don't want to wait until they stumble 401 00:24:37,560 --> 00:24:39,860 across those four ports that you actually 402 00:24:39,860 --> 00:24:41,060 have something bound to. 403 00:24:41,520 --> 00:24:44,140 You want to see that, hey, 404 00:24:44,320 --> 00:24:47,600 someone's trying to pass packets 405 00:24:47,600 --> 00:24:49,040 on all these other ports 406 00:24:49,040 --> 00:24:50,440 and trying to find out what's open. 407 00:24:51,260 --> 00:24:53,580 So software like Port Sentry 408 00:24:53,580 --> 00:24:57,380 will help you determine what's going on. 409 00:24:58,560 --> 00:24:59,800 Dripwire is actually software 410 00:24:59,800 --> 00:25:01,220 that tends to run on the machine. 411 00:25:02,160 --> 00:25:05,000 It allows you to determine 412 00:25:05,000 --> 00:25:07,140 if the machine has been compromised 413 00:25:07,140 --> 00:25:10,060 by doing checksums of the binaries 414 00:25:10,060 --> 00:25:12,240 and looking for things that have been replaced, 415 00:25:12,840 --> 00:25:14,020 trojaned, et cetera. 416 00:25:15,160 --> 00:25:17,740 Content scanning, like I mentioned earlier, 417 00:25:18,100 --> 00:25:19,620 you're looking at the individual streams, 418 00:25:19,860 --> 00:25:22,380 looking for people typing suspicious 419 00:25:22,380 --> 00:25:25,960 or malicious content through the wire. 420 00:25:26,180 --> 00:25:28,800 Usually these things are fairly flexible 421 00:25:28,800 --> 00:25:31,280 in setting that up so you can determine 422 00:25:31,280 --> 00:25:31,560 what's going on. 423 00:25:31,580 --> 00:25:33,140 What exactly you want to look for. 424 00:25:33,540 --> 00:25:35,700 And it's not limited to just interactive 425 00:25:36,380 --> 00:25:37,560 like telnet sessions. 426 00:25:37,760 --> 00:25:41,260 You can scan basically pretty much any IP stream 427 00:25:41,260 --> 00:25:44,120 looking for this potentially bad content. 428 00:25:46,540 --> 00:25:47,620 Logging, like I mentioned, 429 00:25:47,720 --> 00:25:53,620 the best logging is both remote and secure. 430 00:25:54,060 --> 00:25:56,220 You want to be able to protect that logging machine 431 00:25:56,840 --> 00:25:58,660 because generally you're not going to set up 432 00:25:58,660 --> 00:26:00,040 a logging machine for every machine 433 00:26:00,040 --> 00:26:01,700 you want to attempt to log to. 434 00:26:01,820 --> 00:26:03,780 So you're going to be coalescing 435 00:26:03,780 --> 00:26:05,980 a lot of your logging functions onto one machine. 436 00:26:06,600 --> 00:26:08,820 So you want to make sure that that machine 437 00:26:08,820 --> 00:26:10,200 is really, really secure. 438 00:26:15,960 --> 00:26:17,640 I've got a machine called SD... 439 00:26:17,640 --> 00:26:18,620 Sorry, go ahead. 440 00:26:26,680 --> 00:26:28,860 Yeah, you can actually tell Syslog 441 00:26:28,860 --> 00:26:30,080 to log to a remote machine. 442 00:26:30,220 --> 00:26:34,080 And that's a capability built in. 443 00:26:34,240 --> 00:26:37,720 There is secure versions of Syslog out there 444 00:26:37,720 --> 00:26:39,740 that add additional layers. 445 00:26:39,880 --> 00:26:43,060 So if someone else does manage to compromise 446 00:26:43,060 --> 00:26:43,900 an internal machine, 447 00:26:44,360 --> 00:26:49,260 they can attempt to set up a sniffer or something. 448 00:26:49,740 --> 00:26:51,660 They can block out... 449 00:27:00,120 --> 00:27:00,900 There we go. 450 00:27:02,760 --> 00:27:04,800 It's a little strange to be jumping that far ahead. 451 00:27:05,740 --> 00:27:06,600 Providing services. 452 00:27:06,880 --> 00:27:07,760 So you've got machines out there 453 00:27:07,760 --> 00:27:08,640 that need to do something. 454 00:27:08,840 --> 00:27:10,440 Aside from just having your firewall 455 00:27:10,440 --> 00:27:11,820 to keep protecting your network, 456 00:27:12,020 --> 00:27:14,140 do you need to have machines that need to talk 457 00:27:14,140 --> 00:27:16,320 to the internet as a whole? 458 00:27:17,200 --> 00:27:22,340 Web servers, mail servers, FTP servers, etc. 459 00:27:24,260 --> 00:27:27,740 So in order for any site to be useful, 460 00:27:27,740 --> 00:27:30,620 you've got to be able to offer services 461 00:27:30,620 --> 00:27:31,400 and you've got to do something 462 00:27:31,400 --> 00:27:32,400 to be able to protect them. 463 00:27:34,660 --> 00:27:37,640 With web, it's basically broken down into two categories. 464 00:27:37,860 --> 00:27:38,820 The web service itself, 465 00:27:39,940 --> 00:27:42,380 where people browsing the web will connect 466 00:27:42,380 --> 00:27:44,580 and get pages down. 467 00:27:45,000 --> 00:27:47,500 And the other half of that is content management. 468 00:27:47,860 --> 00:27:50,600 You've got to have some way of dealing with 469 00:27:50,600 --> 00:27:53,600 the web content that's there. 470 00:27:53,800 --> 00:27:55,960 And a lot of times you want to break this off 471 00:27:55,960 --> 00:27:57,060 into two categories. 472 00:27:57,740 --> 00:28:00,160 As far as how you want to lock down the permissions. 473 00:28:04,120 --> 00:28:08,600 Interactive traffic is a hard one to nail down 474 00:28:08,600 --> 00:28:10,140 because you're opening up the system 475 00:28:10,140 --> 00:28:12,320 to allow people to log into it. 476 00:28:12,740 --> 00:28:13,980 And one of the reasons you may want to do this 477 00:28:13,980 --> 00:28:18,440 is for content management of a web server 478 00:28:18,440 --> 00:28:22,140 or an FTP server so that people can update it 479 00:28:22,140 --> 00:28:26,400 and keep it fresh. 480 00:28:26,400 --> 00:28:31,300 Deal with content and other logs there. 481 00:28:32,860 --> 00:28:35,600 The other thing that people may need to have 482 00:28:35,600 --> 00:28:37,160 in direct account on the machine 483 00:28:37,160 --> 00:28:40,760 is for them hopping out either from inside the firewall, 484 00:28:41,920 --> 00:28:44,380 onto the firewall and then out to the outside world 485 00:28:44,380 --> 00:28:46,840 or in some instances you may need to allow people 486 00:28:47,400 --> 00:28:48,580 in through the firewall. 487 00:28:49,220 --> 00:28:51,220 So being able to access resources 488 00:28:51,220 --> 00:28:54,280 both on the outside and on the inside of the firewall, 489 00:28:54,560 --> 00:28:56,320 you may need some sort of an interaction 490 00:28:56,400 --> 00:28:57,360 or interactive capability. 491 00:29:06,420 --> 00:29:07,480 Administrative considerations. 492 00:29:08,160 --> 00:29:10,080 Basically you've got this machine there. 493 00:29:11,180 --> 00:29:13,020 It's going to require some administration 494 00:29:13,020 --> 00:29:14,320 to deal with it. 495 00:29:15,480 --> 00:29:20,480 You need to be able to protect the access 496 00:29:20,480 --> 00:29:23,040 that's required to actually administrate a machine. 497 00:29:23,420 --> 00:29:26,280 Since administration requires additional privilege 498 00:29:27,060 --> 00:29:28,640 you've got to be a lot more careful 499 00:29:28,640 --> 00:29:32,160 about how people who are doing administration 500 00:29:32,160 --> 00:29:34,960 of the machine are going to do it. 501 00:29:36,520 --> 00:29:39,680 If you've got a large machine or a lot of machines 502 00:29:40,260 --> 00:29:42,360 what you would need to do is decide on, 503 00:29:43,640 --> 00:29:45,260 with multiple administrators, 504 00:29:45,540 --> 00:29:47,500 decide on who is going to be doing what 505 00:29:48,740 --> 00:29:51,120 and what they're actually going to need to do 506 00:29:51,120 --> 00:29:53,480 in order to get their job done. 507 00:29:53,480 --> 00:29:56,760 One thing you want to avoid in a corporate environment 508 00:29:57,000 --> 00:29:59,980 is role-oriented or role-based accounts. 509 00:30:00,300 --> 00:30:03,520 Basically an account called web admin. 510 00:30:04,740 --> 00:30:07,660 If you have one account that's called web admin 511 00:30:07,660 --> 00:30:09,740 and you've got five web administrators, 512 00:30:10,860 --> 00:30:15,100 you really don't want to have all of them 513 00:30:15,100 --> 00:30:18,360 trying to log into this one account with one password 514 00:30:18,360 --> 00:30:21,540 because now you've got five people 515 00:30:21,540 --> 00:30:23,300 with one password to one account. 516 00:30:25,440 --> 00:30:29,660 If any individual writes it down on a post-it note, 517 00:30:29,840 --> 00:30:32,020 loses his day runner with it in it, 518 00:30:33,240 --> 00:30:36,120 it's harder to track how that password got compromised 519 00:30:37,140 --> 00:30:40,620 and there's also no accounting of who did what. 520 00:30:41,500 --> 00:30:43,920 If someone decides they want to reorganize 521 00:30:44,380 --> 00:30:48,660 the entire website, there's no trail saying, 522 00:30:48,860 --> 00:30:50,900 oh well, this person came in as administrator, 523 00:30:51,200 --> 00:30:53,040 changed all these directories around. 524 00:30:54,520 --> 00:31:04,840 If you've got an administrator who has multiple duties 525 00:31:04,840 --> 00:31:10,280 and you've decided that he needs multiple access 526 00:31:10,280 --> 00:31:12,920 on both web and FTP, 527 00:31:13,460 --> 00:31:15,600 but you've got other administrators who only need web, 528 00:31:15,680 --> 00:31:17,120 only need FTP, 529 00:31:17,440 --> 00:31:20,260 one solution is to provide them 530 00:31:20,260 --> 00:31:23,180 with their own web administrator 531 00:31:23,480 --> 00:31:28,320 account and then with another FTP administrator account. 532 00:31:28,580 --> 00:31:32,360 So the admin who has to manage multiple services 533 00:31:32,360 --> 00:31:36,180 would have multiple accounts so that he knows that, 534 00:31:36,280 --> 00:31:39,400 okay, he is logging in to do this function. 535 00:31:40,260 --> 00:31:43,900 And it's a little bit more work for the administrator 536 00:31:43,900 --> 00:31:45,640 to deal with the additional passwords, 537 00:31:45,960 --> 00:31:49,400 but at the same time he's not likely to accidentally 538 00:31:49,400 --> 00:31:52,000 do damage to another service area. 539 00:31:59,740 --> 00:32:01,640 So once you actually have all these accounts, 540 00:32:01,860 --> 00:32:03,140 one of the things that you're going to want to do 541 00:32:03,140 --> 00:32:07,860 is reduce the privileges down to what is absolutely needed 542 00:32:07,860 --> 00:32:09,340 to get the job done. 543 00:32:10,540 --> 00:32:12,420 All these people who have their own accounts, 544 00:32:12,540 --> 00:32:15,200 they should not all be root equivalent accounts. 545 00:32:15,320 --> 00:32:16,300 That defeats the purpose. 546 00:32:18,600 --> 00:32:21,600 This is a little harder in Unix-based systems 547 00:32:21,600 --> 00:32:23,380 than systems that have like, 548 00:32:23,480 --> 00:32:26,180 B2 level security, 549 00:32:26,500 --> 00:32:30,000 where you actually have a capabilities-based permissions model 550 00:32:30,000 --> 00:32:32,820 where you don't have a root account 551 00:32:32,820 --> 00:32:35,480 other than an account called root 552 00:32:35,480 --> 00:32:37,680 that just happens to be, by default, 553 00:32:37,720 --> 00:32:39,860 assigned all priorities. 554 00:32:40,220 --> 00:32:42,280 Some of those higher end systems have 555 00:32:42,280 --> 00:32:44,220 neat accounts like backup, 556 00:32:44,480 --> 00:32:48,140 which basically gives read access to all files, 557 00:32:48,360 --> 00:32:50,020 write access to tape drives, 558 00:32:50,300 --> 00:32:51,200 and that's it. 559 00:32:52,660 --> 00:32:55,920 They can't change or modify or create any file they want. 560 00:32:56,020 --> 00:32:57,520 They can read anything. 561 00:32:57,740 --> 00:32:59,040 They can write to a tape drive, 562 00:32:59,780 --> 00:33:01,600 and actually they can read from the tape drive 563 00:33:01,600 --> 00:33:03,720 and write to a restore area, and that's it. 564 00:33:04,660 --> 00:33:06,380 Unfortunately, this hasn't gotten popular 565 00:33:08,260 --> 00:33:10,560 amongst even most of the commercial Unixes, 566 00:33:12,040 --> 00:33:14,920 and it hasn't hit the free OSs yet. 567 00:33:15,280 --> 00:33:17,000 It is something I would like to see 568 00:33:17,000 --> 00:33:18,760 because it would vastly improve security 569 00:33:18,760 --> 00:33:20,180 because you can really lock down 570 00:33:20,180 --> 00:33:21,420 who can do what. 571 00:33:23,240 --> 00:33:24,760 Another thing that you're going to want 572 00:33:24,760 --> 00:33:25,840 to pay attention to, 573 00:33:25,880 --> 00:33:27,160 and there's mechanisms to do this, 574 00:33:27,200 --> 00:33:28,200 is compromise protection. 575 00:33:30,620 --> 00:33:34,000 This is an era where we've got 576 00:33:34,000 --> 00:33:35,380 a lot of free software out there, 577 00:33:35,560 --> 00:33:37,460 and by that same token, 578 00:33:37,660 --> 00:33:39,640 we can't always guarantee the code quality, 579 00:33:39,880 --> 00:33:42,920 so any given version of Apache 580 00:33:42,920 --> 00:33:45,420 may have a bug that allows YouTube 581 00:33:45,420 --> 00:33:48,800 to compromise the root onto the system. 582 00:33:49,980 --> 00:33:52,280 SendMail is notorious for having this problem 583 00:33:52,280 --> 00:33:56,160 where you can break SendMail and get root access. 584 00:33:57,640 --> 00:33:59,900 The problem is once you've got root access 585 00:33:59,900 --> 00:34:02,940 through SendMail in most installations, 586 00:34:03,200 --> 00:34:07,100 you now have root access over the entire machine. 587 00:34:11,800 --> 00:34:13,420 As you're reducing your privileges, 588 00:34:13,720 --> 00:34:15,920 you have to understand that the defaults 589 00:34:15,920 --> 00:34:18,080 may be way too open as far as what permissions 590 00:34:18,080 --> 00:34:19,840 are set on what directories 591 00:34:19,840 --> 00:34:23,580 and how things are set up. 592 00:34:24,740 --> 00:34:26,700 This is done a lot of times because 593 00:34:26,700 --> 00:34:29,460 a lot of the newer users are expecting 594 00:34:29,900 --> 00:34:31,720 to be able to do things easily 595 00:34:31,720 --> 00:34:33,320 with their own accounts, 596 00:34:33,560 --> 00:34:36,740 so rather than really securing a system 597 00:34:36,740 --> 00:34:39,960 and getting tons of email from new users saying, 598 00:34:40,140 --> 00:34:41,480 well, it won't let me do this, 599 00:34:41,680 --> 00:34:45,200 I've actually seen instances where various OS camps 600 00:34:45,200 --> 00:34:47,320 have opened up the security 601 00:34:48,700 --> 00:34:52,660 on the OS just to stop getting email saying, 602 00:34:52,860 --> 00:34:54,300 well, it won't let me do this. 603 00:34:56,160 --> 00:34:59,640 Unfortunately, that's not the best route. 604 00:34:59,700 --> 00:35:02,660 The best route would have been to educate the users 605 00:35:02,660 --> 00:35:04,520 and provide more upfront information saying, 606 00:35:04,720 --> 00:35:06,080 hey, you've got to do this and this first. 607 00:35:08,680 --> 00:35:10,880 So the really big things that we're going to need 608 00:35:10,880 --> 00:35:14,220 to compromise our protection are web and your mailers. 609 00:35:20,940 --> 00:35:23,460 FTP occasionally has had some problems, 610 00:35:23,540 --> 00:35:25,220 but it's not as much. 611 00:35:25,560 --> 00:35:27,780 We still want to attempt to do some compromise protection 612 00:35:27,780 --> 00:35:29,720 for web and send mail. 613 00:35:30,540 --> 00:35:31,960 So how do we do this? 614 00:35:34,220 --> 00:35:37,740 There's a wonderful, wonderful system called chroot. 615 00:35:39,120 --> 00:35:42,900 And with it, we can change what the system will allow 616 00:35:44,120 --> 00:35:47,520 the root of a directory tree to be. 617 00:35:48,400 --> 00:35:52,500 So basically, we've got four, five key areas here. 618 00:35:55,240 --> 00:36:00,200 We've got user space, basically areas of the directory tree 619 00:36:00,200 --> 00:36:01,900 that users need to be able to access 620 00:36:01,900 --> 00:36:05,600 or various applications need to be able to access 621 00:36:05,600 --> 00:36:06,340 to do their job. 622 00:36:06,780 --> 00:36:10,560 We've got things in slash dev that allow things 623 00:36:10,560 --> 00:36:12,820 to communicate within and out of the system. 624 00:36:13,320 --> 00:36:16,160 We've got shared files, which are basically files 625 00:36:16,160 --> 00:36:17,500 that are needed by most users. 626 00:36:17,520 --> 00:36:18,400 We have more than one service, 627 00:36:18,580 --> 00:36:20,380 such as if you're providing web, 628 00:36:22,040 --> 00:36:24,580 the web server needs to be able to access the files. 629 00:36:24,760 --> 00:36:28,260 So does the people who are administrating the content. 630 00:36:31,140 --> 00:36:33,180 VAR is needed in a lot of instances 631 00:36:33,940 --> 00:36:37,020 because, like, you've got your mailers 632 00:36:37,020 --> 00:36:38,940 who are pulling mail in. 633 00:36:39,120 --> 00:36:41,380 They want to be able to write to VAR. 634 00:36:41,540 --> 00:36:44,080 And at the same time, you've got people who are reading mail 635 00:36:44,080 --> 00:36:45,620 who also want to see 636 00:36:45,620 --> 00:36:48,620 the same VAR spool that the mailer sees 637 00:36:48,620 --> 00:36:50,520 so they can actually pick up their mail. 638 00:36:52,020 --> 00:36:58,680 So a neat way of getting users into these ch-rooted cages 639 00:36:58,680 --> 00:37:03,040 is by starting up SSH in its own ch-rooted area. 640 00:37:05,160 --> 00:37:07,700 This will allow any user who logs in 641 00:37:07,700 --> 00:37:09,820 via that particular SSH daemon 642 00:37:10,940 --> 00:37:13,220 to end up in the ch-rooted cage, 643 00:37:14,040 --> 00:37:16,540 which is then very carefully built 644 00:37:16,540 --> 00:37:19,180 to only put into that cage 645 00:37:19,840 --> 00:37:22,120 what is necessary for them 646 00:37:22,120 --> 00:37:24,380 to do what they need to do. 647 00:37:29,100 --> 00:37:33,180 To get things into these ch-rooted cages, 648 00:37:33,400 --> 00:37:37,060 especially like in the shared areas, 649 00:37:38,260 --> 00:37:40,260 our goal is to protect the outside 650 00:37:40,260 --> 00:37:41,660 from being able to access it. 651 00:37:41,660 --> 00:37:44,140 So we've got to take care to deal with permissions, 652 00:37:44,300 --> 00:37:46,640 both the user IDs and the group IDs. 653 00:37:49,540 --> 00:37:52,660 The way we get things into these cages 654 00:37:52,660 --> 00:37:54,840 is their actual disk, 655 00:37:55,120 --> 00:37:56,780 undisked storage lives in another portion 656 00:37:56,780 --> 00:37:57,660 of your directory tree. 657 00:37:58,300 --> 00:38:00,600 What you'll do is make local mounts 658 00:38:00,600 --> 00:38:03,460 from that point in the file system 659 00:38:04,520 --> 00:38:06,240 into the ch-rooted cage. 660 00:38:06,800 --> 00:38:09,040 Sim links will not cross a ch-root boundary, 661 00:38:10,100 --> 00:38:11,420 but if you mount something 662 00:38:11,660 --> 00:38:13,220 inside a ch-rooted area, 663 00:38:13,400 --> 00:38:14,460 it will show up. 664 00:38:15,500 --> 00:38:16,580 By doing this, 665 00:38:16,620 --> 00:38:18,280 we can control exactly what 666 00:38:18,280 --> 00:38:20,640 any individual cage sees. 667 00:38:28,420 --> 00:38:30,300 And as we're mounting... 668 00:38:31,160 --> 00:38:32,680 Oh, this is so not going to work. 669 00:38:34,420 --> 00:38:38,320 As we're mounting these files systems 670 00:38:38,320 --> 00:38:40,080 into these ch-rooted cages, 671 00:38:40,080 --> 00:38:43,600 we can take advantage of a lot of mount options, 672 00:38:44,260 --> 00:38:46,120 such as not being able to exec, 673 00:38:46,860 --> 00:38:49,960 not being able to make device nodes, 674 00:38:50,440 --> 00:38:53,400 not being able to run set UID binaries, 675 00:38:54,340 --> 00:38:57,080 not being able to allow core dumps, 676 00:38:57,080 --> 00:38:57,540 and so forth, 677 00:38:57,600 --> 00:38:59,180 basically all your mount options. 678 00:38:59,380 --> 00:39:00,820 So you can really lock down 679 00:39:00,820 --> 00:39:03,600 what is possible in binary. 680 00:39:03,780 --> 00:39:05,620 If you're mounting your binary tree 681 00:39:05,620 --> 00:39:08,280 for users to execute certain programs, 682 00:39:08,560 --> 00:39:09,580 you may want to mount that. 683 00:39:10,300 --> 00:39:11,160 Read only. 684 00:39:12,080 --> 00:39:16,720 So that if the cage does get compromised, 685 00:39:17,120 --> 00:39:19,020 they can't change any of the binaries. 686 00:39:30,360 --> 00:39:33,080 A ch-root is actually a system call, 687 00:39:33,220 --> 00:39:34,680 so it's down at the kernel level, 688 00:39:34,880 --> 00:39:37,400 and basically it doesn't allow you 689 00:39:37,400 --> 00:39:39,560 to traverse above the kernel. 690 00:39:39,560 --> 00:39:40,780 So if you have a certain point, 691 00:39:40,940 --> 00:39:42,160 whatever you ch-root into, 692 00:39:43,120 --> 00:39:47,020 you'll give ch-root an argument of a directory 693 00:39:47,520 --> 00:39:48,680 and then an executable, 694 00:39:48,800 --> 00:39:51,380 and the executable is relative to that directory. 695 00:39:51,680 --> 00:39:55,900 Any program that is then fork-exec off of that, 696 00:39:57,640 --> 00:40:00,680 its root, as far as the root file system is concerned, 697 00:40:00,860 --> 00:40:03,440 is the directory that you pass as that argument to ch-root, 698 00:40:03,620 --> 00:40:05,840 and it just can't go any higher than that. 699 00:40:06,500 --> 00:40:08,680 And so it's locked into that portion 700 00:40:08,680 --> 00:40:09,560 of the directory tree. 701 00:40:15,080 --> 00:40:17,220 So, now we get to... 702 00:40:21,420 --> 00:40:26,020 Um, the PowerPoint slides will eventually be available 703 00:40:26,020 --> 00:40:28,060 as soon as I can convert them into a real format, 704 00:40:28,300 --> 00:40:32,820 and they will be available actually on this website. 705 00:40:34,480 --> 00:40:37,580 Yeah, unfortunately I got caught up with, uh, 706 00:40:37,580 --> 00:40:40,680 my real job, and they, uh, 707 00:40:41,400 --> 00:40:43,300 I spent, like, the past three weeks 708 00:40:44,160 --> 00:40:46,400 writing and then giving two courses 709 00:40:46,400 --> 00:40:48,900 on a particular API set that I wasn't planning on, 710 00:40:49,340 --> 00:40:52,300 and basically that, that consumed, like, 711 00:40:52,420 --> 00:40:54,700 literally three solid weeks of my time, 712 00:40:54,860 --> 00:40:57,100 which I lost a lot, a lot of sleep over. 713 00:41:03,080 --> 00:41:03,600 SDF1. 714 00:41:03,860 --> 00:41:07,080 Um, any anime, uh, fans out there 715 00:41:07,080 --> 00:41:09,000 may recognize, uh, SDF1. 716 00:41:09,420 --> 00:41:12,540 Um, so I actually have a machine named SDF1 717 00:41:12,540 --> 00:41:14,700 that is sitting out, um, on the net, 718 00:41:14,820 --> 00:41:18,340 and on it I've got right now, um, 719 00:41:18,480 --> 00:41:20,740 a web server that is managing, uh, 720 00:41:20,900 --> 00:41:22,920 three domains, um, 721 00:41:24,720 --> 00:41:26,860 and each one of those has content 722 00:41:26,860 --> 00:41:28,900 that is in varying degrees of completion. 723 00:41:31,520 --> 00:41:34,500 Um, and due to the fact that I'm completely over, 724 00:41:35,180 --> 00:41:36,000 overworked because 725 00:41:36,000 --> 00:41:39,460 work likes to just, uh, hit me with, 726 00:41:40,100 --> 00:41:42,620 can you please design a course and teach it, 727 00:41:42,720 --> 00:41:44,720 um, next week, 728 00:41:47,280 --> 00:41:48,860 I've, I've gotten a couple friends, 729 00:41:49,200 --> 00:41:50,700 or suckered a couple of friends, 730 00:41:50,880 --> 00:41:52,360 I hope they're not in here, um, 731 00:41:53,360 --> 00:41:55,420 to, to actually do content management, 732 00:41:55,520 --> 00:41:57,860 uh, for a couple of those, those sites. 733 00:41:57,980 --> 00:41:59,980 So I then realized, okay, 734 00:42:00,140 --> 00:42:02,580 I've gotta let these guys be able to log into 735 00:42:02,580 --> 00:42:04,640 this machine, um, 736 00:42:06,000 --> 00:42:07,780 to be able to, to edit these web pages. 737 00:42:07,920 --> 00:42:10,680 My original plan was to create all the content 738 00:42:10,680 --> 00:42:12,400 on my machine at home, 739 00:42:12,460 --> 00:42:15,060 and have a really simple, uh, script that 740 00:42:15,060 --> 00:42:18,820 allowed me to SSH in with, uh, 741 00:42:18,840 --> 00:42:20,180 RSA authenticated keys, 742 00:42:20,860 --> 00:42:22,880 so it's basically doing mutual authentication, 743 00:42:23,440 --> 00:42:25,880 push the info, uh, push a new tar file 744 00:42:25,880 --> 00:42:27,560 of the entire web content up, 745 00:42:27,700 --> 00:42:31,080 and a script would run that moved the old content 746 00:42:31,080 --> 00:42:33,540 out of the way, dumped the new content in, 747 00:42:33,640 --> 00:42:34,800 and everything was happy, 748 00:42:34,800 --> 00:42:36,340 with no user intervention, 749 00:42:36,640 --> 00:42:37,980 no user logging in, 750 00:42:38,520 --> 00:42:40,380 um, really limited ability. 751 00:42:41,820 --> 00:42:43,840 Unfortunately, I don't have that type of time, 752 00:42:43,980 --> 00:42:45,800 so I had to let them log in. 753 00:42:48,100 --> 00:42:49,200 And of course, 754 00:42:49,800 --> 00:42:51,200 they do not want to sit there 755 00:42:51,200 --> 00:42:52,980 the entire time. 756 00:42:59,900 --> 00:43:02,660 They do not want to sit there the entire time 757 00:43:02,660 --> 00:43:03,180 and 758 00:43:03,180 --> 00:43:06,600 use VI to create the content. 759 00:43:06,780 --> 00:43:07,860 They want to be able to do the, 760 00:43:07,880 --> 00:43:09,740 to create this content, um, 761 00:43:09,920 --> 00:43:11,560 in the comfort of their own home. 762 00:43:12,020 --> 00:43:14,500 So I had to provide them a way with getting the content 763 00:43:14,980 --> 00:43:15,920 up to the machine. 764 00:43:17,800 --> 00:43:20,200 And they're unfortunately all on Windows machines, 765 00:43:20,700 --> 00:43:22,740 which doesn't have a nice, neat, uh, 766 00:43:22,760 --> 00:43:25,320 secure copy, uh, interface installed. 767 00:43:25,920 --> 00:43:27,960 So I had to provide them with FTP. 768 00:43:28,600 --> 00:43:30,820 And the last thing I wanted was them typing in 769 00:43:30,820 --> 00:43:32,020 their passwords to FTP. 770 00:43:32,020 --> 00:43:35,020 So, okay, anonymous FTP only. 771 00:43:36,980 --> 00:43:39,500 And this was done to allow them to do content management, 772 00:43:39,680 --> 00:43:42,320 so the only writable areas are some hidden directories 773 00:43:42,320 --> 00:43:43,000 and are incoming. 774 00:43:47,160 --> 00:43:49,400 So in order to accomplish all of this, 775 00:43:50,200 --> 00:43:51,600 I set up, uh, 776 00:43:51,700 --> 00:43:53,480 I cut several ch-rooted cages, 777 00:43:53,640 --> 00:43:54,800 one for the web, uh, 778 00:43:55,600 --> 00:43:56,600 one for users, 779 00:43:56,800 --> 00:43:58,080 one for FTP. 780 00:43:59,840 --> 00:44:00,780 And basically, 781 00:44:02,020 --> 00:44:03,520 inside the, the user's area, 782 00:44:03,640 --> 00:44:06,120 when they SSH in, they SSH in, 783 00:44:06,220 --> 00:44:08,200 they end up in a ch-rooted, uh, cage. 784 00:44:09,600 --> 00:44:13,160 And mounted in from another portion of the tree 785 00:44:13,850 --> 00:44:14,900 is slash HTML, 786 00:44:15,680 --> 00:44:17,480 which is the web content. 787 00:44:17,760 --> 00:44:19,580 This exists on another portion of the disk. 788 00:44:21,100 --> 00:44:22,880 It's mounted into, to that area, 789 00:44:22,960 --> 00:44:24,260 so they can go ahead and access it. 790 00:44:24,780 --> 00:44:28,700 Uh, the FTP, which is sitting off in its own ch-rooted cage, 791 00:44:28,960 --> 00:44:29,640 um, 792 00:44:30,260 --> 00:44:31,680 the directory that's, 793 00:44:32,020 --> 00:44:33,080 that they're FTP-ing into, 794 00:44:33,260 --> 00:44:35,580 that is mounted from that ch-rooted cage 795 00:44:35,580 --> 00:44:38,200 into the user's ch-rooted cage 796 00:44:38,200 --> 00:44:39,480 so they can access it. 797 00:44:41,840 --> 00:44:44,420 Since I've got to administrate the machine, 798 00:44:44,660 --> 00:44:47,240 I've got another SSH running at another port, 799 00:44:47,980 --> 00:44:50,060 so that will let me log in 800 00:44:50,060 --> 00:44:52,060 and actually get to the real root 801 00:44:52,060 --> 00:44:54,200 so I can really log in 802 00:44:54,200 --> 00:44:56,400 and, and deal with the administration of all of this. 803 00:44:57,160 --> 00:44:57,680 Um, 804 00:45:00,060 --> 00:45:00,920 with that, 805 00:45:00,920 --> 00:45:04,280 I can control and set up these various ch-rooted cages. 806 00:45:04,520 --> 00:45:07,180 But the fact that I've got two SSHs going now, 807 00:45:07,360 --> 00:45:09,460 um, two SSHDs going now, 808 00:45:10,380 --> 00:45:12,520 I just have to start worrying about dev entries 809 00:45:12,520 --> 00:45:16,500 because the way dev permissions are restored 810 00:45:16,500 --> 00:45:19,400 is they're, uh, set back to, uh, 811 00:45:19,460 --> 00:45:21,960 to 666 for some bizarre reason. 812 00:45:23,200 --> 00:45:25,400 Unfortunately, there is not one place 813 00:45:26,240 --> 00:45:28,760 that I can go in and tweak the code 814 00:45:28,760 --> 00:45:29,660 to say, 815 00:45:29,660 --> 00:45:31,260 set the mode to zero 816 00:45:31,260 --> 00:45:35,620 when, uh, you deallocate a, uh, a TTY-PTY pair. 817 00:45:36,580 --> 00:45:39,320 It seems that every single daemon does this itself. 818 00:45:39,700 --> 00:45:41,400 I looked through the SSH code 819 00:45:41,400 --> 00:45:42,500 and saw what it did it there. 820 00:45:42,720 --> 00:45:45,120 I looked through telnet and saw what it did it there. 821 00:45:45,320 --> 00:45:47,580 I looked through login and saw that it did it there 822 00:45:47,580 --> 00:45:48,120 and went, 823 00:45:48,220 --> 00:45:49,520 this is not good. 824 00:45:50,120 --> 00:45:53,660 This means that I've got to make changes 825 00:45:55,280 --> 00:45:58,140 to several daemons every single time 826 00:45:58,140 --> 00:45:59,560 I want to upgrade 827 00:45:59,560 --> 00:46:02,200 to make sure that the TTY permissions 828 00:46:02,200 --> 00:46:03,220 are reset correctly 829 00:46:03,920 --> 00:46:05,200 so that as I'm going along 830 00:46:05,200 --> 00:46:07,120 and people are logging in and out, 831 00:46:07,840 --> 00:46:09,820 that as I log in as root, 832 00:46:11,180 --> 00:46:12,820 um, in one domain, 833 00:46:13,880 --> 00:46:16,300 that someone logging in as a user 834 00:46:16,300 --> 00:46:17,580 in that CH rooted cage 835 00:46:17,580 --> 00:46:19,180 and sees the dev entries there, 836 00:46:19,340 --> 00:46:22,020 um, can't mess with them. 837 00:46:22,280 --> 00:46:24,120 So having multiple device nodes 838 00:46:24,120 --> 00:46:25,180 was not going to work 839 00:46:25,180 --> 00:46:26,980 because of these permissions. 840 00:46:26,980 --> 00:46:29,060 So what I ended up doing 841 00:46:29,060 --> 00:46:30,540 was creating a subdirectory 842 00:46:30,540 --> 00:46:32,060 under slash dev 843 00:46:32,840 --> 00:46:36,120 that only had, uh, hard links 844 00:46:36,120 --> 00:46:39,080 from it into the, uh, TTY-PTY pairs. 845 00:46:39,280 --> 00:46:41,680 Hard link into standard in, standard out, 846 00:46:41,780 --> 00:46:43,800 standard error, um, 847 00:46:45,000 --> 00:46:48,620 dev zero, dev null, and dev random. 848 00:46:49,880 --> 00:46:51,580 And then mounted this, 849 00:46:51,580 --> 00:46:53,240 this subdirectory, 850 00:46:53,280 --> 00:46:55,620 which had a very limited set of dev entries, 851 00:46:55,620 --> 00:46:59,520 into the CH rooted users, uh, directory. 852 00:47:01,200 --> 00:47:02,620 This allowed the, 853 00:47:03,260 --> 00:47:04,820 the CH rooted users cage 854 00:47:04,820 --> 00:47:06,520 to have access to 855 00:47:07,320 --> 00:47:09,060 the dev entries that it needed, 856 00:47:09,240 --> 00:47:10,680 but not all the dev entries. 857 00:47:11,100 --> 00:47:12,980 So even if someone was able to, 858 00:47:13,020 --> 00:47:15,580 to get root in there, 859 00:47:16,180 --> 00:47:17,760 they weren't able to, 860 00:47:17,760 --> 00:47:19,320 to make the dev entries 861 00:47:19,960 --> 00:47:21,640 to create, um, 862 00:47:21,800 --> 00:47:23,680 dev entries for the hard disk. 863 00:47:23,960 --> 00:47:25,340 And basically I, 864 00:47:25,340 --> 00:47:27,000 I mount, you can mount 865 00:47:28,040 --> 00:47:29,920 those, uh, the file systems in 866 00:47:29,920 --> 00:47:31,900 with, with the appropriate permissions 867 00:47:31,900 --> 00:47:33,960 but set so people cannot, uh, 868 00:47:34,620 --> 00:47:35,820 cannot deal with, uh, 869 00:47:35,840 --> 00:47:37,040 creating new dev entries 870 00:47:37,780 --> 00:47:39,000 in the slash dev. 871 00:47:39,400 --> 00:47:41,860 Mount all the other file systems no dev 872 00:47:41,860 --> 00:47:44,340 so they can't create dev entries anywhere else. 873 00:47:44,620 --> 00:47:46,480 And you can really lock the system down 874 00:47:46,480 --> 00:47:47,600 and prevent people 875 00:47:48,600 --> 00:47:49,980 from, from making changes 876 00:47:49,980 --> 00:47:51,800 even if root is compromised. 877 00:47:52,660 --> 00:47:54,920 Um, for situations like FTP, 878 00:47:55,540 --> 00:47:57,600 um, I don't remember exactly 879 00:47:57,600 --> 00:47:59,680 what version of FTP I've actually got running, 880 00:47:59,920 --> 00:48:02,540 um, but it's, 881 00:48:03,260 --> 00:48:05,120 most of the shellcode out there 882 00:48:05,120 --> 00:48:06,560 for FTP exploits 883 00:48:06,560 --> 00:48:08,080 assumes you have a bin SH. 884 00:48:08,920 --> 00:48:11,440 There's no bin SH in that CH rooted cage. 885 00:48:11,660 --> 00:48:13,400 You're not going to be able to exec it. 886 00:48:13,520 --> 00:48:15,000 It just won't work. 887 00:48:15,500 --> 00:48:17,580 Um, the only thing that lives 888 00:48:17,580 --> 00:48:19,060 in that directory 889 00:48:19,060 --> 00:48:22,360 is the FTP D binary itself. 890 00:48:22,900 --> 00:48:25,100 Um, so unless you want to write 891 00:48:25,100 --> 00:48:27,320 an entire shell in shellcode, 892 00:48:27,640 --> 00:48:31,400 um, even if you can find the buffer overflow 893 00:48:31,400 --> 00:48:33,240 in that version of the FTP D, 894 00:48:34,020 --> 00:48:35,780 it's not going to do you much good. 895 00:48:36,320 --> 00:48:38,200 And even if you are able to 896 00:48:38,840 --> 00:48:40,660 break root through FTP D, 897 00:48:40,860 --> 00:48:42,740 you now have access to 898 00:48:42,740 --> 00:48:44,560 the FTP files. 899 00:48:45,980 --> 00:48:49,680 And if I'm serving any FTP out, 900 00:48:49,920 --> 00:48:52,600 well, you're not going to be able to compromise those 901 00:48:52,600 --> 00:48:54,260 because those have been mounted 902 00:48:54,260 --> 00:48:57,080 read-only into that CH rooted area. 903 00:48:58,780 --> 00:49:01,800 So the capabilities that you're left with 904 00:49:01,800 --> 00:49:03,160 after compromising root 905 00:49:03,160 --> 00:49:05,340 are really, really limited 906 00:49:05,340 --> 00:49:09,040 because of this extra effort set up 907 00:49:09,040 --> 00:49:11,440 to create these particular cages 908 00:49:11,440 --> 00:49:13,840 and lock, um, 909 00:49:14,060 --> 00:49:15,940 what resources are available 910 00:49:15,940 --> 00:49:18,840 down to only what is needed for that service. 911 00:49:19,160 --> 00:49:21,060 And the same things can be done for, 912 00:49:21,060 --> 00:49:22,420 for send mail, 913 00:49:23,020 --> 00:49:24,100 for your POP, 914 00:49:24,220 --> 00:49:27,120 any other internet related services that you need. 915 00:49:27,240 --> 00:49:29,340 You just duplicate these CH rooted cages 916 00:49:29,340 --> 00:49:32,620 on out and only provide 917 00:49:33,860 --> 00:49:35,820 binaries that are, they're absolutely needed. 918 00:49:36,960 --> 00:49:38,080 In fact, um, 919 00:49:38,620 --> 00:49:41,100 I haven't had actually any of my users complain yet, 920 00:49:41,140 --> 00:49:43,220 but they can't even do a who to find out 921 00:49:43,220 --> 00:49:44,360 who's on the system 922 00:49:44,360 --> 00:49:46,620 because who doesn't exist, 923 00:49:47,780 --> 00:49:49,900 um, in that CH rooted cage. 924 00:49:50,180 --> 00:49:51,900 And even if who did exist, 925 00:49:52,420 --> 00:49:53,440 there's no dev came in. 926 00:49:56,260 --> 00:49:58,860 So even if they copy in a who binary, 927 00:49:59,340 --> 00:50:01,240 um, it's not going to do them any good 928 00:50:01,240 --> 00:50:03,700 because it's just not going to work. 929 00:50:04,760 --> 00:50:06,620 And, and by those tokens, um, 930 00:50:08,000 --> 00:50:09,940 you can really, really keep, 931 00:50:10,120 --> 00:50:11,660 keep people out of 932 00:50:12,120 --> 00:50:13,720 what you don't want them to do. 933 00:50:13,840 --> 00:50:15,600 And if you ever do need to administrate the machine, 934 00:50:15,780 --> 00:50:18,300 you've got an entirely different port set up 935 00:50:18,300 --> 00:50:19,520 where you can log in 936 00:50:19,520 --> 00:50:21,580 as a, as an administrator 937 00:50:22,700 --> 00:50:24,560 and, and do the things that you need. 938 00:50:25,000 --> 00:50:28,180 And if we flip back real quick to those IP filtering rules, 939 00:50:28,820 --> 00:50:30,540 since you've got a different port la, 940 00:50:30,660 --> 00:50:31,580 uh, for administrator, 941 00:50:32,620 --> 00:50:33,820 you can control 942 00:50:34,380 --> 00:50:35,360 from what sites 943 00:50:36,600 --> 00:50:38,240 someone can log in to that port. 944 00:50:38,880 --> 00:50:40,280 So basically you can say, 945 00:50:40,360 --> 00:50:43,460 I can allow users into the user CH root cage 946 00:50:43,460 --> 00:50:44,580 from anywhere, 947 00:50:45,200 --> 00:50:47,520 um, because I have no control as to where my friends 948 00:50:47,520 --> 00:50:49,040 may actually want to log in from. 949 00:50:49,600 --> 00:50:52,060 Or I can limit, limit them to logging in 950 00:50:52,060 --> 00:50:53,620 from machines I know they have accounts on. 951 00:50:54,360 --> 00:50:55,660 But for logging in, 952 00:50:55,740 --> 00:50:57,700 uh, in that, uh, the real 953 00:50:58,400 --> 00:51:00,160 root of the, the directory tree, 954 00:51:00,260 --> 00:51:01,920 I know that I really only want 955 00:51:01,920 --> 00:51:03,880 people to get in from, um, 956 00:51:05,100 --> 00:51:06,160 my disorg account, 957 00:51:06,640 --> 00:51:08,120 my remark.org account, 958 00:51:08,780 --> 00:51:10,620 and, and maybe my DSL address. 959 00:51:10,900 --> 00:51:13,480 So I can lock it down to, to those three systems 960 00:51:14,000 --> 00:51:17,240 and prevent, prevent people from, from getting in. 961 00:51:18,820 --> 00:51:20,460 Or I can just leave it as, 962 00:51:20,460 --> 00:51:22,260 if you want to administrate the machine, 963 00:51:22,940 --> 00:51:23,820 use console. 964 00:51:24,660 --> 00:51:27,680 And just not allow any network access 965 00:51:28,720 --> 00:51:30,020 to the root of the tree, 966 00:51:30,200 --> 00:51:32,760 but at the same time we still have people able to log in 967 00:51:32,760 --> 00:51:33,220 to do work. 968 00:51:38,760 --> 00:51:40,540 As I mentioned, we can, uh, 969 00:51:41,020 --> 00:51:43,420 scan for, for activity of, uh, 970 00:51:44,960 --> 00:51:47,600 of maliciously users attempting to do things, 971 00:51:47,640 --> 00:51:49,320 even if they have an account. 972 00:51:49,320 --> 00:51:52,320 Um, there's a lot of ways you can, 973 00:51:52,320 --> 00:51:53,900 you can detect this. 974 00:51:53,940 --> 00:51:55,120 You've got scanners, um, 975 00:51:55,900 --> 00:51:58,020 locking down what, what executables 976 00:51:58,020 --> 00:51:59,360 they can actually run. 977 00:51:59,900 --> 00:52:00,380 Um, 978 00:52:04,040 --> 00:52:06,840 this kind of reeks of, of big brother, 979 00:52:07,020 --> 00:52:09,860 so I'm really, really hesitant to actually even endorse this. 980 00:52:10,100 --> 00:52:13,200 Um, if you're working for a, a corporation 981 00:52:13,200 --> 00:52:16,220 that has a, a very well-written security policy saying 982 00:52:16,220 --> 00:52:17,500 this is what you're allowed to do, 983 00:52:17,560 --> 00:52:18,960 this is what you're not allowed to do, 984 00:52:18,960 --> 00:52:20,880 if you do something you're not allowed to do, 985 00:52:20,920 --> 00:52:21,560 you're fired. 986 00:52:21,760 --> 00:52:23,980 Um, you might be able to be, 987 00:52:24,060 --> 00:52:25,580 have a better chance of getting away 988 00:52:25,580 --> 00:52:27,940 with scanning, uh, the interactive traffic 989 00:52:27,940 --> 00:52:29,500 to, to find out what people are doing 990 00:52:29,500 --> 00:52:32,260 and logging, shutting down connections as appropriate. 991 00:52:33,300 --> 00:52:35,660 Um, other new feature I've seen in the, uh, 992 00:52:36,280 --> 00:52:38,040 in a B-level secure system 993 00:52:38,580 --> 00:52:41,320 is, uh, the kernel keeps track of what 994 00:52:41,960 --> 00:52:43,900 network interfaces you're talking to. 995 00:52:44,880 --> 00:52:48,400 And if you attempt to, to bind to, 996 00:52:48,400 --> 00:52:50,400 to more than one network interface, 997 00:52:51,600 --> 00:52:55,000 it can detect this and kill off that process 998 00:52:55,000 --> 00:52:59,540 and then log who, what, and when 999 00:52:59,540 --> 00:53:01,480 attempted this violation. 1000 00:53:02,420 --> 00:53:06,140 So basically, if you've got a system that's a firewall 1001 00:53:06,140 --> 00:53:08,620 and basically you're authorized to log into that, 1002 00:53:08,660 --> 00:53:10,920 uh, internally to manage some content, 1003 00:53:11,200 --> 00:53:15,260 um, you're coming in from the internal address, 1004 00:53:16,000 --> 00:53:17,560 you can go in and say, 1005 00:53:17,560 --> 00:53:19,480 okay, I can log in, I can do my work, 1006 00:53:20,600 --> 00:53:23,560 but you wouldn't be able to set up a daemon 1007 00:53:23,560 --> 00:53:27,000 that listens on both the internal and the external 1008 00:53:27,580 --> 00:53:29,580 to allow it to pass any sort of traffic. 1009 00:53:30,660 --> 00:53:32,160 So you'd always have to do this, 1010 00:53:32,220 --> 00:53:34,660 if you're trying to, to move any content in and out, 1011 00:53:34,720 --> 00:53:36,860 you'd have to do a, a sort of a bounce. 1012 00:53:37,620 --> 00:53:39,420 Move the content onto the machine, 1013 00:53:39,540 --> 00:53:41,520 then move the content, uh, off 1014 00:53:41,520 --> 00:53:44,360 and you've got better control over what's going on 1015 00:53:45,040 --> 00:53:46,940 by, by adding that additional restriction. 1016 00:53:49,800 --> 00:53:51,800 Um, other things that may want, 1017 00:53:51,960 --> 00:53:54,840 that could be, uh, done in the future 1018 00:53:54,840 --> 00:53:58,320 that just aren't really set up, uh, smoothly right now 1019 00:53:58,320 --> 00:54:00,240 is additional login restrictions 1020 00:54:00,240 --> 00:54:03,760 where you're controlling who can log in, 1021 00:54:03,860 --> 00:54:04,880 from where, when. 1022 00:54:07,060 --> 00:54:09,500 Um, basically, uh, time-based, 1023 00:54:09,540 --> 00:54:12,080 location-based logging in, um, 1024 00:54:13,960 --> 00:54:17,000 without filtering, uh, at the, uh, 1025 00:54:17,000 --> 00:54:17,640 the IP level. 1026 00:54:18,700 --> 00:54:20,480 Basically you say, okay, it's okay for, 1027 00:54:20,520 --> 00:54:24,120 for Joe to log in from home after 5, 1028 00:54:25,340 --> 00:54:27,260 but before 9 a.m. 1029 00:54:28,020 --> 00:54:30,040 No problem, he works from home at that time. 1030 00:54:30,160 --> 00:54:31,860 It's cool, but we don't want to let him 1031 00:54:31,860 --> 00:54:35,820 log in remotely from, um, 9 to 5. 1032 00:54:35,940 --> 00:54:37,680 We want him to be here in the office 1033 00:54:37,680 --> 00:54:38,640 doing his job. 1034 00:54:39,620 --> 00:54:41,360 So that's, that's an additional, uh, 1035 00:54:42,080 --> 00:54:43,060 direction for the future. 1036 00:54:44,220 --> 00:54:44,980 Any questions? 1037 00:54:47,120 --> 00:54:47,960 Sorry. 1038 00:54:55,940 --> 00:54:56,780 So. 1039 00:54:57,880 --> 00:54:58,880 Back there. 1040 00:55:04,380 --> 00:55:05,220 Pardon? 1041 00:55:13,740 --> 00:55:15,680 I'm on the initial stages of 1042 00:55:15,680 --> 00:55:18,160 packaging this for general consumption. 1043 00:55:18,960 --> 00:55:21,400 Um, the machine that I described, SDF1, 1044 00:55:21,620 --> 00:55:24,000 is it set up this way? 1045 00:55:24,140 --> 00:55:25,880 It's been set up that way for, um, 1046 00:55:26,400 --> 00:55:27,260 quite some time now. 1047 00:55:27,960 --> 00:55:30,160 And I haven't had too many user complaints. 1048 00:55:30,620 --> 00:55:33,600 Uh, the only thing that has really come up is 1049 00:55:33,600 --> 00:55:35,460 it would be really nice if we had Pico. 1050 00:55:36,440 --> 00:55:37,880 So that's, that's been, like, 1051 00:55:37,900 --> 00:55:39,240 the only comment on that. 1052 00:55:42,080 --> 00:55:43,020 Any other questions? 1053 00:55:45,060 --> 00:55:45,500 So. 1054 00:55:46,260 --> 00:55:47,940 Occasionally, you, you enter a situation 1055 00:55:47,940 --> 00:55:50,540 where your firewall just isn't enough. 1056 00:55:52,520 --> 00:55:54,540 So you, you really have to take it to, 1057 00:55:54,560 --> 00:55:56,060 to the, uh, the next level. 1058 00:56:00,020 --> 00:56:01,620 This may be a little hard to see, 1059 00:56:01,720 --> 00:56:03,240 but if you talk to John afterwards, 1060 00:56:05,960 --> 00:56:07,900 um, that's a GE minigun. 1061 00:56:09,300 --> 00:56:09,740 And... 1062 00:56:12,600 --> 00:56:13,000 That's... 1063 00:56:14,600 --> 00:56:15,740 That's a really cool drawing. 1064 00:56:17,880 --> 00:56:19,300 You'd probably be blown back a bit 1065 00:56:19,300 --> 00:56:20,920 if you actually, if you actually fired that, 1066 00:56:20,980 --> 00:56:22,280 but I'd like to see it. 1067 00:56:23,560 --> 00:56:25,060 I'd like to see the malicious user 1068 00:56:25,060 --> 00:56:26,160 he was targeting, too. 1069 00:56:26,820 --> 00:56:28,620 So, if you're interested in the shirt, 1070 00:56:29,200 --> 00:56:29,920 back to John. 1071 00:56:33,240 --> 00:56:34,060 Any other questions? 1072 00:56:35,420 --> 00:56:36,440 How would you compare 1073 00:56:36,440 --> 00:56:39,200 pre-BSD with BSD, net BSD, 1074 00:56:39,380 --> 00:56:39,800 whatever? 1075 00:56:41,300 --> 00:56:43,800 I would compare it as, uh, 1076 00:56:44,120 --> 00:56:46,380 Judaism, Hinduism, Christianity. 1077 00:56:51,040 --> 00:56:52,380 It's, it's, it's, I mean, 1078 00:56:52,380 --> 00:56:54,560 it gets down to, to a religious war. 1079 00:56:55,120 --> 00:56:55,680 Um... 1080 00:56:57,880 --> 00:56:59,660 I've had lots of luck with, uh, 1081 00:56:59,660 --> 00:57:00,380 with net BSD. 1082 00:57:00,640 --> 00:57:02,460 Um, I've been running it 1083 00:57:03,320 --> 00:57:05,860 since I was probably 93, 94. 1084 00:57:06,440 --> 00:57:08,540 I probably still have 0.8 1085 00:57:08,540 --> 00:57:10,060 install floppies floating around, 1086 00:57:10,200 --> 00:57:11,440 which is one of the first 1087 00:57:11,440 --> 00:57:12,760 publicly consumable versions. 1088 00:57:13,660 --> 00:57:14,240 Um... 1089 00:57:14,240 --> 00:57:16,240 That was well before the, 1090 00:57:16,280 --> 00:57:17,540 the open BSD split. 1091 00:57:18,280 --> 00:57:18,860 Um... 1092 00:57:19,410 --> 00:57:21,440 Net BSD runs on currently 1093 00:57:21,440 --> 00:57:23,460 16 different hardware architectures, 1094 00:57:23,480 --> 00:57:24,480 so pretty much it's almost, 1095 00:57:24,800 --> 00:57:27,100 it's got a 32-bit CPU or greater 1096 00:57:27,100 --> 00:57:28,300 and an MMU. 1097 00:57:28,400 --> 00:57:29,560 You've got a good chance of 1098 00:57:29,560 --> 00:57:31,040 it running or getting it running 1099 00:57:31,040 --> 00:57:32,280 without too, too much work. 1100 00:57:33,400 --> 00:57:33,980 Um... 1101 00:57:35,600 --> 00:57:36,880 As far as free BSD, 1102 00:57:37,000 --> 00:57:38,540 their, their goal used to be 1103 00:57:38,540 --> 00:57:39,880 the best optimized, uh, 1104 00:57:41,020 --> 00:57:42,700 free BSD, free version of a, 1105 00:57:42,700 --> 00:57:44,200 of a BSD for the Intel platform. 1106 00:57:45,340 --> 00:57:45,740 Um... 1107 00:57:48,540 --> 00:57:49,360 Linux, unfortunately, 1108 00:57:49,560 --> 00:57:50,720 it's just, it's just way too, 1109 00:57:50,800 --> 00:57:51,720 too diversified. 1110 00:57:51,780 --> 00:57:52,820 Some of its strengths have 1111 00:57:52,820 --> 00:57:53,680 really contributed to, 1112 00:57:53,760 --> 00:57:54,860 to some of its weaknesses. 1113 00:57:55,380 --> 00:57:55,780 Um... 1114 00:57:56,300 --> 00:57:57,600 Yes, it's got a lot of, 1115 00:57:57,600 --> 00:57:59,260 a lot of drivers available for it 1116 00:57:59,260 --> 00:58:00,360 because you've got a lot of people 1117 00:58:00,360 --> 00:58:01,820 writing drivers for it. 1118 00:58:02,200 --> 00:58:02,600 Unfortunately, 1119 00:58:03,480 --> 00:58:03,880 YouTube, 1120 00:58:03,980 --> 00:58:04,680 we do have a lot of people 1121 00:58:04,680 --> 00:58:05,920 writing drivers for it, 1122 00:58:05,940 --> 00:58:07,460 and so the code quality may not be 1123 00:58:07,980 --> 00:58:09,100 the, uh, the same, 1124 00:58:09,140 --> 00:58:10,520 uh, across the board. 1125 00:58:11,160 --> 00:58:11,640 Also... 1126 00:58:12,680 --> 00:58:13,160 Pardon? 1127 00:58:14,700 --> 00:58:15,900 From the firewall standpoint, 1128 00:58:16,460 --> 00:58:16,940 um... 1129 00:58:19,760 --> 00:58:21,180 There's a lot of driver sharing 1130 00:58:21,180 --> 00:58:22,160 between, uh, 1131 00:58:22,500 --> 00:58:23,580 like free BSD and, 1132 00:58:23,600 --> 00:58:24,280 and Net BSD. 1133 00:58:24,520 --> 00:58:24,980 Um... 1134 00:58:24,980 --> 00:58:26,480 I know OpenBSD is, 1135 00:58:26,700 --> 00:58:27,480 is in there looking at 1136 00:58:27,480 --> 00:58:28,520 the same code as well. 1137 00:58:28,840 --> 00:58:29,320 Um... 1138 00:58:29,320 --> 00:58:31,460 They're all BSD stack derived. 1139 00:58:32,200 --> 00:58:32,680 Um... 1140 00:58:33,700 --> 00:58:35,440 I don't know what Linux did 1141 00:58:35,440 --> 00:58:36,840 to the BSD code 1142 00:58:36,840 --> 00:58:38,000 when they moved it into, 1143 00:58:38,100 --> 00:58:39,380 into their kernel, 1144 00:58:39,560 --> 00:58:41,060 but they've been having 1145 00:58:41,060 --> 00:58:42,400 a lot of problems with it. 1146 00:58:42,720 --> 00:58:43,200 Um... 1147 00:58:43,200 --> 00:58:44,680 I know, um, 1148 00:58:44,840 --> 00:58:46,760 NFR was having, 1149 00:58:46,840 --> 00:58:47,980 having issues with, 1150 00:58:48,000 --> 00:58:48,200 uh, 1151 00:58:48,200 --> 00:58:48,860 with running on, 1152 00:58:48,940 --> 00:58:49,400 on Linux 1153 00:58:49,400 --> 00:58:50,260 because the stack 1154 00:58:50,260 --> 00:58:51,720 just wasn't up to 1155 00:58:51,720 --> 00:58:53,120 it going at full speed. 1156 00:58:53,460 --> 00:58:54,760 So Linux may not be 1157 00:58:54,760 --> 00:58:55,540 the best option, 1158 00:58:55,680 --> 00:58:56,040 uh, 1159 00:58:56,200 --> 00:58:57,240 in light of that. 1160 00:58:57,680 --> 00:58:58,160 Um... 1161 00:58:58,160 --> 00:58:58,880 I haven't had a chance 1162 00:58:58,880 --> 00:58:59,060 to, 1163 00:58:59,100 --> 00:59:00,300 to actually test that out. 1164 00:59:00,560 --> 00:59:01,040 Um... 1165 00:59:01,040 --> 00:59:01,520 But that's something 1166 00:59:01,520 --> 00:59:02,080 I have heard. 1167 00:59:02,180 --> 00:59:02,660 Um... 1168 00:59:02,660 --> 00:59:03,280 But there were issues 1169 00:59:03,280 --> 00:59:03,760 with the, 1170 00:59:03,760 --> 00:59:04,420 with the Linux stack. 1171 00:59:04,580 --> 00:59:04,820 So, 1172 00:59:05,940 --> 00:59:06,340 um, 1173 00:59:07,440 --> 00:59:08,760 each is his own. 1174 00:59:09,340 --> 00:59:09,940 But that, 1175 00:59:09,980 --> 00:59:10,400 that may be 1176 00:59:10,400 --> 00:59:11,400 a potential issue. 1177 00:59:11,940 --> 00:59:12,480 Does that sort of 1178 00:59:12,480 --> 00:59:13,080 answer your question? 1179 00:59:14,880 --> 00:59:15,600 Anybody else? 1180 00:59:18,820 --> 00:59:19,220 Questions? 1181 00:59:20,160 --> 00:59:20,560 Comments? 1182 00:59:20,980 --> 00:59:21,560 More beer? 1183 00:59:26,600 --> 00:59:27,000 Okay. 1184 00:59:27,280 --> 00:59:27,620 Uh, 1185 00:59:27,760 --> 00:59:28,180 thank you. 1186 00:59:28,240 --> 00:59:28,560 If you have 1187 00:59:28,560 --> 00:59:29,440 any additional, 1188 00:59:29,520 --> 00:59:30,020 uh, 1189 00:59:30,120 --> 00:59:30,440 questions 1190 00:59:30,440 --> 00:59:30,800 or 1191 00:59:30,800 --> 00:59:31,720 longer questions, 1192 00:59:31,840 --> 00:59:32,140 feel free 1193 00:59:32,140 --> 00:59:32,640 to come on out. 1194 00:59:32,660 --> 00:59:32,800 Bye. 1195 00:59:33,660 --> 00:59:34,460 Bye. 1196 00:59:34,460 --> 00:59:35,320 Bye. 1197 00:59:35,700 --> 00:59:37,100 Bye. 1198 00:59:37,100 --> 00:59:37,820 Bye.