1 00:00:01,180 --> 00:00:09,040 All right. So here we are. I'm a little bit surprised, too. You know, it takes me about 2 00:00:09,040 --> 00:00:13,420 five minutes to realize, to go from, wow, I'm really tired, to I guess we're giving 3 00:00:13,420 --> 00:00:19,640 a presentation. So we're going to talk about building a session layer. And, you know, as 4 00:00:19,640 --> 00:00:23,160 usual with these types of things, it's good to start at the beginning so you can end at 5 00:00:23,160 --> 00:00:29,760 the end. And we need to talk about what a session layer actually is. It all goes back 6 00:00:29,760 --> 00:00:33,800 to the seven-layer ISO model, which, you know, was designed by committee some time back 7 00:00:33,800 --> 00:00:42,080 and has been more or less replaced with a four-layer TCP IP model. But let's go through 8 00:00:42,080 --> 00:00:50,240 it anyways because it's important. First layer, physical layer, the actual wire, the 9 00:00:50,240 --> 00:00:55,320 air, everything that actually makes up the physical networking. Then you have your data 10 00:00:55,320 --> 00:00:59,200 link layer, your Ethernet, your 802.11, your FDDI. 11 00:01:01,100 --> 00:01:08,600 And then pretty much on layer three, you just have IP. On layer four, TCP, UDP, all those. 12 00:01:10,060 --> 00:01:16,080 And then we come to the session layer. Pretty much no one uses the session layer. Some people 13 00:01:16,080 --> 00:01:22,480 describe TLS and SSL as the session layer. Not really. But it's the closest we have. 14 00:01:23,420 --> 00:01:28,780 The session, or excuse me, the layer six is the one probably that everyone makes fun of, 15 00:01:29,760 --> 00:01:32,620 you know, character encodings and problems that we solved 20 years ago. 16 00:01:32,840 --> 00:01:38,020 And if you actually, you know, are discussing the ISO 7 layer model with someone 17 00:01:38,020 --> 00:01:42,860 and they're not a fan of it, they're usually going to point at layer 6 as the one that's pretty much useless. 18 00:01:43,760 --> 00:01:46,100 And then everything else goes into layer 7. 19 00:01:46,220 --> 00:01:49,860 And we've been seeing more and more and more of everything going into layer 7. 20 00:01:51,540 --> 00:01:54,580 And that's what we need to, or what I'm trying to reverse here. 21 00:01:54,580 --> 00:01:59,700 So, if the session layer isn't here anymore, where did it go? 22 00:02:01,940 --> 00:02:04,000 It really went everywhere. 23 00:02:04,240 --> 00:02:05,700 It's all over the place. 24 00:02:05,840 --> 00:02:12,460 You have SSL, SSH, IPsec, all some forms of session layer in their own different ways. 25 00:02:13,960 --> 00:02:21,000 The idea that an individual application should be authenticating users, why would you do that? 26 00:02:21,200 --> 00:02:23,920 I mean, you have... 27 00:02:24,580 --> 00:02:31,420 A perfectly good application, and then you add authentication code to it every single time. 28 00:02:32,520 --> 00:02:36,840 You know, my typical example is I want to use SSH keys to log into everything. 29 00:02:37,120 --> 00:02:40,620 The fact that I can't log into my web server with an SSH key infuriates me. 30 00:02:42,600 --> 00:02:48,320 So, basically a bunch of stuff got pushed from the session layer into layer 7 31 00:02:48,320 --> 00:02:50,340 because we never got around to implementing it. 32 00:02:51,020 --> 00:02:52,460 This was about 20 years ago. 33 00:02:53,300 --> 00:02:54,300 Maybe we can change that. 34 00:02:57,920 --> 00:03:00,020 So, this causes more code. 35 00:03:00,180 --> 00:03:04,640 When every application is writing authentication functions, their own encryption layers, 36 00:03:05,060 --> 00:03:09,720 their own stuff to describe what a session is, it's just wasteful. 37 00:03:09,820 --> 00:03:12,180 More importantly, it's more buggy code. 38 00:03:12,660 --> 00:03:15,080 Most of the security vulnerabilities that really matter, 39 00:03:15,860 --> 00:03:19,320 security vulnerabilities in the authentication code, in the encryption code, 40 00:03:20,080 --> 00:03:20,860 actual problems. 41 00:03:21,240 --> 00:03:24,460 Session layer code that shouldn't be in the application in the first place. 42 00:03:25,820 --> 00:03:31,760 And while we're getting rid of things from the application, let's go ahead and, you know, 43 00:03:31,800 --> 00:03:34,360 we've got application multiplexing in layer 4. 44 00:03:35,000 --> 00:03:37,000 What I'm talking about here is port numbers. 45 00:03:37,560 --> 00:03:43,880 Your TCP and UDP layers are actually doing multiplexing. 46 00:03:44,020 --> 00:03:48,800 They're not just providing a reliable byte stream, but they're telling you which application to talk to on your computer. 47 00:03:49,860 --> 00:03:51,140 Why should we have that there? 48 00:03:52,000 --> 00:03:52,740 I don't know. 49 00:03:52,740 --> 00:03:56,960 So, we're going to yoink it and layer 5 it. 50 00:03:59,680 --> 00:04:07,820 By the way, the software itself that I'm presenting here is fived, short for layer 5, damn it. 51 00:04:10,240 --> 00:04:11,920 Currently, don't run it. 52 00:04:12,360 --> 00:04:17,040 It's very much a piece of software that is used for demos. 53 00:04:18,600 --> 00:04:22,720 A good portion of the development cycle may have happened in my car. 54 00:04:22,740 --> 00:04:30,180 Yesterday, there was quite a lot that's changed, even over the last few days. 55 00:04:30,520 --> 00:04:36,160 And certainly, if you run it on your computer as root, which you need to for the port number, you know, capabilities, etc. 56 00:04:36,320 --> 00:04:39,560 But still, you need some level of privilege. 57 00:04:39,700 --> 00:04:40,940 A two-year-old can hack your box. 58 00:04:41,280 --> 00:04:43,220 So, really, don't run it. 59 00:04:43,260 --> 00:04:46,560 I'm not having my wireless card in my computer right now for a very good reason, 60 00:04:46,620 --> 00:04:48,380 because when I demo the software, it would get out. 61 00:04:49,200 --> 00:04:49,680 All right. 62 00:04:50,880 --> 00:04:52,720 Now, obviously, this isn't... 63 00:04:52,740 --> 00:04:55,340 I'm not going to be here forever, but it's demo. 64 00:04:55,620 --> 00:04:57,680 So, here's what's going in. 65 00:04:58,660 --> 00:05:00,860 Application multiplexing, authentication, encryption. 66 00:05:01,320 --> 00:05:07,120 All in the session layer, all out of layer 7, pushing it into layer 5, and we're going to have software to do it. 67 00:05:07,760 --> 00:05:08,760 Things that go away. 68 00:05:09,280 --> 00:05:09,880 Port knocking. 69 00:05:10,240 --> 00:05:15,060 This was an idea that I just loved a long time ago when someone first said, 70 00:05:15,160 --> 00:05:21,040 you know what, we should be able to establish authentication by sending random packets of the specifically described sequence of ports, 71 00:05:21,200 --> 00:05:22,220 and suddenly... 72 00:05:22,740 --> 00:05:26,420 You knock on this port, and that port, and this port, and you hit the right sequence, 73 00:05:26,560 --> 00:05:28,200 and suddenly, for you, a port opens. 74 00:05:28,520 --> 00:05:29,920 I thought that was really clever. 75 00:05:30,940 --> 00:05:32,500 But, you know what's more clever? 76 00:05:32,720 --> 00:05:33,540 Doing it right. 77 00:05:34,940 --> 00:05:37,000 So, we're going to try and do it right here. 78 00:05:39,340 --> 00:05:40,780 Host-based firewalls. 79 00:05:42,500 --> 00:05:45,240 You know, everyone loves firewalls. 80 00:05:45,440 --> 00:05:49,200 So rarely do they actually improve anything, especially when it's on the host. 81 00:05:49,380 --> 00:05:51,760 Your applications are just going to punch holes through them anyways. 82 00:05:51,760 --> 00:05:57,260 Anyways, let's try and actually make it so that if you don't have services you want to expose to the world, 83 00:05:57,360 --> 00:05:59,480 you don't expose the services to the world. 84 00:06:00,720 --> 00:06:01,560 The hosts. 85 00:06:01,840 --> 00:06:08,880 This was a thing put in web servers a long time ago because we couldn't figure out how to actually multiplex anything on top of anything. 86 00:06:09,460 --> 00:06:18,540 And so, instead of getting 17 different IP addresses to determine what website your web server shows when you go to the web server, 87 00:06:18,580 --> 00:06:20,700 you use this thing where you stick in the host. 88 00:06:20,760 --> 00:06:21,120 And that... 89 00:06:21,760 --> 00:06:25,560 You have a header, and now the web server knows what it's supposed to show you, and it shows you something completely different. 90 00:06:25,940 --> 00:06:30,460 Now, of course, when DNS breaks, which, when Dan Kaminski's around, it seems to do pretty often, 91 00:06:32,220 --> 00:06:39,740 this all goes pretty chaotic, and, you know, you're hard-coding IP addresses into, et cetera, hosts, just to get things to work properly. 92 00:06:41,080 --> 00:06:44,620 So, it would be nice to try and see if we can get rid of this, too. 93 00:06:45,440 --> 00:06:51,740 You know, the typical setup on a nice, lightweight server these days is you've got a front-end web server, 94 00:06:51,740 --> 00:06:59,540 a web server that's doing proxying to back-end web servers, and you've got load balancers and all kinds of things that are really doing this type of thing. 95 00:06:59,920 --> 00:07:02,500 And then, really, they just really want to be a session layer. 96 00:07:02,660 --> 00:07:04,360 They really want to be a session layer. 97 00:07:04,500 --> 00:07:06,120 So, we're going to try and help them. 98 00:07:06,980 --> 00:07:10,040 And we're going to try and get rid of authentication as much as possible. 99 00:07:10,220 --> 00:07:16,240 Obviously, you can't do everything, but, you know, a lot of it, you just don't need it. 100 00:07:16,320 --> 00:07:21,140 You can authenticate yourself to a machine, and you can get all your services, one central place. 101 00:07:21,260 --> 00:07:21,720 I mean... 102 00:07:21,740 --> 00:07:22,300 And we have PAM. 103 00:07:22,440 --> 00:07:25,360 That was a great start, but it doesn't work so well on the network. 104 00:07:26,800 --> 00:07:27,460 Port numbers. 105 00:07:29,140 --> 00:07:29,540 Yeah. 106 00:07:30,740 --> 00:07:32,800 Really, I'm trying to get rid of port numbers. 107 00:07:32,940 --> 00:07:35,140 I think they're terrible, and I think they need to go. 108 00:07:37,220 --> 00:07:37,620 Yeah. 109 00:07:38,480 --> 00:07:43,000 So, if TCP and UDP hadn't done them, we'd have had a real session layer. 110 00:07:43,140 --> 00:07:44,260 We'd have had it 20 years ago. 111 00:07:45,240 --> 00:07:48,300 Instead, here we are, no session layer, port numbers. 112 00:07:49,480 --> 00:07:50,840 So, kind of a big deal. 113 00:07:51,740 --> 00:07:53,540 Just a little small change here. 114 00:07:55,420 --> 00:08:01,900 So, please, quickly, you know, if you're on the same page here, please shout an expletive. 115 00:08:02,040 --> 00:08:05,320 Or, excuse me, if you're not on the same page, please shout an expletive. 116 00:08:06,620 --> 00:08:07,440 There we go. 117 00:08:07,760 --> 00:08:12,760 And if you are on the same page, which none of you should be, hmm, interesting. 118 00:08:13,760 --> 00:08:17,060 You know, not a whole lot of audience participation from you folks. 119 00:08:18,980 --> 00:08:21,540 I was going to say the best thing about DEF CON was... 120 00:08:21,540 --> 00:08:24,880 Having hundreds of people swear at you, but now I guess I get to look like an idiot. 121 00:08:26,060 --> 00:08:26,860 Thank you. 122 00:08:27,000 --> 00:08:28,900 I appreciate that. 123 00:08:28,960 --> 00:08:33,340 If we can have a little bit more shouting of expletives now and again, accusing people of hating freedom. 124 00:08:33,840 --> 00:08:34,600 There we go. 125 00:08:35,380 --> 00:08:40,480 You know, I'm awkward when it's just me up here, and I haven't slept. 126 00:08:40,680 --> 00:08:43,480 So, a little shout at expletive really helps break the mood. 127 00:08:44,600 --> 00:08:48,440 So, let's take this slowly, in the order of most surprising to least surprising. 128 00:08:49,820 --> 00:08:50,740 No port numbers. 129 00:08:50,740 --> 00:08:54,800 Probably the most surprising thing that I'm going to tell you that I'm trying to get rid of today. 130 00:08:55,320 --> 00:08:56,480 There's some precedence. 131 00:08:56,880 --> 00:08:59,460 Port mapper, common RPC service. 132 00:08:59,640 --> 00:09:02,680 RPC services generally didn't run on the same port twice, 133 00:09:02,760 --> 00:09:06,840 so you needed a port mapper to map an RPC service to an actual port. 134 00:09:07,440 --> 00:09:08,260 Very similar. 135 00:09:08,600 --> 00:09:12,240 It used ports, but, you know, it's kind of the same idea. 136 00:09:13,940 --> 00:09:18,600 So, really, it's doing the same thing DNS does with IP addresses, except it's doing it with ports. 137 00:09:18,920 --> 00:09:18,940 Okay. 138 00:09:20,100 --> 00:09:20,540 Okay. 139 00:09:20,540 --> 00:09:24,540 So, those of you who really love DNS are going to quietly mutter to yourself, 140 00:09:24,780 --> 00:09:25,840 well, what about SRV records? 141 00:09:26,120 --> 00:09:30,820 And the answer is, you don't use them, so why are you telling me about SRV records? 142 00:09:33,520 --> 00:09:37,180 You know, yeah, and there's a reason none of your software uses them, 143 00:09:37,260 --> 00:09:39,380 because not every machine runs its own DNS server. 144 00:09:39,640 --> 00:09:42,400 The sysadmin doesn't control the DNS most of the time. 145 00:09:42,460 --> 00:09:44,480 Someone else controls the DNS most of the time, 146 00:09:44,540 --> 00:09:47,640 so it's not really smoothly integrated to expose those services via DNS. 147 00:09:47,820 --> 00:09:49,940 It's just not a good mechanism for port numbers. 148 00:09:50,540 --> 00:09:53,740 It's a decent mechanism for IP addresses, when Dan Kaminsky's not around, 149 00:09:53,900 --> 00:09:56,840 but for port numbers, it's just not very good. 150 00:09:57,920 --> 00:10:01,360 So, here I am, talking big, telling you I'm going to get rid of port numbers, 151 00:10:01,620 --> 00:10:03,880 and I haven't told you what I'm going to do yet. 152 00:10:05,320 --> 00:10:07,560 Well, RFC 1078. 153 00:10:08,380 --> 00:10:10,820 It's one probably no one has heard of. 154 00:10:10,840 --> 00:10:12,960 Has anyone in the room heard of this RFC before? 155 00:10:14,380 --> 00:10:15,000 Thank you. 156 00:10:18,340 --> 00:10:20,360 It's a very little-known protocol. 157 00:10:20,540 --> 00:10:24,020 It's all called TCP mux, and if you can't guess, 158 00:10:24,700 --> 00:10:28,360 multiplexing is going to be a theme in this talk that kind of underlies, 159 00:10:28,440 --> 00:10:31,920 but isn't terribly well exposed, because I made these slides when I was way too tired. 160 00:10:32,640 --> 00:10:35,180 And it celebrates its 20th birthday in November, 161 00:10:35,460 --> 00:10:37,900 which means it's almost as old as I am. 162 00:10:38,800 --> 00:10:41,280 It is, in fact, one year older. 163 00:10:42,160 --> 00:10:47,200 By the way, coming to DEF CON when you can't drink because it's not legal sucks. 164 00:10:51,500 --> 00:10:54,500 Yeah, as it turns out, the fix was, wait a while. 165 00:10:57,540 --> 00:11:00,400 So, TCP mux is actually a very simple protocol. 166 00:11:00,740 --> 00:11:03,160 Its entire specification consists of one paragraph. 167 00:11:03,440 --> 00:11:06,540 If you read the RFC, you know how they're laid out. 168 00:11:06,660 --> 00:11:09,400 They've got a lot of standard sections, and it's less than two pages long. 169 00:11:09,540 --> 00:11:11,140 Maybe it's three. I can't remember. 170 00:11:11,380 --> 00:11:14,220 Anyways, the actual protocol specification is a paragraph. 171 00:11:15,640 --> 00:11:17,320 Help provides a list of service names. 172 00:11:18,080 --> 00:11:18,960 That's help. 173 00:11:18,960 --> 00:11:24,500 Help, H-E-L-P, all caps, C-R-L-F. 174 00:11:25,220 --> 00:11:25,260 Yep. 175 00:11:26,420 --> 00:11:28,840 Type a service name, followed by C-R-L-F. 176 00:11:29,460 --> 00:11:32,500 Server responds with plus or minus, the characters, 177 00:11:32,700 --> 00:11:36,340 followed by an optional message, and yes, C-R-L-F. 178 00:11:37,180 --> 00:11:40,740 And then it says simply, the selected protocol starts. 179 00:11:42,600 --> 00:11:44,780 Not sure what that means, always. 180 00:11:45,820 --> 00:11:47,980 But the selected protocol starts, 181 00:11:47,980 --> 00:11:51,020 and that gives us a little bit of room to do things that are a little bit, 182 00:11:51,040 --> 00:11:53,060 not entirely what they envisioned. 183 00:11:54,280 --> 00:11:58,580 The RFC is completely silent on what happens after the selected protocol ends. 184 00:11:58,840 --> 00:12:00,920 It doesn't make any mention whatsoever. 185 00:12:01,260 --> 00:12:04,220 In fact, it just ends the protocol specification right here, 186 00:12:04,260 --> 00:12:05,700 with the selected protocol starting. 187 00:12:06,140 --> 00:12:09,400 So, we've taken some liberty with that. 188 00:12:10,560 --> 00:12:13,740 That and the idea of services. 189 00:12:14,040 --> 00:12:16,300 We added some, oh, sorry. 190 00:12:16,300 --> 00:12:20,100 The main point that we really need to use this RFC 191 00:12:20,100 --> 00:12:22,760 is it provides a very, very sexy port number. 192 00:12:23,200 --> 00:12:24,860 Again, I'm getting rid of ports, 193 00:12:24,960 --> 00:12:26,540 so if you're going to run an application, 194 00:12:26,760 --> 00:12:29,880 you have to run it over TCP, and you have to have some port number, 195 00:12:29,980 --> 00:12:32,420 so you might as well choose an arbitrary and sexy one, right? 196 00:12:34,600 --> 00:12:40,680 Run the command, and you get, there we are, port number one. 197 00:12:41,720 --> 00:12:46,140 Did anyone pay close attention in their etc. services 198 00:12:46,140 --> 00:12:48,240 file and actually ever see this service? 199 00:12:48,540 --> 00:12:51,660 I didn't know this was the one that claimed the first port 200 00:12:51,660 --> 00:12:53,600 until I got annoyed one day and said, 201 00:12:53,660 --> 00:12:55,300 I want to run something on port number one. 202 00:12:55,400 --> 00:12:56,080 What would I have to do? 203 00:12:56,780 --> 00:12:59,040 And then I submitted a talk for DEF CON 204 00:12:59,040 --> 00:13:01,340 and wrote software a couple days before, 205 00:13:01,520 --> 00:13:02,180 and here I am. 206 00:13:03,840 --> 00:13:06,900 So, since that port number is too good to pass up, 207 00:13:06,980 --> 00:13:10,000 we're complying with the RFC to the letter, 208 00:13:10,080 --> 00:13:13,760 all, you know, a couple hundred of them. 209 00:13:14,960 --> 00:13:16,120 And our protocol says, 210 00:13:16,120 --> 00:13:17,340 the protocol is extended via services 211 00:13:17,340 --> 00:13:19,740 that are built into the daemon we wrote 212 00:13:19,740 --> 00:13:21,600 and enable additional features. 213 00:13:22,740 --> 00:13:25,840 Contrary to the Microsoft Embrace, Extend, Extinguish approach, 214 00:13:26,060 --> 00:13:28,260 this is going to be the Embrace, Make Awesome, 215 00:13:28,340 --> 00:13:29,380 and Make Awesomer approach. 216 00:13:30,560 --> 00:13:33,440 So our built-ins, as of today, 217 00:13:33,700 --> 00:13:35,880 and I'm not joking, as of today, 218 00:13:37,380 --> 00:13:38,720 obviously we have help. 219 00:13:38,860 --> 00:13:40,720 This is required by the RFC. 220 00:13:40,980 --> 00:13:42,680 It lists your service names. 221 00:13:42,680 --> 00:13:44,280 We have Auth, 222 00:13:45,420 --> 00:13:48,060 a demonstration of which looks like this. 223 00:13:48,320 --> 00:13:52,400 So you type in Auth, all capitals, C-R-L-F, 224 00:13:52,560 --> 00:13:55,720 and it gives you back your required response 225 00:13:55,720 --> 00:14:00,320 with a perfectly verbose message of success. 226 00:14:00,720 --> 00:14:02,480 And then you can enter a username, 227 00:14:02,680 --> 00:14:03,820 and you can enter a password, 228 00:14:03,960 --> 00:14:05,200 and it tells you you've authenticated. 229 00:14:05,520 --> 00:14:07,060 Now, for those of you who are picky, 230 00:14:07,240 --> 00:14:09,100 you'll notice that when I demo this, 231 00:14:10,340 --> 00:14:12,660 this is the same username and the same password, 232 00:14:12,660 --> 00:14:15,680 and if you were to try anything else, 233 00:14:15,720 --> 00:14:16,580 it would probably fail, 234 00:14:17,800 --> 00:14:19,720 unless I have a bug, in which case it might succeed. 235 00:14:21,020 --> 00:14:23,140 So, yes, it's hard-coded in at the moment. 236 00:14:24,760 --> 00:14:26,840 Host, this one is what we're going to use 237 00:14:26,840 --> 00:14:27,860 to get rid of vHosts. 238 00:14:28,180 --> 00:14:32,700 And as you can see, here's our service, host, 239 00:14:33,440 --> 00:14:36,140 and it asks you which vHost, and you go to vHost. 240 00:14:36,780 --> 00:14:41,600 And then it knows your vHost, and it goes on about its day. 241 00:14:42,620 --> 00:14:45,260 This one is the one that actually probably matters 242 00:14:45,260 --> 00:14:47,100 from a security perspective for most of you. 243 00:14:47,220 --> 00:14:49,780 It's the one that actually allows you to make this thing secure 244 00:14:49,780 --> 00:14:53,300 so that when you're typing in, you know, usernames and passwords, 245 00:14:53,500 --> 00:14:54,660 they're not going in plain text. 246 00:14:56,340 --> 00:14:59,680 This is the protocol that does exactly what you think. 247 00:14:59,820 --> 00:15:01,800 You type in SSL. 248 00:15:01,960 --> 00:15:04,840 It waits for you to start an SSL handshake. 249 00:15:05,100 --> 00:15:07,280 You start an SSL handshake, 250 00:15:07,380 --> 00:15:11,580 and it presents you a certificate signed by a 512-year-old. 251 00:15:11,580 --> 00:15:12,380 It's a 12-bit RSA key. 252 00:15:13,080 --> 00:15:14,400 Self-signed, by the way, yeah. 253 00:15:16,720 --> 00:15:19,400 So, you know, obviously some room for improvement. 254 00:15:21,580 --> 00:15:24,820 Multiplex, which does all the really cool things. 255 00:15:25,040 --> 00:15:27,360 In fact, when I was first thinking about this software, 256 00:15:27,560 --> 00:15:29,740 this service didn't exactly come to mind. 257 00:15:29,840 --> 00:15:32,180 It's why it doesn't show up in the description of the talk. 258 00:15:32,720 --> 00:15:35,260 You'll notice in the description of the talk I listed several things, 259 00:15:35,400 --> 00:15:37,460 like wouldn't it be nice if we could do X, Y, and Z. 260 00:15:37,760 --> 00:15:39,460 And I never said, you know, 261 00:15:39,460 --> 00:15:43,040 run 17 TCP connections over one actual TCP connection. 262 00:15:43,320 --> 00:15:44,360 This one does that. 263 00:15:45,920 --> 00:15:50,780 So it basically, you take as many Layer 7 pieces of data, 264 00:15:50,880 --> 00:15:53,500 and you shove them on one Layer 4 connection, 265 00:15:53,700 --> 00:15:56,640 or one Layer 5 connection if you want to get specific 266 00:15:56,640 --> 00:15:59,300 now that we bothered to reopen a layer. 267 00:16:00,220 --> 00:16:02,360 And so this changes networking a little bit. 268 00:16:02,500 --> 00:16:06,780 The traditional model is your application connects to another application. 269 00:16:07,600 --> 00:16:08,900 I mean, this is standard. 270 00:16:09,460 --> 00:16:11,480 You have your application, it makes a syscall, 271 00:16:11,640 --> 00:16:13,140 it tells you what port it wants to connect, 272 00:16:13,260 --> 00:16:14,620 it goes off to another computer and says, 273 00:16:14,680 --> 00:16:16,200 I want to talk to the application on that port. 274 00:16:16,520 --> 00:16:17,940 It's application to application. 275 00:16:19,480 --> 00:16:23,040 With this software, your computer connects to another computer. 276 00:16:23,500 --> 00:16:27,380 And your applications use that session to communicate 277 00:16:27,380 --> 00:16:30,180 very similarly to what happens today. 278 00:16:30,300 --> 00:16:32,260 In fact, we're going to use several existing applications. 279 00:16:33,500 --> 00:16:35,520 And by existing, I mean NetCap. 280 00:16:36,960 --> 00:16:37,480 So... 281 00:16:37,480 --> 00:16:41,080 So maybe it's running a couple of shell scripts, too. 282 00:16:41,760 --> 00:16:44,200 So in general, it looks like this. 283 00:16:44,240 --> 00:16:45,460 You've got your actual app, 284 00:16:45,580 --> 00:16:47,980 and it connects to your computer's session client. 285 00:16:48,420 --> 00:16:51,500 And that connects to the actual session daemon, 286 00:16:51,600 --> 00:16:53,500 which connects to the actual service. 287 00:16:53,800 --> 00:16:59,320 So the arrow between the session client and Fived 288 00:16:59,320 --> 00:17:01,060 is the one that's supposed to be long, 289 00:17:01,180 --> 00:17:03,340 and there's supposed to be an internet in between there. 290 00:17:03,940 --> 00:17:06,020 I don't have a little cloudy symbol, 291 00:17:06,140 --> 00:17:07,460 so I didn't put the internet there. 292 00:17:07,460 --> 00:17:09,260 But that's where the internet would go. 293 00:17:09,820 --> 00:17:11,720 But as a matter of fact, if you really wanted to, 294 00:17:11,760 --> 00:17:13,460 you could put the internet in between any of these. 295 00:17:13,800 --> 00:17:15,820 So Fived could act as a load balancer. 296 00:17:16,080 --> 00:17:17,920 It could act as whatever you needed. 297 00:17:18,080 --> 00:17:18,760 It can be... 298 00:17:20,640 --> 00:17:23,840 The example that comes to mind, since I'm a student at UCSD, 299 00:17:24,000 --> 00:17:26,460 is, you know, we could have one session server, 300 00:17:26,620 --> 00:17:28,240 and it would be ucsd.edu. 301 00:17:28,520 --> 00:17:30,140 And then everything could go through that. 302 00:17:30,280 --> 00:17:32,640 And you could just have one sweet sign-on system. 303 00:17:32,900 --> 00:17:35,140 And I would only have to identify myself once. 304 00:17:35,180 --> 00:17:36,280 I could get my mail. 305 00:17:36,280 --> 00:17:37,640 I could change my grades. 306 00:17:37,800 --> 00:17:38,860 Wait, not change my grades. 307 00:17:38,980 --> 00:17:41,420 I could, you know, do all the things 308 00:17:41,420 --> 00:17:42,820 that I would expect to do as a student. 309 00:17:42,920 --> 00:17:44,300 You know, drop classes, actually, 310 00:17:44,400 --> 00:17:45,780 I think more often than changing grades. 311 00:17:47,420 --> 00:17:49,340 So we're going to go ahead and demo it now. 312 00:17:49,580 --> 00:17:51,980 And, you know, we're going to try and ignore the fact 313 00:17:51,980 --> 00:17:53,560 that I don't actually have four different computers, 314 00:17:53,600 --> 00:17:56,840 and that really my computer is just pretending 315 00:17:56,840 --> 00:17:59,060 to be rampantly multi-personality here. 316 00:18:01,900 --> 00:18:02,880 And let's see. 317 00:18:03,460 --> 00:18:05,140 First off, Book of Mozilla. 318 00:18:06,460 --> 00:18:08,460 I don't know if you ever noticed this, 319 00:18:08,580 --> 00:18:10,340 but if you type in about Mozilla in Mozilla, 320 00:18:10,400 --> 00:18:11,680 it comes up with a different one 321 00:18:11,680 --> 00:18:12,860 that they change every now and again. 322 00:18:14,120 --> 00:18:18,220 Anyways, so let's pop this thing into presentation mode. 323 00:18:22,460 --> 00:18:23,280 That didn't work. 324 00:18:25,900 --> 00:18:26,780 Can you see that? 325 00:18:27,480 --> 00:18:27,880 Yes? 326 00:18:28,960 --> 00:18:29,360 Awesome. 327 00:18:31,160 --> 00:18:33,100 So here we have our demo client. 328 00:18:33,940 --> 00:18:36,020 It is, in fact, named demo. 329 00:18:36,020 --> 00:18:41,420 And our usage is you can pass an S-switch or an M-switch. 330 00:18:41,700 --> 00:18:43,100 The S-switch does SSL, 331 00:18:43,580 --> 00:18:45,860 and the M-switch does multiplexing. 332 00:18:46,220 --> 00:18:47,840 The reason we have a demo client 333 00:18:47,840 --> 00:18:49,860 instead of me just showing you with Netcat 334 00:18:49,860 --> 00:18:52,160 is because, you know, I really tried, 335 00:18:52,340 --> 00:18:54,760 but I can't do an SSL handshake in my head. 336 00:18:55,580 --> 00:18:58,080 I wish I could, but it's just tricky. 337 00:18:58,300 --> 00:19:00,400 You know, the exponential encryption, 338 00:19:00,780 --> 00:19:03,180 it, you know, tricky to get right. 339 00:19:03,180 --> 00:19:06,780 Okay, so starting the daemon. 340 00:19:07,080 --> 00:19:08,500 We've got the services running. 341 00:19:09,900 --> 00:19:11,700 And we're doing pretty well on time. 342 00:19:13,120 --> 00:19:14,820 Too well. I'm going too fast. 343 00:19:14,860 --> 00:19:15,100 Oh, well. 344 00:19:17,760 --> 00:19:20,660 So we're going to use our demo client. 345 00:19:20,860 --> 00:19:21,240 Oops. 346 00:19:23,260 --> 00:19:24,460 And here it is. 347 00:19:24,860 --> 00:19:25,300 Help. 348 00:19:26,280 --> 00:19:27,180 And there we are. 349 00:19:27,380 --> 00:19:31,060 So as you can see, we have a perfectly RFC-compliant, 350 00:19:31,060 --> 00:19:32,700 very simple server here. 351 00:19:33,180 --> 00:19:34,080 It's offering... 352 00:19:36,460 --> 00:19:36,940 Really? 353 00:19:46,160 --> 00:19:47,120 Hold on. 354 00:19:47,280 --> 00:19:49,120 It's going to be a little bit tricky. 355 00:19:49,380 --> 00:19:49,460 Oop. 356 00:19:52,380 --> 00:19:52,860 And... 357 00:19:53,540 --> 00:19:54,660 Da-da-da-da-da. 358 00:19:55,500 --> 00:19:56,220 Is that good? 359 00:19:58,360 --> 00:19:58,840 Excellent. 360 00:19:59,500 --> 00:20:02,700 All right, so Help is listing the following service, 361 00:20:02,700 --> 00:20:04,560 the multiplex one that we saw earlier, 362 00:20:05,000 --> 00:20:06,680 the SSL service, the auth service, 363 00:20:07,020 --> 00:20:09,080 the host service, and a web service. 364 00:20:09,420 --> 00:20:11,340 Everyone loves the web, except me. 365 00:20:11,440 --> 00:20:11,980 I'm a communist. 366 00:20:14,220 --> 00:20:16,900 But we actually don't want the... 367 00:20:17,480 --> 00:20:18,980 Yeah, I know. 368 00:20:20,080 --> 00:20:22,320 We don't want the plain text one, 369 00:20:22,440 --> 00:20:23,840 because that's just... 370 00:20:23,840 --> 00:20:26,180 You know, it's so much more satisfying 371 00:20:26,180 --> 00:20:28,460 when you use a useful script or graphic layer 372 00:20:28,460 --> 00:20:31,120 that, you know, is blatantly man-in-the-middle attackable 373 00:20:31,120 --> 00:20:32,220 because of bad certificates. 374 00:20:32,720 --> 00:20:34,320 So we're going to enable SSL, 375 00:20:34,400 --> 00:20:38,160 and now we go ahead and the demo client goes to the server. 376 00:20:38,260 --> 00:20:40,360 It goes ahead and does the SSL service 377 00:20:40,360 --> 00:20:42,540 and does a handshake, and as we can see, 378 00:20:42,600 --> 00:20:44,360 the SSL service is no longer available 379 00:20:44,360 --> 00:20:45,260 because we've used it. 380 00:20:47,100 --> 00:20:49,560 And we're going to go ahead and switch hosts. 381 00:20:50,340 --> 00:20:52,300 We're going to go to a host called Toys 382 00:20:52,300 --> 00:20:56,060 because it contains things like, you know, 383 00:20:56,100 --> 00:20:58,480 an echo daemon and a hello daemon, 384 00:20:58,600 --> 00:21:01,100 which really aren't used so much anymore. 385 00:21:01,100 --> 00:21:04,040 I don't know why, but, you know, 386 00:21:04,080 --> 00:21:05,720 everyone used to have an echo daemon running, 387 00:21:05,900 --> 00:21:06,420 and then, of course, 388 00:21:06,480 --> 00:21:08,380 someone put the character generation daemon 389 00:21:08,380 --> 00:21:10,560 and told the echo daemon to go find 390 00:21:10,560 --> 00:21:11,820 the character generation daemon, 391 00:21:11,880 --> 00:21:13,480 and the box proceeded to DOS itself. 392 00:21:16,080 --> 00:21:18,040 Anyways, we have an echo daemon here, 393 00:21:19,240 --> 00:21:20,680 but we're going to use the hello one 394 00:21:20,680 --> 00:21:22,920 because it's nice and courteous, 395 00:21:22,920 --> 00:21:25,360 and it says hello, and then there we go. 396 00:21:25,460 --> 00:21:26,340 The protocol's over. 397 00:21:26,500 --> 00:21:28,340 The selected protocol began, 398 00:21:28,540 --> 00:21:30,400 and the selected protocol ended. 399 00:21:31,100 --> 00:21:32,060 And our connection is done. 400 00:21:33,040 --> 00:21:35,240 Simple, right? I'm done. 401 00:21:35,340 --> 00:21:39,900 No, so the idea, though, 402 00:21:39,960 --> 00:21:42,020 is that we want our sessions to be 403 00:21:42,020 --> 00:21:45,180 just a teeny bit more persistent here. 404 00:21:46,600 --> 00:21:48,200 But before I go there, 405 00:21:48,340 --> 00:21:57,000 let's show the rest of the auth here with SSL. 406 00:21:57,080 --> 00:21:57,580 There we go. 407 00:21:59,980 --> 00:22:00,480 Man. 408 00:22:01,100 --> 00:22:01,220 Okay. 409 00:22:02,040 --> 00:22:04,520 So it would be wonderful, you know, if... 410 00:22:04,960 --> 00:22:06,320 When I'm looking for a service, 411 00:22:06,400 --> 00:22:08,220 it's almost always that I'm looking for a shell. 412 00:22:08,980 --> 00:22:09,380 Oh. 413 00:22:10,780 --> 00:22:12,620 Well, I guess I'm not going to find one, 414 00:22:12,680 --> 00:22:15,500 or at least not until I tell it who I am. 415 00:22:18,520 --> 00:22:20,720 And now I have a shell. 416 00:22:22,640 --> 00:22:23,620 See? It's a shell. 417 00:22:24,480 --> 00:22:25,120 There's the shell. 418 00:22:26,060 --> 00:22:26,460 Projects. 419 00:22:27,480 --> 00:22:27,880 Five. 420 00:22:28,100 --> 00:22:28,500 Oop. 421 00:22:29,060 --> 00:22:30,280 It helps if you can type. 422 00:22:31,820 --> 00:22:34,080 And there's the entire source code for the program. 423 00:22:34,700 --> 00:22:36,300 I hope you caught that. 424 00:22:36,340 --> 00:22:37,200 Was it a little fast? 425 00:22:41,700 --> 00:22:42,160 Better? 426 00:22:45,800 --> 00:22:50,980 So I think at the moment that this now qualifies as self-hosting, 427 00:22:51,000 --> 00:22:53,120 which is a milestone in the development 428 00:22:53,120 --> 00:22:54,680 of every source code management system, 429 00:22:54,880 --> 00:22:57,320 except this isn't a source code management system. 430 00:22:57,700 --> 00:22:59,580 But if it was, it would be self-hosting. 431 00:23:01,900 --> 00:23:05,300 And, you know, we've got a shell that we're now going to exit from. 432 00:23:06,880 --> 00:23:07,320 Okay. 433 00:23:08,280 --> 00:23:15,320 So now we need to stop getting our things actually where the protocol ends 434 00:23:15,320 --> 00:23:17,580 and everything goes to hell. 435 00:23:17,920 --> 00:23:21,000 So let's use this multiplexing thing that we're so excited about. 436 00:23:21,140 --> 00:23:23,220 Or, well, I'm excited about it. 437 00:23:23,280 --> 00:23:25,280 You guys are probably sitting there going, 438 00:23:25,380 --> 00:23:26,840 wow, he's really tired, isn't he? 439 00:23:28,020 --> 00:23:29,480 So now we're, you know, 440 00:23:29,480 --> 00:23:31,320 the S switch enables SSL. 441 00:23:31,360 --> 00:23:32,960 The M switch enables multiplexing. 442 00:23:33,060 --> 00:23:33,940 And here we are. 443 00:23:34,000 --> 00:23:35,120 We've got a multiplex connection. 444 00:23:35,540 --> 00:23:36,660 We can do our things before. 445 00:23:37,120 --> 00:23:39,340 Let's go ahead and get ourselves authenticated. 446 00:23:40,580 --> 00:23:41,780 Demo, demo pass. 447 00:23:43,380 --> 00:23:44,700 And here we are. 448 00:23:44,880 --> 00:23:45,860 We're authenticated. 449 00:23:46,140 --> 00:23:48,460 Let's throw ourselves, eh, you know what? 450 00:23:48,900 --> 00:23:51,900 Let's go, yeah, let's throw ourselves into the other vhost. 451 00:23:53,300 --> 00:23:53,900 Can't type. 452 00:23:54,520 --> 00:23:55,680 And here we are. 453 00:23:55,700 --> 00:23:56,760 We've got our list of services. 454 00:23:56,980 --> 00:23:59,160 Auth, host, shell, echo. 455 00:23:59,480 --> 00:24:00,380 Hello, web. 456 00:24:02,080 --> 00:24:03,200 So, web. 457 00:24:05,540 --> 00:24:08,840 So now instead of actually starting the selected protocol, 458 00:24:09,160 --> 00:24:11,980 the server starts the selected protocol, 459 00:24:12,180 --> 00:24:13,440 but this is the client. 460 00:24:13,720 --> 00:24:17,080 And the client noticed that the server started a separate protocol 461 00:24:17,080 --> 00:24:20,620 and noticed that it got embedded, slipstreamed, if you will, 462 00:24:20,700 --> 00:24:23,140 into the existing session that was open. 463 00:24:23,340 --> 00:24:26,500 So now the client, our little demo client, 464 00:24:26,600 --> 00:24:29,460 has gone and opened a port, online, 465 00:24:29,480 --> 00:24:32,720 and local host that allows us to access this separate service 466 00:24:32,720 --> 00:24:36,680 so that any communication that happens on this port in the future 467 00:24:36,680 --> 00:24:38,880 can be slipstreamed back through this one connection. 468 00:24:39,480 --> 00:24:43,320 Because, you know, Firefox doesn't yet really know how to interact with my software. 469 00:24:43,680 --> 00:24:44,600 They're very slow. 470 00:24:45,080 --> 00:24:47,120 I mean, I made it yesterday. 471 00:24:48,960 --> 00:24:49,480 Anyways. 472 00:24:50,800 --> 00:24:52,560 Not with the laughing these days. 473 00:24:52,760 --> 00:24:53,040 All right. 474 00:24:54,420 --> 00:24:55,460 Local host. 475 00:24:56,020 --> 00:24:57,080 And here we are. 476 00:24:57,080 --> 00:24:59,700 We have a fun web page because it's the fun host. 477 00:24:59,960 --> 00:25:00,980 Or the toys host. 478 00:25:02,140 --> 00:25:03,240 And here we are. 479 00:25:04,300 --> 00:25:05,700 But you know what? 480 00:25:06,420 --> 00:25:07,840 Now that I think about it, 481 00:25:10,340 --> 00:25:13,640 I don't want a web page with red in it. 482 00:25:13,960 --> 00:25:15,660 So let's go back to the main host, 483 00:25:15,820 --> 00:25:20,100 which is more of a business-friendly web page. 484 00:25:20,240 --> 00:25:24,700 We're going to run this connection over this port. 485 00:25:26,320 --> 00:25:29,860 So now we have three different layer 7 connections going. 486 00:25:29,920 --> 00:25:33,240 We have the main one that's interacting with the help menu. 487 00:25:33,400 --> 00:25:35,080 Notice how we can still use this one. 488 00:25:35,440 --> 00:25:36,780 This is still giving us data. 489 00:25:37,140 --> 00:25:38,960 And we had the old web connection, 490 00:25:39,200 --> 00:25:40,840 which we shot in the face a while back. 491 00:25:41,020 --> 00:25:42,400 And now we have this web connection. 492 00:25:42,740 --> 00:25:45,080 They're all running over one physical TCP connection. 493 00:25:45,820 --> 00:25:46,380 Only one. 494 00:25:47,220 --> 00:25:49,620 And we're not, you know, taking layer 2 packets 495 00:25:49,620 --> 00:25:51,480 and throwing them in layer 4. 496 00:25:51,540 --> 00:25:54,640 We're actually legitimately taking the layer 7 data 497 00:25:54,640 --> 00:25:54,680 and running it over the main host. 498 00:25:54,680 --> 00:25:57,960 And putting headers on it. 499 00:25:58,140 --> 00:25:59,900 And not headers on each packet, 500 00:26:00,020 --> 00:26:02,520 but actually headers within the reliable byte streams. 501 00:26:02,680 --> 00:26:05,360 Because this software knows nothing about packets, 502 00:26:05,500 --> 00:26:07,300 and frankly shouldn't know anything about packets. 503 00:26:08,960 --> 00:26:11,980 So now we have our web. 504 00:26:13,280 --> 00:26:14,080 You know what? 505 00:26:14,180 --> 00:26:15,280 Let's get away from the web. 506 00:26:15,820 --> 00:26:17,540 So here's our help. 507 00:26:18,720 --> 00:26:19,580 What do you think? 508 00:26:20,800 --> 00:26:23,700 I'm taking suggestions on what the next service to multiplex 509 00:26:23,700 --> 00:26:25,020 over this connection is going to be. 510 00:26:27,840 --> 00:26:28,320 Telnet. 511 00:26:28,780 --> 00:26:29,840 I've got a shell. 512 00:26:30,080 --> 00:26:30,800 Do you want a shell? 513 00:26:33,940 --> 00:26:35,220 So here's a shell. 514 00:26:35,580 --> 00:26:37,840 And we can connect to it through Telnet. 515 00:26:37,980 --> 00:26:39,000 But Telnet sucks. 516 00:26:39,340 --> 00:26:41,160 So let's use Netcat instead. 517 00:26:43,260 --> 00:26:44,780 And so, oh, wait. 518 00:26:44,840 --> 00:26:46,540 We switched out of presentation mode here. 519 00:26:47,360 --> 00:26:47,920 Darn it. 520 00:26:48,820 --> 00:26:49,580 Here we are. 521 00:26:49,940 --> 00:26:50,820 Now you can see it. 522 00:26:51,020 --> 00:26:52,380 So Netcat. 523 00:26:52,380 --> 00:26:55,560 We're going to the socket that our client opened up for us. 524 00:26:55,820 --> 00:26:57,060 And lo and behold, 525 00:26:57,300 --> 00:27:01,160 we have ourselves a fully functional shell, 526 00:27:01,320 --> 00:27:04,600 as long as you don't want a prompt or anything else 527 00:27:04,600 --> 00:27:06,040 that might resemble a shell. 528 00:27:06,180 --> 00:27:08,160 Notice the reset commands absolutely do nothing, 529 00:27:08,180 --> 00:27:09,640 because you're not running on a real terminal, 530 00:27:09,760 --> 00:27:11,700 and this is not a terminal emulator. 531 00:27:12,900 --> 00:27:14,500 Which, from what I understand, 532 00:27:14,560 --> 00:27:16,220 is about as functional as the SSH functionality 533 00:27:16,220 --> 00:27:17,300 on the iPhone these days. 534 00:27:20,280 --> 00:27:21,820 Yeah, we went there. 535 00:27:23,260 --> 00:27:23,660 Yeah. 536 00:27:24,420 --> 00:27:26,080 So now let's start an echo server. 537 00:27:27,640 --> 00:27:29,280 What do you mean, no such service? 538 00:27:31,320 --> 00:27:31,720 Oh. 539 00:27:32,940 --> 00:27:35,100 Well, let's go to the one where it... 540 00:27:35,780 --> 00:27:38,040 Don't have spaces at the end of your service names. 541 00:27:38,120 --> 00:27:39,360 It's not the service you thought it was. 542 00:27:40,620 --> 00:27:43,440 Now let's go back to the host that did have the service. 543 00:27:44,740 --> 00:27:45,140 Help. 544 00:27:45,680 --> 00:27:46,680 There's our echo service. 545 00:27:47,240 --> 00:27:48,560 Got to love the echo service. 546 00:27:49,740 --> 00:27:50,840 Da-da-da-da-da. 547 00:27:50,840 --> 00:27:51,000 Uh... 548 00:27:53,100 --> 00:27:55,220 You know, it's always boring 549 00:27:55,220 --> 00:27:57,440 when someone's sitting there typing commands in a computer. 550 00:27:57,640 --> 00:28:00,380 I wish there was something that I could do, 551 00:28:00,520 --> 00:28:02,600 but it's hard to show you it any other way. 552 00:28:02,920 --> 00:28:04,900 I don't have a nice 3-D visualization 553 00:28:04,900 --> 00:28:06,040 for networking traffic. 554 00:28:06,220 --> 00:28:07,140 I'm very sorry. 555 00:28:09,660 --> 00:28:11,160 Okay, so here we are. 556 00:28:11,960 --> 00:28:12,760 And, uh... 557 00:28:14,620 --> 00:28:15,020 . 558 00:28:32,640 --> 00:28:41,160 So as it turns out, no spell check here. The computer is happily repeating everything 559 00:28:41,160 --> 00:28:46,420 back to us, and of course, we still have our shell running over here, perfectly functional. 560 00:28:47,560 --> 00:28:52,880 So let me just recap this again because it's a very subtle point and it's very important. 561 00:28:53,280 --> 00:29:02,500 This connection is running on the same connection that this connection is running on. They're 562 00:29:02,500 --> 00:29:10,300 both on the same TCP connection. In fact, if we kill this here, these die. Dead. Completely 563 00:29:11,160 --> 00:29:15,120 authenticated. They're not separate. It's all on the same thing. We're reusing our session. 564 00:29:15,340 --> 00:29:19,820 We were known to the computer at the same time. We were completely authenticated, and 565 00:29:21,360 --> 00:29:22,680 they all went away. 566 00:29:23,240 --> 00:29:29,280 So since I'm running faster than I thought I would, let's go ahead and explain exactly 567 00:29:29,280 --> 00:29:37,580 how this works from a little bit more of a technical perspective. So I said that it was 568 00:29:40,040 --> 00:29:41,140 multiplexing layer-settings. 569 00:29:41,140 --> 00:29:48,260 So we have seven connections down onto the layer-five service. So the way you would think 570 00:29:48,260 --> 00:29:51,120 that this would be done is you would add a header in the packet and it would tell you 571 00:29:51,120 --> 00:29:57,140 which application it is, and if you think about it for a moment, you would have realized 572 00:29:57,140 --> 00:30:01,460 that you would have just implemented port numbers because that's exactly what TCP does. It 573 00:30:01,460 --> 00:30:05,440 tags each packet with an actual number that tells you which application it's coming from 574 00:30:05,440 --> 00:30:10,400 and which application it's going to. So we're doing something slightly different. We're actually 575 00:30:10,400 --> 00:30:17,320 treating TCP properly as an in-order byte stream, and we go ahead and throw a header 576 00:30:17,320 --> 00:30:21,520 in as soon as multiplex mode is enabled—we throw a header in that says, hi, basically. 577 00:30:22,020 --> 00:30:29,460 And the header consists of 16 octets for different fields. The first is a version number 578 00:30:29,460 --> 00:30:33,460 because if you don't have a version number, when your protocol changes, everything breaks. 579 00:30:34,280 --> 00:30:39,720 The second one is an application ID. You can pretend it's a port number if you really want, 580 00:30:40,400 --> 00:30:44,920 The third one is a series of flags, out of which two are defined and the rest are reserved. 581 00:30:46,020 --> 00:30:51,320 And the last one is a length, and the length dictates when you'll see the next header. 582 00:30:52,420 --> 00:30:53,780 So that's how it works. 583 00:30:53,900 --> 00:31:00,160 You know in advance, you know, when you put a chunk onto the network, you take it with the header, 584 00:31:00,260 --> 00:31:02,620 and then you tell it where to find the next header. 585 00:31:03,080 --> 00:31:08,300 And so it's constantly picking up these headers and then taking the next piece of data 586 00:31:08,300 --> 00:31:13,240 and then taking that data and throwing it at an application and then looking at the next header 587 00:31:13,240 --> 00:31:16,520 and then slurping up however much data it says to slurp up 588 00:31:16,520 --> 00:31:19,480 and then taking that one and throwing it at a completely different application 589 00:31:19,480 --> 00:31:22,600 or the same application if the same application sends something twice. 590 00:31:23,740 --> 00:31:30,880 There's some optimization tricks you can do here that we didn't, but, you know, it's very much possible. 591 00:31:31,360 --> 00:31:34,420 So let's see. 592 00:31:35,480 --> 00:31:36,900 We finished the demos. 593 00:31:37,420 --> 00:31:38,240 We boarded. 594 00:31:38,300 --> 00:31:38,640 The audience. 595 00:31:39,100 --> 00:31:40,380 We talked about communism. 596 00:31:41,800 --> 00:31:42,280 Okay. 597 00:31:42,480 --> 00:31:43,700 So what? 598 00:31:44,600 --> 00:31:45,580 More about communism? 599 00:31:46,280 --> 00:31:47,060 Soviet Russia. 600 00:31:48,840 --> 00:31:54,440 Random parting thoughts, because I don't get a chance to stand in front of a bunch of people very often. 601 00:31:55,500 --> 00:31:57,480 You know, IPv6 is sweet. 602 00:31:57,640 --> 00:31:58,340 You should all use it. 603 00:31:59,340 --> 00:32:00,580 We're running it at home. 604 00:32:00,900 --> 00:32:01,860 Automatic configuration. 605 00:32:02,400 --> 00:32:03,440 You fire the thing up. 606 00:32:03,520 --> 00:32:04,120 You grab a tunnel. 607 00:32:04,340 --> 00:32:06,660 Suddenly all your computers have IPv6. 608 00:32:07,500 --> 00:32:08,280 I joked. 609 00:32:08,300 --> 00:32:11,100 I joked that it's giving me back the Internet again because I have a public IP address. 610 00:32:12,120 --> 00:32:15,160 You know, it's a useless public IP address because no one can contact it. 611 00:32:15,320 --> 00:32:18,220 But it's a public IP address nonetheless, and I'm very happy with that 612 00:32:18,220 --> 00:32:22,820 because I had public IP addresses way up until 2000, 613 00:32:23,180 --> 00:32:26,200 actually way through all the way down until I moved into college, 614 00:32:26,400 --> 00:32:31,220 and then I was in a metropolis and cable modemed. 615 00:32:32,720 --> 00:32:34,600 Anyways, other random parting thoughts. 616 00:32:34,940 --> 00:32:36,400 Intel provides microcode updates. 617 00:32:36,720 --> 00:32:38,280 Most Linux machines don't. 618 00:32:38,280 --> 00:32:40,840 Almost all Windows machines do. 619 00:32:41,080 --> 00:32:44,240 This is the one place where Linux is really just far behind in security. 620 00:32:44,760 --> 00:32:48,080 For those of you who are wondering why I'm not talking about anything related to my topic, 621 00:32:48,180 --> 00:32:49,700 it's because I'm near the end of the presentation. 622 00:32:54,040 --> 00:32:57,540 He should know because he has to actually deal with x86 all day. 623 00:32:58,360 --> 00:32:58,980 Poor man. 624 00:33:01,960 --> 00:33:05,340 Yeah, he tells himself that every night as he weeps himself to sleep. 625 00:33:06,740 --> 00:33:07,900 Firewalls are a poor man's substitute. 626 00:33:08,280 --> 00:33:08,680 For security. 627 00:33:09,040 --> 00:33:11,320 And security shouldn't be an excuse not to do things. 628 00:33:11,540 --> 00:33:13,200 The last one are just philosophical points. 629 00:33:14,380 --> 00:33:16,540 Anyways, also for those of you with conference CDs, 630 00:33:16,820 --> 00:33:20,180 the slides on them are not the same as the slides I've just presented. 631 00:33:21,020 --> 00:33:23,620 They're not quite as terribly atrocious as I said, 632 00:33:23,800 --> 00:33:27,380 but there will be updates on the DEF CON website and my own website, 633 00:33:27,600 --> 00:33:30,860 and you can grab the current copy of the slides if for some reason 634 00:33:30,860 --> 00:33:33,720 you want to see the slides that had so much information on it, 635 00:33:33,760 --> 00:33:35,700 like demos, demos, demos. 636 00:33:36,040 --> 00:33:37,680 You know, this is really an informative slide, 637 00:33:37,760 --> 00:33:38,260 and you should take it. 638 00:33:38,280 --> 00:33:39,780 Take it back to your workplace and share it with your coworkers. 639 00:33:40,440 --> 00:33:41,320 What's your website? 640 00:33:42,040 --> 00:33:43,140 I'm getting there. 641 00:33:43,720 --> 00:33:44,540 Just hold on. 642 00:33:45,260 --> 00:33:47,860 Would anyone like to accuse me of hitting freedom or ask me a question? 643 00:33:48,780 --> 00:33:51,140 This will continue in room 104 later. 644 00:33:57,220 --> 00:33:57,760 I'm sorry. 645 00:33:58,040 --> 00:33:58,180 Can you? 646 00:34:00,980 --> 00:34:01,380 Yeah. 647 00:34:02,460 --> 00:34:05,780 So the question was, how does it know when to close a session? 648 00:34:06,980 --> 00:34:08,260 So the session closed. 649 00:34:08,280 --> 00:34:10,760 So the session client manages completely the session with the session server. 650 00:34:10,980 --> 00:34:13,400 So the session client can close a session whenever it wants. 651 00:34:13,480 --> 00:34:16,100 If you're asking how the individual applications that are multiplexed 652 00:34:16,100 --> 00:34:18,140 on top of the TCP stream know when to close, 653 00:34:18,860 --> 00:34:23,780 the header has, again, I said the header had two flags that were implemented. 654 00:34:24,040 --> 00:34:26,840 One is this ID is new, 655 00:34:27,520 --> 00:34:35,620 and that symbolizes to the actual session client that it needs to open up a new stream. 656 00:34:35,860 --> 00:34:38,140 And so whenever one of those headers came in, 657 00:34:38,280 --> 00:34:43,560 that's what caused this thing to spawn off a port here. 658 00:34:43,720 --> 00:34:46,580 So you see this where it says listening on port. 659 00:34:46,720 --> 00:34:50,300 That was directly because a header was sent to it that said we have a new ID. 660 00:34:51,480 --> 00:34:57,360 And for closing, there's a corresponding one that's the delete flag, 661 00:34:57,500 --> 00:34:58,900 and it does much the same thing. 662 00:34:59,260 --> 00:34:59,700 Yeah. 663 00:35:00,040 --> 00:35:00,480 Yeah. 664 00:35:04,880 --> 00:35:06,300 I can't even hear you. 665 00:35:06,320 --> 00:35:06,880 I'm very sorry. 666 00:35:22,300 --> 00:35:25,080 It identifies itself to a web server, 667 00:35:25,200 --> 00:35:27,160 but it's only made to identify itself to a web server. 668 00:35:27,260 --> 00:35:29,160 It's not made to identify itself to a telnet server. 669 00:35:30,560 --> 00:35:32,480 That needs to happen on a completely different layer. 670 00:35:33,720 --> 00:35:34,380 Someone else? 671 00:35:34,500 --> 00:35:35,840 I saw a hand back there. 672 00:35:36,020 --> 00:35:36,420 Yeah. 673 00:35:43,180 --> 00:35:43,880 I'm sorry. 674 00:35:43,960 --> 00:35:45,280 Can you stand up and scream a little bit louder? 675 00:35:47,060 --> 00:35:47,580 Yeah. 676 00:35:53,020 --> 00:35:57,600 Is it going to be a nightmare for network monitoring people? 677 00:36:04,740 --> 00:36:05,260 So, 678 00:36:05,320 --> 00:36:08,200 so I'm really, 679 00:36:08,200 --> 00:36:09,500 I'm really wondering where you got the impression 680 00:36:09,500 --> 00:36:12,320 that things weren't already a nightmare for network monitoring people. 681 00:36:12,900 --> 00:36:13,260 I, 682 00:36:13,940 --> 00:36:14,380 I, 683 00:36:15,560 --> 00:36:16,000 I, 684 00:36:17,000 --> 00:36:17,280 I, 685 00:36:17,280 --> 00:36:17,620 I, 686 00:36:17,620 --> 00:36:18,680 I understand the concern, 687 00:36:18,840 --> 00:36:19,840 and I gave a talk at, 688 00:36:21,160 --> 00:36:21,600 well, 689 00:36:21,760 --> 00:36:21,940 well, 690 00:36:21,940 --> 00:36:22,360 hold on. 691 00:36:22,500 --> 00:36:24,000 I understand the concern, 692 00:36:24,120 --> 00:36:24,460 and I, 693 00:36:24,540 --> 00:36:24,860 and I, 694 00:36:24,860 --> 00:36:26,520 and I was actually with you last year. 695 00:36:26,580 --> 00:36:30,120 I gave a talk last year about how virtualization is going to ruin the world 696 00:36:30,120 --> 00:36:33,120 because your hardware firewalls basically don't work anymore. 697 00:36:35,040 --> 00:36:35,480 The, 698 00:36:35,640 --> 00:36:36,160 you know, 699 00:36:36,180 --> 00:36:38,120 people have come to similar ideas, 700 00:36:38,200 --> 00:36:38,720 um, 701 00:36:39,440 --> 00:36:39,840 recently, 702 00:36:39,960 --> 00:36:40,220 and, 703 00:36:40,320 --> 00:36:40,580 and, 704 00:36:40,580 --> 00:36:42,020 and the answer is, 705 00:36:42,040 --> 00:36:42,980 is it going to make it worse? 706 00:36:43,680 --> 00:36:44,080 Well, 707 00:36:44,940 --> 00:36:45,760 yes and no. 708 00:36:46,060 --> 00:36:49,860 It's not going to make it substantially worse because it can decode the, 709 00:36:49,900 --> 00:36:50,560 uh, 710 00:36:50,660 --> 00:36:52,480 layer five traffic just as easily. 711 00:36:52,560 --> 00:36:54,740 It can decode anything else unless you encrypt it. 712 00:36:54,940 --> 00:36:57,580 So the question you need to ask yourself is, 713 00:36:57,980 --> 00:37:01,440 are you against your encryption because you want to be able to monitor your network better? 714 00:37:01,520 --> 00:37:02,520 And if the answer is yes, 715 00:37:02,640 --> 00:37:03,020 then yes, 716 00:37:03,060 --> 00:37:03,920 this is going to make it, 717 00:37:03,920 --> 00:37:07,860 make your network a little bit more of a nightmare because it's actually going to make people encrypt most of their stuff. 718 00:37:08,820 --> 00:37:09,180 Um, 719 00:37:09,420 --> 00:37:12,160 I don't know if that's a trade off you want to make. 720 00:37:30,600 --> 00:37:30,960 Um, 721 00:37:31,500 --> 00:37:31,860 he, 722 00:37:36,700 --> 00:37:37,420 you know, 723 00:37:37,420 --> 00:37:37,920 you can put, 724 00:37:37,920 --> 00:37:39,800 you can put as much logging into this thing as you want. 725 00:37:42,580 --> 00:37:42,980 what? 726 00:37:45,540 --> 00:37:46,520 What was the last bit? 727 00:37:48,740 --> 00:37:49,140 Yeah. 728 00:37:49,440 --> 00:37:49,840 Um, 729 00:37:49,900 --> 00:37:51,000 I get that a lot. 730 00:37:51,420 --> 00:37:51,820 Uh, 731 00:37:52,000 --> 00:37:52,260 you, 732 00:37:52,400 --> 00:37:52,900 you know what? 733 00:37:53,060 --> 00:37:54,820 I have another car drive down. 734 00:37:55,300 --> 00:37:55,700 So, 735 00:37:56,160 --> 00:37:56,560 um, 736 00:37:56,720 --> 00:37:59,820 power inverters are great things and maybe I'll get some more coding done. 737 00:38:00,220 --> 00:38:00,620 But, 738 00:38:01,580 --> 00:38:03,080 but at the end of the day, 739 00:38:03,800 --> 00:38:07,860 I'm just not convinced that network monitoring actually gives us nearly as much as it thinks. 740 00:38:07,920 --> 00:38:08,500 It does because, 741 00:38:08,980 --> 00:38:09,460 uh, 742 00:38:09,740 --> 00:38:10,100 you, 743 00:38:10,280 --> 00:38:10,820 you know, 744 00:38:10,840 --> 00:38:11,980 your attackers are very, 745 00:38:11,980 --> 00:38:13,380 very rarely being so nice. 746 00:38:13,760 --> 00:38:14,240 Um, 747 00:38:14,420 --> 00:38:14,980 you know, 748 00:38:15,000 --> 00:38:15,760 yes, 749 00:38:15,940 --> 00:38:19,580 a lot of times you get stupid attackers and that's not going to change. 750 00:38:19,800 --> 00:38:20,280 I, 751 00:38:20,300 --> 00:38:22,820 I think there's nothing fundamentally different about this. 752 00:38:24,060 --> 00:38:24,540 Yeah. 753 00:38:25,320 --> 00:38:26,560 Where does IP set? 754 00:38:26,800 --> 00:38:30,400 Is that one of the SSL? 755 00:38:30,900 --> 00:38:31,380 Um, 756 00:38:31,420 --> 00:38:33,320 I'm not advocating SSL here. 757 00:38:33,440 --> 00:38:35,000 It happened to be the one that I implemented. 758 00:38:35,280 --> 00:38:35,640 Uh, 759 00:38:35,780 --> 00:38:36,160 I, 760 00:38:36,180 --> 00:38:37,900 I actually really disliked it. 761 00:38:37,900 --> 00:38:38,440 I like SSL. 762 00:38:38,480 --> 00:38:38,720 I, 763 00:38:38,740 --> 00:38:39,400 I don't like, 764 00:38:39,420 --> 00:38:39,660 uh, 765 00:38:39,740 --> 00:38:40,380 the CA model. 766 00:38:40,640 --> 00:38:42,060 I don't like the certificate model. 767 00:38:42,280 --> 00:38:44,300 And I think overall it's, 768 00:38:44,300 --> 00:38:45,200 it's a fairly poor, 769 00:38:45,320 --> 00:38:45,640 um, 770 00:38:45,860 --> 00:38:46,940 poor protocol, 771 00:38:47,060 --> 00:38:47,780 you know, 772 00:38:47,780 --> 00:38:49,920 not to rag on the SSL guys too much, 773 00:38:50,040 --> 00:38:51,160 but you know, 774 00:38:51,180 --> 00:38:51,480 there's, 775 00:38:51,480 --> 00:38:53,280 there's been breaks because of it. 776 00:38:53,340 --> 00:39:00,820 And I feel much more comfortable with a model like PGP or SSH or even IPSEC to some degree. 777 00:39:00,920 --> 00:39:01,140 And, 778 00:39:01,200 --> 00:39:06,760 and there's nothing that would stop you from applying the same cryptographic properties of IPSEC into this. 779 00:39:06,780 --> 00:39:07,620 And there's nothing, 780 00:39:07,620 --> 00:39:09,440 nothing that would stop you from running sessions over IPSEC. 781 00:39:10,780 --> 00:39:11,740 It's a different layer. 782 00:39:12,100 --> 00:39:12,620 Um, 783 00:39:12,780 --> 00:39:15,380 would it decrease the necessity for IPSEC? 784 00:39:15,500 --> 00:39:15,720 Yes. 785 00:39:17,480 --> 00:39:18,000 Yeah. 786 00:39:18,440 --> 00:39:20,040 Just as a hopeful thing, 787 00:39:20,120 --> 00:39:23,360 we think that if you could use port 80 instead of port 1, 788 00:39:23,380 --> 00:39:24,600 port is cool. 789 00:39:25,800 --> 00:39:28,320 There'd be a lot of things you could tunnel through. 790 00:39:28,560 --> 00:39:31,720 The firewall would be staggeringly good. 791 00:39:32,020 --> 00:39:32,540 Yeah. 792 00:39:32,620 --> 00:39:33,100 Um, 793 00:39:34,420 --> 00:39:34,940 yeah. 794 00:39:35,100 --> 00:39:36,120 And in fact, 795 00:39:36,240 --> 00:39:36,440 uh, 796 00:39:36,640 --> 00:39:37,080 if, 797 00:39:37,080 --> 00:39:37,660 if you notice, 798 00:39:37,800 --> 00:39:39,780 I actually had it running as a user here. 799 00:39:40,180 --> 00:39:40,580 So, 800 00:39:41,080 --> 00:39:41,480 uh, 801 00:39:41,700 --> 00:39:43,820 I wasn't using the new capabilities that the kernel, 802 00:39:43,920 --> 00:39:45,920 so I wasn't running it under port one either. 803 00:39:46,300 --> 00:39:49,040 So there's nothing that says you have to run it under port one. 804 00:39:49,120 --> 00:39:50,060 It's just that you can, 805 00:39:50,160 --> 00:39:52,540 and it'll actually be RFC compliant for the purpose of the port, 806 00:39:53,080 --> 00:39:53,480 which, 807 00:39:53,540 --> 00:39:54,320 you know, 808 00:39:54,320 --> 00:39:55,120 makes me happy. 809 00:39:56,100 --> 00:39:56,500 Uh, 810 00:39:56,660 --> 00:39:57,540 anyone else? 811 00:39:58,000 --> 00:39:58,400 Yeah. 812 00:39:59,100 --> 00:39:59,500 Um, 813 00:39:59,600 --> 00:40:02,060 when you multiplex several things over one connection, 814 00:40:02,240 --> 00:40:03,940 that means that it all has to be in order. 815 00:40:04,360 --> 00:40:04,760 So, 816 00:40:04,840 --> 00:40:06,820 if you multiplex a bit more, 817 00:40:06,900 --> 00:40:07,060 you're going to have to, 818 00:40:07,080 --> 00:40:08,460 you're going to have to have to have video traffic and video traffic over, 819 00:40:08,900 --> 00:40:09,340 uh, 820 00:40:09,800 --> 00:40:10,860 in order connection, 821 00:40:10,960 --> 00:40:12,100 one of the bits more traffic, 822 00:40:12,340 --> 00:40:12,540 uh, 823 00:40:12,580 --> 00:40:12,980 packets, 824 00:40:13,140 --> 00:40:13,900 cases lost, 825 00:40:13,980 --> 00:40:16,520 and then play both bits more in the video. 826 00:40:17,540 --> 00:40:17,980 Not, 827 00:40:18,240 --> 00:40:18,720 not, 828 00:40:18,720 --> 00:40:19,980 not even a little bit, 829 00:40:20,020 --> 00:40:20,480 because, 830 00:40:20,940 --> 00:40:21,160 uh, 831 00:40:22,700 --> 00:40:23,140 oh, 832 00:40:23,180 --> 00:40:23,420 okay. 833 00:40:23,820 --> 00:40:24,260 Yes, 834 00:40:24,360 --> 00:40:25,080 to some extent, 835 00:40:25,220 --> 00:40:26,860 because at the end of the day, 836 00:40:26,900 --> 00:40:27,580 your client see, 837 00:40:27,660 --> 00:40:27,880 your, 838 00:40:27,940 --> 00:40:29,040 your actual SS, 839 00:40:29,220 --> 00:40:29,280 uh, 840 00:40:29,400 --> 00:40:30,060 excuse me, 841 00:40:30,080 --> 00:40:32,780 your actual session daemon sees an in order byte stream, 842 00:40:32,960 --> 00:40:33,340 a, 843 00:40:33,360 --> 00:40:35,780 a drop in one packet will cause a drop in the other, 844 00:40:35,860 --> 00:40:37,060 which is no different than, 845 00:40:37,060 --> 00:40:38,040 than using TCP elsewhere. 846 00:40:38,840 --> 00:40:40,340 The other thing that, 847 00:40:40,380 --> 00:40:40,520 uh, 848 00:40:40,980 --> 00:40:41,660 you know, 849 00:40:41,660 --> 00:40:43,620 people run to UDP a lot, 850 00:40:43,720 --> 00:40:44,640 just to implement, 851 00:40:44,860 --> 00:40:45,080 uh, 852 00:40:45,260 --> 00:40:46,280 low latency things, 853 00:40:47,120 --> 00:40:47,920 and I, 854 00:40:48,000 --> 00:40:48,980 I wonder if, 855 00:40:49,040 --> 00:40:50,440 if they've seen the urgent pointer, 856 00:40:50,560 --> 00:40:53,180 because there's nothing stopping you from applying it everywhere. 857 00:40:53,380 --> 00:40:53,780 Now, 858 00:40:53,860 --> 00:40:55,440 you would need to change how the headers are doing, 859 00:40:55,580 --> 00:40:56,480 how the headers are working, 860 00:40:56,560 --> 00:40:58,000 and how the multiplexing would happen to you, 861 00:40:58,060 --> 00:40:59,820 would have to happen to use this, 862 00:40:59,920 --> 00:41:02,400 and you would need to give it a little bit more concept of what a packet is, 863 00:41:02,500 --> 00:41:07,040 but there's no reason why you can't use the out-of-band data mechanism to provide a, 864 00:41:07,040 --> 00:41:07,120 uh, 865 00:41:07,880 --> 00:41:08,620 high latency, 866 00:41:08,740 --> 00:41:09,300 or excuse me, 867 00:41:09,340 --> 00:41:11,600 a very low latency response time over TCP. 868 00:41:12,980 --> 00:41:13,460 Yeah. 869 00:41:13,560 --> 00:41:15,780 How do you feel this competes with SCTP? 870 00:41:17,000 --> 00:41:17,480 Uh, 871 00:41:19,180 --> 00:41:19,660 yeah, 872 00:41:19,860 --> 00:41:20,220 uh, 873 00:41:20,340 --> 00:41:22,160 not terribly familiar with the protocol, 874 00:41:22,320 --> 00:41:22,760 to be honest. 875 00:41:23,020 --> 00:41:23,500 Uh, 876 00:41:23,560 --> 00:41:25,780 how do I feel that it competes with SCTP? 877 00:41:26,140 --> 00:41:26,620 Uh, 878 00:41:26,700 --> 00:41:27,220 which is a, 879 00:41:27,800 --> 00:41:28,280 that, 880 00:41:28,460 --> 00:41:29,600 if I remember right, 881 00:41:29,700 --> 00:41:30,160 it's, 882 00:41:30,160 --> 00:41:30,560 um, 883 00:41:31,140 --> 00:41:33,860 tries to be a replacement for layer four. 884 00:41:34,460 --> 00:41:34,940 Yeah? 885 00:41:35,820 --> 00:41:36,300 Um, 886 00:41:36,700 --> 00:41:37,060 so, 887 00:41:40,580 --> 00:41:42,380 by the description that I've seen of it, 888 00:41:42,400 --> 00:41:42,520 it's, 889 00:41:42,540 --> 00:41:43,980 it's doing things a little bit differently. 890 00:41:44,140 --> 00:41:44,320 It's, 891 00:41:44,340 --> 00:41:45,020 it's not actually, 892 00:41:45,500 --> 00:41:45,860 um, 893 00:41:46,860 --> 00:41:47,220 you, 894 00:41:47,380 --> 00:41:47,680 you know, 895 00:41:47,700 --> 00:41:49,220 a lot of things can be compared to this. 896 00:41:49,280 --> 00:41:50,760 How do I feel that it compares with a VPN? 897 00:41:50,960 --> 00:41:52,520 How do I feel that it compares with Stunnel? 898 00:41:52,700 --> 00:41:53,820 And the answer is, 899 00:41:53,880 --> 00:41:54,420 well, 900 00:41:54,940 --> 00:41:55,860 they're kind of similar, 901 00:41:56,440 --> 00:42:00,020 but this one was made with a very specific purpose that so far I haven't seen fulfilled. 902 00:42:00,960 --> 00:42:01,320 and, 903 00:42:01,680 --> 00:42:03,600 and it's kind of subtle, 904 00:42:03,700 --> 00:42:05,940 and I'm not sure I did a terribly good job of explaining it, 905 00:42:05,980 --> 00:42:06,180 but if, 906 00:42:06,300 --> 00:42:07,080 if you'd like to send me an email, 907 00:42:07,200 --> 00:42:09,340 I'd be happy to go on and on for pages about it. 908 00:42:11,060 --> 00:42:11,540 Yep? 909 00:42:12,100 --> 00:42:12,540 So, 910 00:42:12,660 --> 00:42:13,240 when you plan, 911 00:42:14,300 --> 00:42:14,780 what's, 912 00:42:14,920 --> 00:42:17,200 what's the connection that starts to come up? 913 00:42:17,340 --> 00:42:17,380 What, 914 00:42:17,400 --> 00:42:19,900 what's the communication that's copyrighted there? 915 00:42:20,020 --> 00:42:20,760 What kind of, 916 00:42:20,980 --> 00:42:22,040 what kind of, 917 00:42:22,180 --> 00:42:22,940 what's the connection? 918 00:42:23,940 --> 00:42:24,420 Yeah, 919 00:42:24,520 --> 00:42:26,040 absolutely nothing at the moment, 920 00:42:26,100 --> 00:42:26,700 but, 921 00:42:26,700 --> 00:42:27,140 the, 922 00:42:27,220 --> 00:42:27,540 the, 923 00:42:27,640 --> 00:42:28,060 sorry, 924 00:42:28,400 --> 00:42:28,680 the, 925 00:42:28,800 --> 00:42:29,840 the question was, 926 00:42:30,480 --> 00:42:32,160 when this happens here, 927 00:42:32,340 --> 00:42:33,220 and your, 928 00:42:33,400 --> 00:42:33,980 uh, 929 00:42:34,180 --> 00:42:35,380 client says, 930 00:42:35,580 --> 00:42:36,040 you know, 931 00:42:36,040 --> 00:42:38,780 I'm opening a port to whoever wants to grab it, 932 00:42:38,860 --> 00:42:40,240 the question was basically, 933 00:42:40,360 --> 00:42:42,980 can someone else grab it than who was supposed to? 934 00:42:43,280 --> 00:42:44,300 And the answer is, 935 00:42:44,400 --> 00:42:44,880 yes, 936 00:42:45,020 --> 00:42:45,480 absolutely. 937 00:42:45,920 --> 00:42:46,200 Um, 938 00:42:46,360 --> 00:42:47,280 but obviously, 939 00:42:47,920 --> 00:42:49,680 this solution that we used here, 940 00:42:49,800 --> 00:42:53,180 in this particular one about opening a port and making it a free-for-all for everyone, 941 00:42:53,360 --> 00:42:56,260 is not the one that we would want to see eventually. 942 00:42:56,740 --> 00:42:57,180 If, 943 00:42:57,200 --> 00:42:58,460 if this were to actually go anywhere, 944 00:42:58,700 --> 00:43:00,640 you would want to see it integrated at the, 945 00:43:00,640 --> 00:43:00,920 uh, 946 00:43:01,120 --> 00:43:02,860 at the low-level syscall level, 947 00:43:02,960 --> 00:43:04,980 where it would actually be able to appropriately, 948 00:43:04,980 --> 00:43:08,620 appropriately identify which applications the user intended to use. 949 00:43:09,900 --> 00:43:11,000 If that makes any sense. 950 00:43:14,920 --> 00:43:15,360 It, 951 00:43:18,260 --> 00:43:20,740 it would need some knowledge to be properly functional, 952 00:43:20,880 --> 00:43:21,020 yes. 953 00:43:21,180 --> 00:43:21,880 Instead of, 954 00:43:21,880 --> 00:43:23,360 instead of asking for a port number, 955 00:43:23,480 --> 00:43:24,840 you'd ask for a, 956 00:43:25,480 --> 00:43:26,120 you know, 957 00:43:26,140 --> 00:43:26,460 right now, 958 00:43:26,500 --> 00:43:28,980 you go ahead and you give it an IP address and a port number, 959 00:43:29,180 --> 00:43:32,440 and the operating system runs off and starts a TCP connection for you. 960 00:43:32,800 --> 00:43:33,240 So, 961 00:43:33,280 --> 00:43:33,720 instead, 962 00:43:33,880 --> 00:43:34,900 you give the operating system, 963 00:43:34,900 --> 00:43:47,560 a IP address and a service name and the operating system runs off and starts a session for you if one doesn't already exist. 964 00:43:47,760 --> 00:43:48,560 And if one does exist, 965 00:43:48,740 --> 00:43:49,460 uses that. 966 00:43:49,660 --> 00:43:50,140 Now, 967 00:43:50,840 --> 00:43:51,660 you're going to go, 968 00:43:51,820 --> 00:43:52,780 what about different users? 969 00:43:52,920 --> 00:43:54,880 And the answer is different users should have different sessions. 970 00:43:55,560 --> 00:43:56,040 So, 971 00:43:56,120 --> 00:43:59,460 it would actually look at your UID and it would give you an appropriate, 972 00:43:59,520 --> 00:44:01,460 an appropriate session for your UID. 973 00:44:01,580 --> 00:44:01,680 So, 974 00:44:01,740 --> 00:44:03,260 your apps would all be authenticated, 975 00:44:03,360 --> 00:44:04,780 but someone else's apps on them, 976 00:44:04,900 --> 00:44:06,040 machine wouldn't get your authentication. 977 00:44:07,640 --> 00:44:08,700 Any other questions? 978 00:44:11,640 --> 00:44:12,780 In that case, 979 00:44:12,820 --> 00:44:13,620 please get drunk. 980 00:44:13,940 --> 00:44:14,340 Oh, 981 00:44:14,440 --> 00:44:14,660 what? 982 00:44:14,940 --> 00:44:15,580 Oh. 983 00:44:15,920 --> 00:44:16,560 Website. 984 00:44:18,580 --> 00:44:18,900 Yeah. 985 00:44:19,020 --> 00:44:23,140 It would be possible to sit where a number of your choices, 986 00:44:23,500 --> 00:44:24,660 where in the time, 987 00:44:24,660 --> 00:44:26,760 when a session is established, 988 00:44:27,060 --> 00:44:28,260 how would your, 989 00:44:28,360 --> 00:44:32,860 how would this kind of fix the problems of your firewall? 990 00:44:33,300 --> 00:44:33,820 Yeah. 991 00:44:33,820 --> 00:44:34,320 Yeah. 992 00:44:34,560 --> 00:44:34,680 Yeah. 993 00:44:35,560 --> 00:44:39,680 Well, the reason SIP is negotiated, yeah, right. 994 00:44:39,780 --> 00:44:44,680 The question was SIP goes through an auto-negotiation process to find a port number 995 00:44:44,680 --> 00:44:47,500 when it actually connects between one person and another. 996 00:44:48,840 --> 00:44:51,820 Part of the reason it does this is to avoid firewalls. 997 00:44:53,100 --> 00:44:55,900 And this goes back to the networking monitoring question. 998 00:44:56,520 --> 00:44:59,460 And his question was basically what happens to network monitoring. 999 00:44:59,680 --> 00:45:01,720 And the answer is, well, it gets a little bit different. 1000 00:45:02,740 --> 00:45:06,200 You won't have firewalled ports anymore if no one's using ports. 1001 00:45:07,300 --> 00:45:13,140 So the answer to the question about, you know, what does SIP need to do, it's straightforward. 1002 00:45:13,360 --> 00:45:14,680 It uses the name for SIP. 1003 00:45:14,740 --> 00:45:16,400 And it says, I want to start a SIP connection. 1004 00:45:16,820 --> 00:45:19,720 And if there's a firewall that happens to be around that sees that, 1005 00:45:19,880 --> 00:45:22,620 it can block it just as it can block ports today. 1006 00:45:22,840 --> 00:45:26,700 And, in fact, from one perspective, it makes the network monitoring side easier. 1007 00:45:26,920 --> 00:45:29,740 From the other perspective, if you enable SSL, it all goes away. 1008 00:45:29,920 --> 00:45:31,000 And it can't see a thing. 1009 00:45:32,660 --> 00:45:35,060 So, if you enable SSL, radically easier. 1010 00:45:35,240 --> 00:45:37,840 If you want to monitor your network, radically harder. 1011 00:45:39,020 --> 00:45:39,460 Yeah. 1012 00:45:52,040 --> 00:45:58,260 You're going to be going deeper into the packet in the sense that, yeah, you'll be going through another layer. 1013 00:45:58,780 --> 00:46:00,580 Conceptually, you'll be going deeper into the packet. 1014 00:46:00,900 --> 00:46:01,340 But. 1015 00:46:01,720 --> 00:46:06,900 Whether that actually translates into a hardware performance problem, I'm not sure I'm convinced. 1016 00:46:14,460 --> 00:46:15,100 Yeah. 1017 00:46:20,440 --> 00:46:23,000 You have to process it differently. 1018 00:46:23,700 --> 00:46:26,920 But you're not necessarily processing more data. 1019 00:46:27,100 --> 00:46:28,820 You're processing port numbers now anyways. 1020 00:46:29,200 --> 00:46:31,600 So, it's not. 1021 00:46:31,720 --> 00:46:32,500 It's not fundamentally different. 1022 00:46:33,180 --> 00:46:36,400 The exact construction may make it so that it's less computationally efficient. 1023 00:46:37,660 --> 00:46:39,040 Anyways, it's about that time. 1024 00:46:39,180 --> 00:46:40,800 So, I'm going to go ahead and wrap it up. 1025 00:46:40,900 --> 00:46:43,060 And if anyone has any questions, room 104. 1026 00:46:43,860 --> 00:46:44,220 Thanks. 1027 00:46:44,620 --> 00:46:44,980 Thank you. 1028 00:46:45,640 --> 00:46:46,160 Thank you.