1 00:00:00,000 --> 00:00:05,200 ...working on random other projects, and we do this on our side. 2 00:00:05,320 --> 00:00:10,040 Neither of us do this for work. He does use it at work. I don't really. 3 00:00:10,460 --> 00:00:13,020 We both work in the security industry. I'm also a student. 4 00:00:13,720 --> 00:00:17,520 And this is about exploit frameworks in general and about new exploit technology 5 00:00:17,520 --> 00:00:22,020 that we and other people have been working on along the road of Metasploit. 6 00:00:30,980 --> 00:00:32,440 Thank you. 7 00:01:02,740 --> 00:01:02,920 Thank you. 8 00:01:30,000 --> 00:01:33,200 ...touch the disk at all, but it gets us a remote interactive desktop of the system we're attacking. 9 00:01:33,900 --> 00:01:34,580 Things like that. 10 00:01:36,160 --> 00:01:39,600 Yeah, we'll start with an injection, and then we know this is two hours. 11 00:01:39,660 --> 00:01:41,960 A lot of people have other things that they may want to do, 12 00:01:42,040 --> 00:01:46,120 so we sort of split it into two different sections. 13 00:01:46,360 --> 00:01:48,020 So we'll go through the first thing and do some demos, 14 00:01:48,140 --> 00:01:49,640 and then go more in-depth and do some more demos. 15 00:01:49,900 --> 00:01:53,260 So we'll start with some background information on exploit frameworks, 16 00:01:53,380 --> 00:01:56,280 not necessarily specific to Metasploit, but just what's out there now 17 00:01:56,280 --> 00:01:58,260 and what the current state of things are. 18 00:02:00,700 --> 00:02:02,260 So, what is an exploit framework? 19 00:02:02,960 --> 00:02:04,760 It's an interface for launching exploits. 20 00:02:05,640 --> 00:02:07,000 There's a lot of reasons to use one. 21 00:02:07,200 --> 00:02:08,920 It allows you to have standardized exploit modules. 22 00:02:09,260 --> 00:02:11,300 It allows you to have a suite of allowable shellcode. 23 00:02:11,620 --> 00:02:15,800 At least in our framework, you can specify a different shellcode. 24 00:02:16,100 --> 00:02:18,880 That's not necessarily the same for all other frameworks. 25 00:02:19,760 --> 00:02:21,560 You have a library of common routines. 26 00:02:22,000 --> 00:02:23,620 That includes a lot of pro features. 27 00:02:24,240 --> 00:02:28,060 A lot of this is really good from the exploit developer's point of view. 28 00:02:28,280 --> 00:02:29,480 A lot of code reuse. 29 00:02:30,600 --> 00:02:34,500 A lot of things that you don't have to do that you would have to do in a stand-alone C program. 30 00:02:35,280 --> 00:02:38,480 And also a lot of it shows in using it. 31 00:02:38,780 --> 00:02:41,340 Having a standardized interface to use all the different things. 32 00:02:41,400 --> 00:02:45,100 And having a lot of advanced features that you wouldn't have in a normal stand-alone exploit. 33 00:02:48,780 --> 00:02:50,220 So why are exploit frameworks needed? 34 00:02:50,600 --> 00:02:54,520 Well, as anyone's aware who's been going to PacketStorm or other public security websites 35 00:02:54,520 --> 00:02:55,840 to get exploits for the last few years, 36 00:02:56,020 --> 00:02:57,680 just about everything you download is a piece of crap. 37 00:02:57,980 --> 00:02:59,980 I mean, honestly, the things that you're able to find, 38 00:02:59,980 --> 00:03:01,100 publicly, as far as exploit code, 39 00:03:01,440 --> 00:03:02,700 90% of the stuff just sucks. 40 00:03:03,160 --> 00:03:04,740 Even worse, if you start looking at this code, 41 00:03:04,880 --> 00:03:06,380 half the code is boilerplate. 42 00:03:06,440 --> 00:03:07,680 It's copy and pasted to someplace else. 43 00:03:08,360 --> 00:03:10,760 How many times have you seen the same T-cell shell handler 44 00:03:10,760 --> 00:03:13,140 being copied from the same DCOM exploit to DCOM exploit 45 00:03:13,140 --> 00:03:15,060 to serve you after all in a row? 46 00:03:15,520 --> 00:03:16,920 I mean, it's kind of gross out there. 47 00:03:16,940 --> 00:03:17,660 No one can really code. 48 00:03:17,820 --> 00:03:19,800 The people who are running exploits aren't really programmers. 49 00:03:19,960 --> 00:03:21,700 So people who know just enough about security and programming 50 00:03:21,700 --> 00:03:22,880 to get the code done and working. 51 00:03:23,200 --> 00:03:24,920 And that's kind of what we're running against. 52 00:03:25,900 --> 00:03:28,740 If you're doing a pen test and you need to reliably exploit a system, 53 00:03:28,740 --> 00:03:32,500 and say that's what you're using as hard code to a bind shell or a reverse shell, 54 00:03:32,640 --> 00:03:34,220 and you need to use the opposite type of payload, 55 00:03:34,480 --> 00:03:35,820 well, you're going to have to go through and hack through 56 00:03:35,820 --> 00:03:37,740 someone else's ugly ass C trying to get it all working. 57 00:03:38,100 --> 00:03:41,000 So the goal of the framework is to be able to provide you 58 00:03:41,000 --> 00:03:42,620 a consistent interface for exploiting a system 59 00:03:42,620 --> 00:03:45,280 in a way that you don't really have to worry about what the payloads are, 60 00:03:45,360 --> 00:03:49,780 who wrote it, or whether you need to convert Win32 socket calls 61 00:03:49,780 --> 00:03:52,020 to Linux socket calls or remove WCA startup sequences. 62 00:03:53,880 --> 00:03:55,400 One thing that's important about this is, 63 00:03:55,740 --> 00:03:58,180 for the last point, nobody posts code full of bugs. 64 00:03:58,180 --> 00:04:01,000 This is one thing a lot of pen testers will admit to, 65 00:04:01,060 --> 00:04:01,680 that it's very important. 66 00:04:02,220 --> 00:04:04,100 There's a lot of bugs that may be three years old, 67 00:04:04,680 --> 00:04:07,380 but there's still a lot of exploitable machines running it. 68 00:04:07,620 --> 00:04:11,060 And the thing is that people aren't now going and revising old exploits 69 00:04:11,060 --> 00:04:12,980 with new techniques and new technologies. 70 00:04:13,100 --> 00:04:14,860 They're not retrofitting old code. 71 00:04:15,520 --> 00:04:17,140 So something we've done is we've gone through 72 00:04:17,140 --> 00:04:19,080 and we've written a lot of important exploits. 73 00:04:19,140 --> 00:04:21,160 And also just the fact that it's in the framework itself, 74 00:04:21,320 --> 00:04:22,440 when we come up with new technologies, 75 00:04:22,640 --> 00:04:25,640 we can use that then in older exploits. 76 00:04:29,500 --> 00:04:31,320 Right now there's two public exploit projects. 77 00:04:32,300 --> 00:04:33,180 Excuse me. 78 00:04:33,380 --> 00:04:34,760 There's a few public exploit projects. 79 00:04:35,000 --> 00:04:35,960 There's two commercial projects. 80 00:04:36,380 --> 00:04:38,680 These projects are Core's Impact product 81 00:04:38,680 --> 00:04:40,640 and Immunity's Canvas product. 82 00:04:41,400 --> 00:04:42,560 For those who are not aware, 83 00:04:43,280 --> 00:04:45,300 in about 2001, 2002, 84 00:04:45,660 --> 00:04:48,940 a company called Core ST released the automated pen test toolkit. 85 00:04:49,380 --> 00:04:50,860 Essentially it was a giant GUI interface 86 00:04:50,860 --> 00:04:52,420 that had tons of exploits in it 87 00:04:52,420 --> 00:04:53,640 where you can just drag and drop root shells. 88 00:04:54,280 --> 00:04:55,420 Now that's great and all. 89 00:04:55,500 --> 00:04:56,600 I mean, it's nice. It worked pretty well. 90 00:04:56,600 --> 00:04:58,240 We've got some really sharp guys working on it. 91 00:04:58,280 --> 00:04:59,900 But it charged $15,000 a license. 92 00:05:00,440 --> 00:05:01,840 And I don't know about you guys, 93 00:05:01,900 --> 00:05:03,380 but I can't afford $15,000 for an exploit. 94 00:05:04,400 --> 00:05:07,100 The other product is Canvas by Immunity. 95 00:05:07,240 --> 00:05:09,300 And we keep mispronouncing Immunity's capabilities today 96 00:05:09,300 --> 00:05:10,300 by telling these in the audience. 97 00:05:10,480 --> 00:05:11,520 But this company is called Immunity. 98 00:05:12,400 --> 00:05:14,440 This product is kind of a cut-down version of Impact. 99 00:05:14,580 --> 00:05:16,600 It has a different focus in that it provides 100 00:05:17,120 --> 00:05:19,300 lots of exploits and a lot of actually undisclosed 101 00:05:19,300 --> 00:05:20,260 or unpublished exploits. 102 00:05:20,380 --> 00:05:22,520 And it actually runs on Linux and Windows 32 at once. 103 00:05:23,320 --> 00:05:24,860 Finally, you have the Metasploit framework, 104 00:05:24,860 --> 00:05:26,880 which is, you know, our project, open source. 105 00:05:27,180 --> 00:05:28,960 And it's not really meant to be directly competitive 106 00:05:28,960 --> 00:05:30,020 with either of these commercial projects, 107 00:05:30,160 --> 00:05:30,780 but it has different goals. 108 00:05:31,280 --> 00:05:33,080 And we're going to kind of talk about some of the goals 109 00:05:33,080 --> 00:05:33,600 in the next section. 110 00:05:34,080 --> 00:05:35,660 Yeah, we're going to cover both Core Impact 111 00:05:35,660 --> 00:05:38,660 and Immunity's Canvas in a little bit of detail 112 00:05:38,660 --> 00:05:39,700 in the next couple of slides. 113 00:05:40,500 --> 00:05:41,660 So, first, Core Impact. 114 00:05:42,000 --> 00:05:43,740 It was the first real exploit framework. 115 00:05:43,780 --> 00:05:46,300 I think it came around 2000 or maybe a little bit later. 116 00:05:46,820 --> 00:05:48,280 And they were the first to do a lot of things. 117 00:05:48,400 --> 00:05:50,440 They were the first to have a functioning syscall proxy 118 00:05:50,440 --> 00:05:52,960 and a lot of the...kind of set the standard 119 00:05:52,960 --> 00:05:53,800 for a lot of the technologies. 120 00:05:55,480 --> 00:05:57,440 They're pricier than other solutions, 121 00:05:57,600 --> 00:05:58,960 but they're extremely complete. 122 00:05:59,760 --> 00:06:02,360 The tool is written in Python as C++, 123 00:06:02,620 --> 00:06:05,360 and the tool itself only runs on Win32, 124 00:06:05,640 --> 00:06:09,340 but you can obviously own and pivot through 125 00:06:09,840 --> 00:06:11,000 non-Windows boxes. 126 00:06:11,580 --> 00:06:13,220 You can pivot through your own boxes. 127 00:06:13,400 --> 00:06:14,720 Basically, the way that works is that 128 00:06:14,720 --> 00:06:15,880 after you compromise a machine, 129 00:06:16,140 --> 00:06:18,160 you can launch your attacks through impact 130 00:06:18,160 --> 00:06:18,920 through that machine. 131 00:06:19,040 --> 00:06:20,000 So if you own a box on the perimeter, 132 00:06:20,220 --> 00:06:22,160 you can then use that box and start owning things 133 00:06:22,160 --> 00:06:23,700 on the internal network, et cetera. 134 00:06:23,700 --> 00:06:26,840 And they also have a syscall proxy and payload system, 135 00:06:27,020 --> 00:06:28,360 which is how they implement pivoting, 136 00:06:28,380 --> 00:06:30,240 a lot of other things like upload, download file, 137 00:06:30,800 --> 00:06:33,840 a lot of other advanced payload techniques 138 00:06:33,840 --> 00:06:34,980 or payload features. 139 00:06:37,260 --> 00:06:37,940 Unity Canvas. 140 00:06:38,340 --> 00:06:39,600 This is written by Dave Idle, 141 00:06:39,680 --> 00:06:42,540 and I think he started running it in early 2002. 142 00:06:42,880 --> 00:06:44,600 It might have been before that and just wasn't aware of it. 143 00:06:44,820 --> 00:06:46,840 It was the second commercial framework out there 144 00:06:46,840 --> 00:06:48,160 when everyone saw his product and were like, 145 00:06:48,200 --> 00:06:49,540 wow, look, he's competing against Core Impact 146 00:06:49,540 --> 00:06:51,000 and kind of curious how that's going to happen 147 00:06:51,000 --> 00:06:51,760 and how it's going to work out. 148 00:06:51,960 --> 00:06:53,380 And it ends up that they run pretty well. 149 00:06:53,380 --> 00:06:55,140 Like, no one tends to steal each other's exploits, 150 00:06:55,140 --> 00:06:57,220 so you often find exploits that are in Canvas 151 00:06:57,220 --> 00:06:58,460 that aren't in anything else. 152 00:06:58,660 --> 00:06:59,660 And that's kind of what Dave 153 00:06:59,660 --> 00:07:00,520 and the rest of the Unity team 154 00:07:00,520 --> 00:07:01,420 kind of rides themselves on. 155 00:07:02,140 --> 00:07:04,580 It supports limited syscall proxying. 156 00:07:04,740 --> 00:07:07,600 It uses, it kind of, it has one payload. 157 00:07:07,780 --> 00:07:10,020 Instead of having a reverse shell or a bind shell, 158 00:07:10,220 --> 00:07:12,980 it uses all reverse shells as far as I know, 159 00:07:13,060 --> 00:07:15,160 or it can use bindstock and some other things as well. 160 00:07:15,380 --> 00:07:18,820 And the actual payload is kind of a multi-connect payload. 161 00:07:18,980 --> 00:07:20,500 You can upload files, download files, 162 00:07:21,040 --> 00:07:23,020 manage the system, you know, create new connections, 163 00:07:23,080 --> 00:07:23,360 do all kinds of things. 164 00:07:23,380 --> 00:07:23,680 You can do all kinds of other things 165 00:07:23,680 --> 00:07:24,800 through that one payload. 166 00:07:25,900 --> 00:07:27,700 It may actually be able to pivot in the near future, 167 00:07:27,800 --> 00:07:29,100 where you can actually compromise one host 168 00:07:29,100 --> 00:07:30,420 and export another host, you know, 169 00:07:30,440 --> 00:07:31,020 directly afterwards, 170 00:07:31,140 --> 00:07:32,320 like Spoon was talking about a second ago. 171 00:07:32,660 --> 00:07:33,860 It's less extensive than Impact. 172 00:07:34,060 --> 00:07:36,000 I think it has somewhere between 70 and 80 modules 173 00:07:36,000 --> 00:07:38,040 as opposed to Core Impact's, like, you know, 174 00:07:38,040 --> 00:07:39,240 around 300 or so. 175 00:07:39,740 --> 00:07:42,640 And it runs for about $1,000 a pop instead of $15,000. 176 00:07:42,720 --> 00:07:44,180 So if you're a small shop 177 00:07:44,180 --> 00:07:45,280 and you need a commercial exploit framework, 178 00:07:45,420 --> 00:07:46,340 it's not a bad thing to use. 179 00:07:51,260 --> 00:07:53,280 So the current capability 180 00:07:53,380 --> 00:07:55,500 is we actually did this talk at Black Hat, too, 181 00:07:55,560 --> 00:07:57,260 and I've been quoted a lot in news articles 182 00:07:57,260 --> 00:07:58,860 for saying point, click, root. 183 00:07:59,220 --> 00:08:00,560 So we're going to repeat it. 184 00:08:01,040 --> 00:08:01,980 So the current capability 185 00:08:01,980 --> 00:08:04,040 is we've really gotten down exploitation 186 00:08:04,040 --> 00:08:05,360 to point, click, and root. 187 00:08:05,860 --> 00:08:08,100 You can pivot it through the boxes after you own them. 188 00:08:08,220 --> 00:08:10,040 Launching attacks is from the box you just compromised. 189 00:08:10,960 --> 00:08:11,920 Automatic payload encoding, 190 00:08:12,560 --> 00:08:13,980 loading things like VAB characters. 191 00:08:14,040 --> 00:08:15,640 That's something more in the background that you don't see, 192 00:08:15,760 --> 00:08:17,320 but it's definitely important. 193 00:08:17,680 --> 00:08:20,660 And we also have dynamic shellcode creation systems. 194 00:08:21,440 --> 00:08:22,680 Canvas has more stuff, 195 00:08:22,680 --> 00:08:25,520 which is David Tell's Python-based compilation 196 00:08:25,520 --> 00:08:27,420 for compiler and assembler. 197 00:08:27,800 --> 00:08:32,680 And Impact has inline egg, 198 00:08:32,880 --> 00:08:33,560 which is, I guess, 199 00:08:33,680 --> 00:08:35,420 they have a greater system called Egg. 200 00:08:35,780 --> 00:08:37,260 But that's what they do. 201 00:08:37,620 --> 00:08:39,800 Similar dynamic shellcode creation. 202 00:08:41,060 --> 00:08:41,460 Cool. 203 00:08:43,100 --> 00:08:44,220 Actually, excuse me. 204 00:08:44,260 --> 00:08:45,520 The next section is the Metasploit framework. 205 00:08:45,760 --> 00:08:47,160 Kind of give you an idea what the project's about, 206 00:08:47,300 --> 00:08:47,780 where it's going, 207 00:08:47,900 --> 00:08:48,880 kind of what it can do right now. 208 00:08:49,520 --> 00:08:51,340 We feel the project is stable enough right now. 209 00:08:51,380 --> 00:08:52,240 Of course, people will be using it 210 00:08:52,240 --> 00:08:54,080 in their organizations to, you know, 211 00:08:54,080 --> 00:08:55,080 verify vulnerability assessments, 212 00:08:55,320 --> 00:08:56,380 to do pen test work, 213 00:08:56,500 --> 00:08:57,020 things like that. 214 00:08:57,240 --> 00:08:58,520 We've been actually been using it professionally 215 00:08:58,520 --> 00:08:59,460 for about a year or so now, 216 00:08:59,580 --> 00:09:00,740 so it's definitely ready. 217 00:09:03,900 --> 00:09:05,680 Okay, so just a brief introduction. 218 00:09:06,420 --> 00:09:07,900 It's an open source exploit framework. 219 00:09:08,020 --> 00:09:09,080 I believe it's the, 220 00:09:09,740 --> 00:09:11,000 pretty much the only one out there. 221 00:09:11,040 --> 00:09:11,820 There's some other projects 222 00:09:11,820 --> 00:09:14,900 that sort of concentrate on subsets 223 00:09:14,900 --> 00:09:16,840 of things Metasploit do, 224 00:09:16,940 --> 00:09:18,500 like, you know, payload systems, etc. 225 00:09:18,680 --> 00:09:20,580 But this is the only open source 226 00:09:20,580 --> 00:09:22,040 total exploit framework. 227 00:09:22,840 --> 00:09:24,880 We also think of it more 228 00:09:24,880 --> 00:09:26,980 as a exploit development environment. 229 00:09:27,740 --> 00:09:29,240 All of us are security researchers, 230 00:09:29,380 --> 00:09:31,220 and we do a lot of development work. 231 00:09:31,700 --> 00:09:33,880 So we're really using it more for that 232 00:09:33,880 --> 00:09:34,960 than actually for going out 233 00:09:34,960 --> 00:09:36,060 and using it for pen tests. 234 00:09:36,420 --> 00:09:37,400 So it really, 235 00:09:37,680 --> 00:09:39,140 I would consider it more 236 00:09:39,140 --> 00:09:40,340 of an exploit development platform 237 00:09:40,340 --> 00:09:42,140 than Core Impact or Canvas, 238 00:09:42,180 --> 00:09:43,160 which are sold as products, 239 00:09:43,340 --> 00:09:44,820 not really sold as environments 240 00:09:44,820 --> 00:09:46,380 for you to be writing things in. 241 00:09:46,460 --> 00:09:46,900 Although you can, 242 00:09:47,120 --> 00:09:49,360 but that's not really the main goal. 243 00:09:50,080 --> 00:09:50,560 Okay. 244 00:09:50,580 --> 00:09:51,680 So it's written in Perl, 245 00:09:53,200 --> 00:09:54,580 which is a choice we've made 246 00:09:54,580 --> 00:09:55,980 and have gotten flack for. 247 00:09:56,080 --> 00:09:57,520 But we stand behind it strongly, 248 00:09:57,700 --> 00:09:58,820 and it's been working out 249 00:09:58,820 --> 00:09:59,480 really well for us. 250 00:09:59,860 --> 00:10:01,900 It runs on most modern platforms. 251 00:10:02,280 --> 00:10:03,340 Right now we can run it 252 00:10:03,340 --> 00:10:05,040 on HPOX and Solaris 253 00:10:05,040 --> 00:10:05,860 straight out of the box. 254 00:10:06,000 --> 00:10:07,060 It runs on Windows 32 255 00:10:07,060 --> 00:10:08,560 under the SIGINT environment. 256 00:10:08,760 --> 00:10:09,860 It runs on Linux and BSD 257 00:10:09,860 --> 00:10:11,100 and pretty much everything else. 258 00:10:11,800 --> 00:10:13,000 HD has it running on its source. 259 00:10:13,560 --> 00:10:14,180 So, I mean, 260 00:10:14,240 --> 00:10:15,400 it's really pretty portable 261 00:10:15,400 --> 00:10:15,980 if you look at it. 262 00:10:16,400 --> 00:10:17,240 It's nice to be able to, 263 00:10:17,260 --> 00:10:18,280 you know, walk into an office building 264 00:10:18,280 --> 00:10:19,780 with a device about the size of your hand 265 00:10:19,780 --> 00:10:21,980 and have a list of about 30 or 40 Xboxes 266 00:10:21,980 --> 00:10:22,940 you can start owning boxes with, 267 00:10:23,020 --> 00:10:24,020 a nice little Wi-Fi card. 268 00:10:24,180 --> 00:10:27,040 So it really reduces the amount of time 269 00:10:27,040 --> 00:10:27,960 it takes to, you know, 270 00:10:27,960 --> 00:10:28,840 go into an unknown environment 271 00:10:28,840 --> 00:10:29,900 and really start rolling with it. 272 00:10:30,100 --> 00:10:31,500 And even though we don't really support 273 00:10:31,500 --> 00:10:32,740 pivoting with the project right now, 274 00:10:32,860 --> 00:10:34,440 you can literally just copy the framework 275 00:10:34,440 --> 00:10:35,160 over to another host 276 00:10:35,160 --> 00:10:35,780 and start running it 277 00:10:35,780 --> 00:10:37,580 because we do have 132 installers 278 00:10:37,580 --> 00:10:38,500 and it does run on about 279 00:10:38,500 --> 00:10:39,460 every modern Unix platform. 280 00:10:40,820 --> 00:10:42,420 And we're mostly focused on 281 00:10:42,900 --> 00:10:43,620 improving technology, 282 00:10:44,080 --> 00:10:47,140 not so much things that may be 283 00:10:47,140 --> 00:10:48,460 as important from the user's perspective, 284 00:10:48,520 --> 00:10:49,700 but a lot of the back end things. 285 00:10:49,700 --> 00:10:51,460 Like shell coding, coders, 286 00:10:51,540 --> 00:10:52,740 and just really trying to improve 287 00:10:52,740 --> 00:10:55,120 some of the things that are more important 288 00:10:55,120 --> 00:10:56,300 to us as developers 289 00:10:56,900 --> 00:10:58,100 than maybe someone as a user. 290 00:10:58,280 --> 00:10:59,840 But that doesn't mean that 291 00:10:59,840 --> 00:11:01,240 it's not good for you using, too. 292 00:11:03,660 --> 00:11:04,640 For project history, 293 00:11:04,780 --> 00:11:05,480 about a year ago, 294 00:11:05,620 --> 00:11:06,900 I started working on a network game 295 00:11:06,900 --> 00:11:07,560 with a friend of mine. 296 00:11:07,740 --> 00:11:08,620 It was this cheesy little 297 00:11:08,620 --> 00:11:09,360 end courses client 298 00:11:09,360 --> 00:11:10,220 that looked kind of like 299 00:11:10,220 --> 00:11:11,640 the BDS game Overkill. 300 00:11:11,820 --> 00:11:12,900 I don't know who else has played that, 301 00:11:13,020 --> 00:11:14,440 but it's kind of a fun little game. 302 00:11:14,600 --> 00:11:15,640 You have a little text screen, 303 00:11:15,760 --> 00:11:16,780 you kind of use arrow keys 304 00:11:16,780 --> 00:11:17,420 and we'll go around, 305 00:11:17,440 --> 00:11:18,200 go north, go west, 306 00:11:18,280 --> 00:11:18,740 that kind of stuff. 307 00:11:19,700 --> 00:11:20,200 We coupled that with 308 00:11:20,200 --> 00:11:20,880 a vulnerability scanner 309 00:11:20,880 --> 00:11:22,120 with a tiny little exploit framework, 310 00:11:22,540 --> 00:11:23,680 and as you pop boxes, 311 00:11:23,700 --> 00:11:24,580 it would install a little demon 312 00:11:24,580 --> 00:11:25,780 that would then report your score 313 00:11:25,780 --> 00:11:26,480 and who won the box. 314 00:11:26,640 --> 00:11:27,420 So when I scanned that, 315 00:11:27,460 --> 00:11:27,940 you could determine 316 00:11:27,940 --> 00:11:28,920 what the score of the system was. 317 00:11:29,300 --> 00:11:30,060 We decided, well, 318 00:11:30,140 --> 00:11:31,320 we started running this game 319 00:11:31,320 --> 00:11:32,200 and we want to start running 320 00:11:32,200 --> 00:11:33,140 exploit modules for it, 321 00:11:33,200 --> 00:11:33,920 but the problem is 322 00:11:33,920 --> 00:11:34,560 all the exploit modules 323 00:11:34,560 --> 00:11:35,440 had to work the same way. 324 00:11:35,500 --> 00:11:36,120 They had the same inputs, 325 00:11:36,280 --> 00:11:36,680 same outputs, 326 00:11:36,860 --> 00:11:38,360 be able to take the same payload, 327 00:11:38,500 --> 00:11:40,040 be able to handle firewalls, 328 00:11:40,040 --> 00:11:40,500 things like that. 329 00:11:40,760 --> 00:11:41,820 As we started working on the game, 330 00:11:41,900 --> 00:11:42,240 we were like, wait a minute, 331 00:11:42,300 --> 00:11:42,780 this is actually useful 332 00:11:42,780 --> 00:11:43,620 for a whole lot of this stuff 333 00:11:43,620 --> 00:11:44,420 and we can actually use 334 00:11:44,420 --> 00:11:45,060 the same concept 335 00:11:45,060 --> 00:11:45,960 to develop an exploit framework. 336 00:11:46,600 --> 00:11:47,980 We started rewriting the project 337 00:11:47,980 --> 00:11:49,980 in about, I think, August 2003. 338 00:11:51,040 --> 00:11:52,620 We dropped 1.0 out 339 00:11:52,620 --> 00:11:54,040 just kind of as a, you know, 340 00:11:54,040 --> 00:11:54,820 testing the water, 341 00:11:54,940 --> 00:11:55,800 see if anyone was actually 342 00:11:55,800 --> 00:11:56,460 interested in it, 343 00:11:56,560 --> 00:11:57,600 and oddly enough, 344 00:11:57,660 --> 00:11:58,300 everyone started, like, 345 00:11:58,300 --> 00:11:59,000 actually using it, 346 00:11:59,060 --> 00:11:59,680 and it could have been 347 00:11:59,680 --> 00:12:00,700 because we included 348 00:12:00,700 --> 00:12:01,600 three or four exploits 349 00:12:01,600 --> 00:12:02,940 that didn't really work well 350 00:12:02,940 --> 00:12:03,440 anywhere else. 351 00:12:04,260 --> 00:12:05,160 So it kind of evolved 352 00:12:05,160 --> 00:12:06,100 into an open source project 353 00:12:06,100 --> 00:12:07,680 and Spoon started helping out, 354 00:12:07,740 --> 00:12:08,500 I think in November, 355 00:12:08,680 --> 00:12:09,600 December of last year, 356 00:12:09,780 --> 00:12:10,460 and Spoon just threw 357 00:12:10,460 --> 00:12:11,180 all my code out and said, 358 00:12:11,260 --> 00:12:11,800 eh, that sucks, 359 00:12:11,880 --> 00:12:12,380 I'm going to write it better, 360 00:12:12,440 --> 00:12:12,840 and I was like, okay, 361 00:12:12,900 --> 00:12:13,640 go for it, and he did. 362 00:12:16,880 --> 00:12:19,260 We have four primary developers 363 00:12:19,260 --> 00:12:20,140 right now, me and HD, 364 00:12:20,300 --> 00:12:21,300 work pretty much 365 00:12:21,300 --> 00:12:22,280 on the framework code 366 00:12:22,280 --> 00:12:24,280 and we also have Matt Miller, 367 00:12:24,460 --> 00:12:25,280 who's probably here somewhere, 368 00:12:25,540 --> 00:12:26,540 who's done a lot 369 00:12:26,540 --> 00:12:27,380 of really great work. 370 00:12:27,460 --> 00:12:27,980 He did a lot 371 00:12:27,980 --> 00:12:28,920 of the DLL injection stuff, 372 00:12:28,960 --> 00:12:29,300 you'll see later, 373 00:12:29,520 --> 00:12:30,780 and also working on actually 374 00:12:30,780 --> 00:12:31,940 some of the code 375 00:12:31,940 --> 00:12:32,980 going to Metasploit. 376 00:12:33,180 --> 00:12:34,760 And we also have Optics, 377 00:12:34,780 --> 00:12:35,240 who's doing a lot 378 00:12:35,240 --> 00:12:36,140 of the backend shellcode 379 00:12:36,140 --> 00:12:38,580 and exploits on Solaris 380 00:12:38,580 --> 00:12:39,080 and stuff like that. 381 00:12:39,240 --> 00:12:40,240 So that's basically 382 00:12:40,240 --> 00:12:41,500 the Metasploit team. 383 00:12:42,960 --> 00:12:44,100 We also have a handful 384 00:12:44,100 --> 00:12:44,880 of other contributors, 385 00:12:44,980 --> 00:12:45,940 people sending in 386 00:12:45,960 --> 00:12:46,500 Metasploits exploits 387 00:12:46,500 --> 00:12:47,640 and different payloads. 388 00:12:49,260 --> 00:12:50,780 So a quick overview 389 00:12:50,780 --> 00:12:51,580 of the development status, 390 00:12:51,740 --> 00:12:52,960 we have about 35 exploits 391 00:12:52,960 --> 00:12:54,280 and 40 payloads right now 392 00:12:54,280 --> 00:12:55,540 as of release 2.2. 393 00:12:56,040 --> 00:12:57,920 We have a stable exploit 394 00:12:57,920 --> 00:12:58,600 and payload API. 395 00:12:58,980 --> 00:12:59,840 That was one thing 396 00:12:59,840 --> 00:13:01,220 that 2.2 set out to do 397 00:13:01,220 --> 00:13:02,640 was to sort of freeze 398 00:13:02,640 --> 00:13:04,960 the API so we can safely 399 00:13:04,960 --> 00:13:05,560 tell other people 400 00:13:05,560 --> 00:13:06,760 to start writing things 401 00:13:06,760 --> 00:13:07,380 from Metasploit 402 00:13:07,380 --> 00:13:08,300 and not have them 403 00:13:08,300 --> 00:13:09,360 not work in future releases. 404 00:13:10,080 --> 00:13:11,060 It's widely used 405 00:13:11,060 --> 00:13:12,220 as we're slowly finding out 406 00:13:12,220 --> 00:13:13,180 by a lot of security firms 407 00:13:13,180 --> 00:13:14,720 and a lot of other groups, 408 00:13:15,320 --> 00:13:15,940 and we've been working 409 00:13:15,940 --> 00:13:16,920 on it and it's increasingly used 410 00:13:16,920 --> 00:13:17,700 by system admins 411 00:13:17,700 --> 00:13:18,140 and other people 412 00:13:18,140 --> 00:13:19,860 for verifying network scans. 413 00:13:20,220 --> 00:13:21,180 HD can talk more 414 00:13:21,180 --> 00:13:21,720 about this stuff 415 00:13:21,720 --> 00:13:22,800 because he does a lot more 416 00:13:22,800 --> 00:13:23,660 of it at work than I do. 417 00:13:23,900 --> 00:13:24,580 I'm actually starting 418 00:13:24,580 --> 00:13:25,060 to see a lot of 419 00:13:25,060 --> 00:13:26,120 large software companies 420 00:13:26,120 --> 00:13:26,720 using the product 421 00:13:26,720 --> 00:13:27,600 to test out their products. 422 00:13:28,380 --> 00:13:29,280 They'll have a vulnerability 423 00:13:29,280 --> 00:13:30,080 reporting their product 424 00:13:30,080 --> 00:13:30,760 the way that, you know, 425 00:13:30,780 --> 00:13:31,500 test exploit 4 426 00:13:31,500 --> 00:13:32,260 that demonstrates it 427 00:13:32,260 --> 00:13:33,260 and they actually use 428 00:13:33,260 --> 00:13:34,380 either the Metasploit 429 00:13:34,380 --> 00:13:35,020 client interface 430 00:13:35,020 --> 00:13:36,520 or the actual API itself 431 00:13:36,520 --> 00:13:37,620 to automatically test for that 432 00:13:37,620 --> 00:13:38,420 during the regression 433 00:13:38,420 --> 00:13:38,920 testing process. 434 00:13:39,500 --> 00:13:40,000 There's another 435 00:13:40,000 --> 00:13:40,840 large company that provides 436 00:13:40,840 --> 00:13:41,480 security products 437 00:13:41,480 --> 00:13:42,200 and specifically 438 00:13:42,200 --> 00:13:43,280 host protection products 439 00:13:45,940 --> 00:13:46,160 that cover those 440 00:13:46,160 --> 00:13:47,920 and they actually use 441 00:13:47,920 --> 00:13:48,720 Metasploit along with 442 00:13:48,720 --> 00:13:49,640 different types of payloads 443 00:13:49,640 --> 00:13:50,300 to verify that their 444 00:13:50,300 --> 00:13:50,760 protection system 445 00:13:50,760 --> 00:13:51,540 actually works correctly. 446 00:13:51,900 --> 00:13:52,820 And what you'll notice 447 00:13:52,820 --> 00:13:54,260 with a lot of the host protection 448 00:13:54,260 --> 00:13:55,300 systems on the Windows environment, 449 00:13:55,560 --> 00:13:56,240 instead of doing 450 00:13:56,240 --> 00:13:56,980 memory type protection 451 00:13:56,980 --> 00:13:57,620 where they actually look 452 00:13:57,620 --> 00:13:58,080 for the permissions 453 00:13:58,080 --> 00:13:58,600 of the page, 454 00:13:58,780 --> 00:13:59,740 they just try to prevent you 455 00:13:59,740 --> 00:14:00,540 from doing certain types 456 00:14:00,540 --> 00:14:01,340 of things in your shellcode. 457 00:14:01,560 --> 00:14:02,480 So they'll look for people 458 00:14:02,480 --> 00:14:03,480 calling load library A 459 00:14:03,480 --> 00:14:05,240 from a memory segment 460 00:14:05,240 --> 00:14:05,880 that is writable 461 00:14:05,880 --> 00:14:06,600 or things like that 462 00:14:06,600 --> 00:14:07,620 or from a stack address 463 00:14:07,620 --> 00:14:08,980 and we're starting 464 00:14:08,980 --> 00:14:09,680 to hear more reports 465 00:14:09,680 --> 00:14:10,500 of people actually using this 466 00:14:10,500 --> 00:14:11,360 to do that type of testing. 467 00:14:12,080 --> 00:14:13,160 Version 2.2 468 00:14:13,160 --> 00:14:13,980 was the first development 469 00:14:15,940 --> 00:14:16,020 and we're starting 470 00:14:16,020 --> 00:14:16,580 to pick up 2.2 471 00:14:16,580 --> 00:14:17,700 once we release it next week 472 00:14:17,700 --> 00:14:18,600 or from the secret 473 00:14:18,600 --> 00:14:19,200 blackout URL 474 00:14:19,200 --> 00:14:19,640 that you'll find 475 00:14:19,640 --> 00:14:20,040 at the back end 476 00:14:20,040 --> 00:14:20,420 of the slides. 477 00:14:21,160 --> 00:14:22,380 You can actually use it 478 00:14:22,380 --> 00:14:23,380 to develop Metasploit 479 00:14:23,380 --> 00:14:24,060 so that it should work 480 00:14:24,060 --> 00:14:26,140 in all future versions 481 00:14:26,140 --> 00:14:26,900 of 2.2 482 00:14:26,900 --> 00:14:27,760 for any modifications. 483 00:14:28,340 --> 00:14:29,420 And one important thing 484 00:14:29,420 --> 00:14:30,760 quick about the increasing 485 00:14:30,760 --> 00:14:31,900 use by security firms 486 00:14:31,900 --> 00:14:32,180 and people 487 00:14:32,180 --> 00:14:33,720 after phone scans, 488 00:14:34,300 --> 00:14:35,180 it's one thing 489 00:14:35,180 --> 00:14:36,500 for a security tester 490 00:14:36,500 --> 00:14:36,940 to come in 491 00:14:36,940 --> 00:14:37,220 and say, 492 00:14:37,260 --> 00:14:37,480 network, 493 00:14:37,560 --> 00:14:37,800 and say, 494 00:14:37,860 --> 00:14:38,000 you know, 495 00:14:38,020 --> 00:14:38,660 we scanned your host 496 00:14:38,660 --> 00:14:40,240 and we have one unpatched box 497 00:14:40,240 --> 00:14:41,140 and a lot of people 498 00:14:41,140 --> 00:14:42,060 are realizing that it's 499 00:14:45,940 --> 00:14:47,020 if you have good notes 500 00:14:47,020 --> 00:14:47,420 on an exploit 501 00:14:47,420 --> 00:14:48,120 you know it won't crash 502 00:14:48,120 --> 00:14:48,760 the box and stuff. 503 00:14:48,920 --> 00:14:49,560 Actually go in 504 00:14:49,560 --> 00:14:49,940 and own it 505 00:14:49,940 --> 00:14:50,880 and so then you can say, 506 00:14:50,940 --> 00:14:51,200 you know what I mean, 507 00:14:51,240 --> 00:14:52,940 not only was this box unpatched 508 00:14:52,940 --> 00:14:53,640 but you also had, 509 00:14:53,640 --> 00:14:53,860 you know, 510 00:14:53,900 --> 00:14:54,600 your payroll sitting 511 00:14:54,940 --> 00:14:56,080 in an Excel spreadsheet 512 00:14:56,080 --> 00:14:56,620 on the desktop. 513 00:14:57,560 --> 00:14:58,700 So I think a lot of people 514 00:14:58,700 --> 00:14:59,420 are realizing this 515 00:14:59,420 --> 00:14:59,840 and that's why 516 00:14:59,840 --> 00:15:03,040 I think Metasploit 517 00:15:03,040 --> 00:15:03,520 is really useful 518 00:15:03,520 --> 00:15:04,460 for people 519 00:15:04,460 --> 00:15:05,120 in that sort of area 520 00:15:05,120 --> 00:15:06,340 because it's a nice tool 521 00:15:06,340 --> 00:15:07,060 to follow up after 522 00:15:07,060 --> 00:15:07,680 a wrong assessment. 523 00:15:13,060 --> 00:15:13,500 There's a, 524 00:15:13,660 --> 00:15:14,600 the Metasploit framework 525 00:15:14,600 --> 00:15:15,160 is actually made up 526 00:15:15,160 --> 00:15:15,480 of a ton 527 00:15:15,480 --> 00:15:15,920 of little components 528 00:15:15,940 --> 00:15:17,260 if you look at the list of files 529 00:15:17,260 --> 00:15:18,020 there's something like, 530 00:15:18,080 --> 00:15:18,700 you know, 531 00:15:18,740 --> 00:15:20,080 200 odd Perl modules, 532 00:15:20,180 --> 00:15:20,420 scripts, 533 00:15:20,600 --> 00:15:21,040 source code, 534 00:15:21,140 --> 00:15:21,880 things like that in there. 535 00:15:22,420 --> 00:15:23,400 It's a combination of like, 536 00:15:23,420 --> 00:15:23,560 you know, 537 00:15:23,600 --> 00:15:24,780 Perl, C, Assembler, 538 00:15:24,840 --> 00:15:25,640 there's some Python stuff 539 00:15:25,640 --> 00:15:26,720 for supporting inline egg. 540 00:15:27,180 --> 00:15:27,860 It's really kind of 541 00:15:27,860 --> 00:15:28,600 a hodge podge of stuff 542 00:15:28,600 --> 00:15:29,480 where you pick the best language 543 00:15:29,480 --> 00:15:30,400 for whatever the job happened to be. 544 00:15:31,640 --> 00:15:32,240 There's actually, 545 00:15:32,360 --> 00:15:33,020 this set of interfaces, 546 00:15:33,300 --> 00:15:33,900 there's three different 547 00:15:33,900 --> 00:15:34,880 user interfaces in the project 548 00:15:34,880 --> 00:15:35,180 right now 549 00:15:35,180 --> 00:15:35,580 which we'll cover 550 00:15:35,580 --> 00:15:36,460 in the next section a little bit. 551 00:15:37,000 --> 00:15:38,060 You have your exploits, 552 00:15:38,080 --> 00:15:39,100 you've got your payload encoders 553 00:15:39,100 --> 00:15:39,660 that are responsible 554 00:15:39,660 --> 00:15:41,600 for taking the raw shell code 555 00:15:41,600 --> 00:15:42,720 and actually translating it 556 00:15:42,720 --> 00:15:43,040 into something 557 00:15:43,040 --> 00:15:43,520 that doesn't have 558 00:15:45,940 --> 00:15:46,040 you know, 559 00:15:46,100 --> 00:15:47,180 if you're attacking 560 00:15:47,180 --> 00:15:48,380 a web server 561 00:15:48,380 --> 00:15:48,980 and you have to put 562 00:15:48,980 --> 00:15:49,540 the exploit string 563 00:15:49,540 --> 00:15:50,120 or you have to put 564 00:15:50,120 --> 00:15:50,440 the shell code 565 00:15:50,440 --> 00:15:51,280 into the URL itself 566 00:15:51,280 --> 00:15:52,620 to avoid certain characters 567 00:15:52,620 --> 00:15:53,900 to make it a valid request still. 568 00:15:54,580 --> 00:15:55,240 You've got the actual 569 00:15:55,240 --> 00:15:55,800 payloads themselves. 570 00:15:56,140 --> 00:15:56,600 Those things have 571 00:15:56,600 --> 00:15:57,300 the actual shell code 572 00:15:57,300 --> 00:15:58,260 what actually runs in the box 573 00:15:58,260 --> 00:15:59,160 and the exploit works correctly. 574 00:15:59,860 --> 00:16:00,740 We've got stuff ranging 575 00:16:00,740 --> 00:16:01,460 from bind shells, 576 00:16:01,640 --> 00:16:02,120 connect shells, 577 00:16:02,240 --> 00:16:02,600 execv 578 00:16:02,600 --> 00:16:04,000 to just all kinds 579 00:16:04,000 --> 00:16:04,780 of random weird things 580 00:16:04,780 --> 00:16:06,180 like things that'll actually 581 00:16:06,180 --> 00:16:07,080 reset the signal handle 582 00:16:07,080 --> 00:16:07,880 but it'd be something else 583 00:16:07,880 --> 00:16:08,980 and we've got a lot 584 00:16:08,980 --> 00:16:10,020 of special case payloads 585 00:16:10,020 --> 00:16:10,880 that we use to get around 586 00:16:10,880 --> 00:16:11,420 certain tasks. 587 00:16:11,700 --> 00:16:12,500 And because of the design 588 00:16:15,940 --> 00:16:16,020 of the system 589 00:16:16,020 --> 00:16:16,620 and have it run 590 00:16:16,620 --> 00:16:17,400 with any of the exploits 591 00:16:17,400 --> 00:16:17,800 already there, 592 00:16:18,260 --> 00:16:19,120 you don't have to go through 593 00:16:19,120 --> 00:16:20,060 and actually have to patch 594 00:16:20,060 --> 00:16:20,600 all your silly, 595 00:16:20,660 --> 00:16:20,960 you know, 596 00:16:20,960 --> 00:16:21,880 .c exploits 597 00:16:21,880 --> 00:16:22,980 so that they all use 598 00:16:22,980 --> 00:16:23,600 your new payload 599 00:16:23,600 --> 00:16:24,380 and then have to adjust 600 00:16:24,380 --> 00:16:25,100 the size of them all 601 00:16:25,100 --> 00:16:25,420 and whatnot. 602 00:16:25,540 --> 00:16:26,100 It happens automatically. 603 00:16:27,160 --> 00:16:27,440 Finally, 604 00:16:27,580 --> 00:16:28,480 for the payloads themselves, 605 00:16:29,360 --> 00:16:30,360 each payload has a handler. 606 00:16:30,940 --> 00:16:31,660 People don't really think 607 00:16:31,660 --> 00:16:32,240 about this too much 608 00:16:32,240 --> 00:16:32,720 because it tends 609 00:16:32,720 --> 00:16:33,100 to be automatic 610 00:16:33,580 --> 00:16:35,680 but say your exploit 611 00:16:35,680 --> 00:16:36,820 will create a bind shell, 612 00:16:37,040 --> 00:16:37,480 well you have to write 613 00:16:37,480 --> 00:16:37,840 a bunch of code 614 00:16:37,840 --> 00:16:38,600 to connect to the bind shell 615 00:16:38,600 --> 00:16:39,040 and give them a shell 616 00:16:39,400 --> 00:16:40,300 or tell the user to write, 617 00:16:40,360 --> 00:16:40,480 you know, 618 00:16:46,440 --> 00:16:47,760 use an external program 619 00:16:47,760 --> 00:16:48,480 to connect to the shell. 620 00:16:48,640 --> 00:16:49,320 There's no reason 621 00:16:49,320 --> 00:16:50,440 to have the same boilerplate code 622 00:16:50,440 --> 00:16:51,140 written, you know, 623 00:16:51,160 --> 00:16:51,780 repeatedly in each 624 00:16:51,780 --> 00:16:52,800 and every exploit. 625 00:16:53,080 --> 00:16:54,140 So we've got a handler system 626 00:16:54,140 --> 00:16:55,340 where for every single payload 627 00:16:55,340 --> 00:16:56,300 it defines how it handles 628 00:16:56,300 --> 00:16:56,880 that payload itself. 629 00:16:57,240 --> 00:16:58,300 If it's a reverse connection, 630 00:16:58,500 --> 00:16:58,780 for instance, 631 00:16:58,980 --> 00:17:00,660 the own box connects 632 00:17:00,660 --> 00:17:01,180 back to you, 633 00:17:01,220 --> 00:17:01,900 it'll create a listener 634 00:17:01,900 --> 00:17:02,940 then bind that to a console 635 00:17:02,940 --> 00:17:03,820 and that console 636 00:17:03,820 --> 00:17:04,560 could be the actual 637 00:17:04,560 --> 00:17:05,300 standard input output. 638 00:17:05,500 --> 00:17:07,000 It could be a telnet server 639 00:17:07,000 --> 00:17:07,620 that actually runs 640 00:17:07,620 --> 00:17:08,160 a different port 641 00:17:08,160 --> 00:17:09,460 and if you've actually seen 642 00:17:09,460 --> 00:17:10,440 the MSF web console, 643 00:17:10,620 --> 00:17:11,440 it actually creates 644 00:17:11,440 --> 00:17:12,400 a proxy telnet server 645 00:17:12,400 --> 00:17:13,180 that puts a command shell 646 00:17:13,180 --> 00:17:14,040 on that and then redirects 647 00:17:14,040 --> 00:17:15,400 your browser to a telnet 648 00:17:15,940 --> 00:17:16,440 slash those links 649 00:17:16,440 --> 00:17:17,020 to the proxy server. 650 00:17:17,680 --> 00:17:18,300 And finally, 651 00:17:18,340 --> 00:17:18,800 you have the, 652 00:17:18,800 --> 00:17:19,320 sorry, 653 00:17:20,400 --> 00:17:21,160 the NOP system 654 00:17:21,880 --> 00:17:22,780 and as you know, 655 00:17:22,840 --> 00:17:23,500 NOPs used to pad 656 00:17:23,500 --> 00:17:24,080 the payload space 657 00:17:24,620 --> 00:17:25,740 because the way 658 00:17:25,740 --> 00:17:26,500 that we're able to do 659 00:17:28,180 --> 00:17:28,900 interchangeable payloads 660 00:17:28,900 --> 00:17:29,920 is we tend to hard code 661 00:17:29,920 --> 00:17:30,420 the amount of space 662 00:17:30,420 --> 00:17:30,900 that's actually used 663 00:17:30,900 --> 00:17:31,440 by the payloads 664 00:17:31,440 --> 00:17:32,160 on a per exploit basis. 665 00:17:32,600 --> 00:17:33,500 So you can have, 666 00:17:33,540 --> 00:17:33,760 you know, 667 00:17:33,840 --> 00:17:34,520 one exploit has room 668 00:17:34,520 --> 00:17:35,520 for about 512 bytes 669 00:17:35,520 --> 00:17:35,800 of payload, 670 00:17:36,080 --> 00:17:37,000 you just have to be 671 00:17:37,000 --> 00:17:37,300 in the space 672 00:17:37,300 --> 00:17:37,840 for that payload 673 00:17:37,840 --> 00:17:38,380 to be 512. 674 00:17:38,820 --> 00:17:39,740 If your payload 675 00:17:39,740 --> 00:17:40,080 you're using 676 00:17:40,080 --> 00:17:40,780 is only 200 bytes, 677 00:17:41,020 --> 00:17:41,500 it would then pad 678 00:17:45,940 --> 00:17:46,180 the payload space 679 00:17:46,180 --> 00:17:46,420 and you can actually 680 00:17:46,420 --> 00:17:47,240 set environment variables 681 00:17:47,240 --> 00:17:48,720 to randomize 682 00:17:48,720 --> 00:17:49,120 the NOPs slides 683 00:17:49,120 --> 00:17:49,480 in the cells. 684 00:17:49,800 --> 00:17:51,020 You can actually specify 685 00:17:51,020 --> 00:17:51,840 a minimum NOP slide 686 00:17:51,840 --> 00:17:53,220 so if you're doing 687 00:17:53,220 --> 00:17:53,820 a brute force attack 688 00:17:53,820 --> 00:17:54,360 and you require 689 00:17:54,360 --> 00:17:54,840 a certain amount 690 00:17:54,840 --> 00:17:55,620 of NOPs to be there, 691 00:17:55,740 --> 00:17:56,800 it'll always make sure 692 00:17:56,800 --> 00:17:57,340 that that amount 693 00:17:57,340 --> 00:17:57,860 of NOPs are there. 694 00:17:58,480 --> 00:17:58,840 Additionally, 695 00:17:58,980 --> 00:18:00,160 each exploit can define 696 00:18:00,160 --> 00:18:01,000 which registers have 697 00:18:01,000 --> 00:18:02,560 to be preserved 698 00:18:03,000 --> 00:18:03,800 during the NOP slide 699 00:18:03,800 --> 00:18:04,040 itself. 700 00:18:04,380 --> 00:18:05,020 So you're using 701 00:18:05,020 --> 00:18:05,860 a randomized NOP slide 702 00:18:05,860 --> 00:18:06,520 and you would need 703 00:18:06,520 --> 00:18:07,100 to make sure 704 00:18:07,100 --> 00:18:07,780 that EBX registers 705 00:18:07,780 --> 00:18:08,380 never touch 706 00:18:08,380 --> 00:18:08,880 because you'd use 707 00:18:08,880 --> 00:18:09,280 that to get back 708 00:18:15,940 --> 00:18:16,160 to the other part 709 00:18:16,160 --> 00:18:17,080 because it's actually 710 00:18:17,080 --> 00:18:17,580 really important 711 00:18:17,580 --> 00:18:18,840 and one of the reasons 712 00:18:18,840 --> 00:18:19,280 we've been able 713 00:18:19,280 --> 00:18:19,780 to do a lot of 714 00:18:19,780 --> 00:18:20,440 the cool stuff 715 00:18:20,440 --> 00:18:21,300 like the VNC eject 716 00:18:21,300 --> 00:18:22,460 and some of our 717 00:18:22,460 --> 00:18:23,260 staged payloads. 718 00:18:23,620 --> 00:18:24,860 Just the way it's designed 719 00:18:24,860 --> 00:18:25,440 it's really easy 720 00:18:25,440 --> 00:18:26,480 to back on a lot 721 00:18:26,480 --> 00:18:27,320 of the handlers 722 00:18:27,320 --> 00:18:27,760 already written. 723 00:18:27,800 --> 00:18:28,240 For example, 724 00:18:28,280 --> 00:18:28,620 if you were going 725 00:18:28,620 --> 00:18:30,660 to write a reverse connection 726 00:18:30,660 --> 00:18:31,880 shell that does 727 00:18:31,880 --> 00:18:33,560 a simple one byte XOR, 728 00:18:33,680 --> 00:18:34,380 it would be a matter 729 00:18:34,380 --> 00:18:35,380 of writing a payload 730 00:18:35,380 --> 00:18:36,520 and adding two sub-functions 731 00:18:36,520 --> 00:18:38,160 to filter the outbound 732 00:18:38,160 --> 00:18:38,860 and inbound traffic 733 00:18:38,860 --> 00:18:39,640 to do the XOR. 734 00:18:39,800 --> 00:18:40,620 So it's really a matter 735 00:18:40,620 --> 00:18:42,320 of an extra six lines 736 00:18:42,320 --> 00:18:43,100 or something in the payload 737 00:18:43,100 --> 00:18:43,840 and you can already 738 00:18:45,940 --> 00:18:46,740 and MSF grab 739 00:18:46,740 --> 00:18:47,520 and any other consoles 740 00:18:47,520 --> 00:18:48,260 that we have already written. 741 00:18:49,320 --> 00:18:50,320 And this actually comes 742 00:18:50,320 --> 00:18:50,900 into play a lot 743 00:18:50,900 --> 00:18:51,280 when we do, 744 00:18:51,320 --> 00:18:52,280 we'll show the VNC stuff 745 00:18:52,280 --> 00:18:53,400 and all of it was really, 746 00:18:53,480 --> 00:18:54,180 really simple to implement 747 00:18:54,180 --> 00:18:55,080 just because of our 748 00:18:55,080 --> 00:18:55,500 payload system 749 00:18:55,500 --> 00:18:56,300 and the way the handlers 750 00:18:56,300 --> 00:18:56,740 all work. 751 00:18:57,320 --> 00:18:58,400 So a lot of it's hidden 752 00:18:58,400 --> 00:18:58,980 from you but there's 753 00:18:58,980 --> 00:18:59,480 a lot of times 754 00:18:59,480 --> 00:18:59,840 there's some pretty 755 00:18:59,840 --> 00:19:00,600 complicated stuff going 756 00:19:00,600 --> 00:19:01,300 on in the back end. 757 00:19:01,440 --> 00:19:02,340 But as a user 758 00:19:02,340 --> 00:19:03,280 if you didn't have 759 00:19:03,280 --> 00:19:04,140 a handler system to do 760 00:19:04,140 --> 00:19:04,880 it would be really annoying. 761 00:19:05,020 --> 00:19:05,420 You know, 762 00:19:05,420 --> 00:19:06,080 dubbing that cat, 763 00:19:06,420 --> 00:19:07,060 sitting there trying 764 00:19:07,060 --> 00:19:07,440 to figure out 765 00:19:07,440 --> 00:19:07,980 which one's read 766 00:19:07,980 --> 00:19:08,520 which one's write 767 00:19:15,940 --> 00:19:16,220 what's going on 768 00:19:16,220 --> 00:19:17,240 is a lot because of this. 769 00:19:20,040 --> 00:19:23,200 So this is a brief layout 770 00:19:23,200 --> 00:19:25,000 of sort of the design 771 00:19:25,000 --> 00:19:25,640 of Metasploit. 772 00:19:26,080 --> 00:19:27,380 You have the interfaces 773 00:19:27,380 --> 00:19:28,150 which is extracted 774 00:19:28,500 --> 00:19:29,520 from the framework code 775 00:19:29,520 --> 00:19:31,940 and it's really trivial 776 00:19:31,940 --> 00:19:32,600 to run a new interface. 777 00:19:32,960 --> 00:19:33,680 We just have 778 00:19:33,680 --> 00:19:35,000 three simple ones. 779 00:19:35,220 --> 00:19:36,300 We have the console interface 780 00:19:36,300 --> 00:19:37,900 which is the supported client 781 00:19:37,900 --> 00:19:38,880 in what we do 782 00:19:38,880 --> 00:19:39,920 all of our development work on. 783 00:19:40,200 --> 00:19:42,020 We have a command line interface 784 00:19:42,020 --> 00:19:44,200 which is good for scripting 785 00:19:44,200 --> 00:19:45,100 and parsing 786 00:19:45,100 --> 00:19:45,920 and then we have 787 00:19:45,940 --> 00:19:47,160 the web interface 788 00:19:47,160 --> 00:19:48,280 which is sort of the flashy 789 00:19:48,280 --> 00:19:49,080 proof of concept 790 00:19:49,080 --> 00:19:49,900 demo interface. 791 00:19:51,840 --> 00:19:52,460 We also, 792 00:19:52,680 --> 00:19:53,340 I don't know if you want 793 00:19:53,340 --> 00:19:53,720 to touch on some 794 00:19:53,720 --> 00:19:54,000 of this stuff, 795 00:19:54,620 --> 00:19:55,120 we have, 796 00:19:55,500 --> 00:19:56,300 we explained some 797 00:19:56,300 --> 00:19:57,100 of the modules before. 798 00:19:57,820 --> 00:19:58,620 We have four types 799 00:19:58,620 --> 00:19:59,100 of modules. 800 00:19:59,340 --> 00:19:59,960 The handlers 801 00:19:59,960 --> 00:20:00,660 that we were talking 802 00:20:00,660 --> 00:20:01,060 about before 803 00:20:01,060 --> 00:20:01,700 are considered part 804 00:20:01,700 --> 00:20:02,480 of the payloads. 805 00:20:03,000 --> 00:20:04,000 We have some libraries 806 00:20:04,000 --> 00:20:05,020 for example, 807 00:20:05,100 --> 00:20:05,920 we have a lot of code 808 00:20:05,920 --> 00:20:06,960 in packs for example. 809 00:20:06,960 --> 00:20:07,820 We have an SMB stack. 810 00:20:09,240 --> 00:20:10,420 We have a lot of stuff 811 00:20:10,420 --> 00:20:11,080 in MSF. 812 00:20:11,260 --> 00:20:11,900 We have a lot 813 00:20:11,900 --> 00:20:12,600 of core classes, 814 00:20:13,620 --> 00:20:14,340 UE utils 815 00:20:14,340 --> 00:20:15,040 and stuff like that. 816 00:20:15,560 --> 00:20:15,920 So, 817 00:20:15,940 --> 00:20:16,300 the nice thing 818 00:20:16,300 --> 00:20:17,200 is that all those modules 819 00:20:17,200 --> 00:20:17,740 all inherit 820 00:20:17,740 --> 00:20:18,740 from those bottom classes. 821 00:20:19,000 --> 00:20:19,460 So, we have some, 822 00:20:19,540 --> 00:20:20,500 probably the strangest 823 00:20:20,960 --> 00:20:21,700 you've ever seen 824 00:20:21,700 --> 00:20:22,340 before in your life. 825 00:20:22,540 --> 00:20:23,320 When you start looking 826 00:20:23,320 --> 00:20:23,540 at the way 827 00:20:23,540 --> 00:20:24,720 some of this stuff, 828 00:20:24,960 --> 00:20:25,760 you actually have 829 00:20:26,200 --> 00:20:26,860 payloads that import 830 00:20:26,860 --> 00:20:27,480 from one class 831 00:20:27,480 --> 00:20:28,420 and then tell 832 00:20:28,420 --> 00:20:29,860 the imported class 833 00:20:29,860 --> 00:20:30,840 who its parent is. 834 00:20:31,340 --> 00:20:31,740 So, 835 00:20:31,780 --> 00:20:32,480 it gets pretty tweaked 836 00:20:32,480 --> 00:20:33,400 as far as what payload 837 00:20:33,400 --> 00:20:33,840 inherits 838 00:20:33,840 --> 00:20:34,440 whatever the class 839 00:20:34,440 --> 00:20:35,560 but the endpoint 840 00:20:35,560 --> 00:20:36,160 is you can actually 841 00:20:36,160 --> 00:20:36,760 have a payload 842 00:20:36,760 --> 00:20:37,600 which handles a, 843 00:20:37,620 --> 00:20:38,480 you know, 844 00:20:38,500 --> 00:20:38,960 command shell 845 00:20:38,960 --> 00:20:39,620 with input output 846 00:20:39,620 --> 00:20:40,700 and be able to find 847 00:20:45,940 --> 00:20:46,160 and where to have you. 848 00:20:46,280 --> 00:20:47,180 But because of the way 849 00:20:47,180 --> 00:20:47,600 it's designed, 850 00:20:47,760 --> 00:20:48,460 you can actually replace 851 00:20:48,460 --> 00:20:49,560 the parent handles, 852 00:20:50,040 --> 00:20:50,740 excuse me, 853 00:20:50,780 --> 00:20:51,660 the handler's parents 854 00:20:51,660 --> 00:20:52,240 on the fly. 855 00:20:52,780 --> 00:20:53,900 And why that's important 856 00:20:53,900 --> 00:20:54,360 is because, 857 00:20:54,440 --> 00:20:54,920 for example, 858 00:20:55,020 --> 00:20:57,020 we have a stage, 859 00:20:57,020 --> 00:20:57,980 a staging system 860 00:20:57,980 --> 00:20:58,840 for the Windows stuff 861 00:20:58,840 --> 00:20:59,520 and if you're not familiar 862 00:20:59,520 --> 00:21:00,720 with what a stage 863 00:21:00,720 --> 00:21:01,180 payload is, 864 00:21:01,240 --> 00:21:01,540 basically, 865 00:21:01,640 --> 00:21:03,140 if you want to say 866 00:21:03,140 --> 00:21:03,920 get a reverse connection 867 00:21:03,920 --> 00:21:04,980 and then get a command shell 868 00:21:04,980 --> 00:21:06,140 it may be 300 bytes 869 00:21:06,140 --> 00:21:07,180 but if you just get 870 00:21:07,180 --> 00:21:08,260 a reverse connection 871 00:21:08,260 --> 00:21:09,260 and then have code 872 00:21:09,260 --> 00:21:10,160 or read in more code 873 00:21:10,160 --> 00:21:10,820 and execute it, 874 00:21:10,920 --> 00:21:11,760 that may be 200 bytes. 875 00:21:11,960 --> 00:21:12,280 So, 876 00:21:16,000 --> 00:21:16,980 for a lot of reasons 877 00:21:16,980 --> 00:21:17,400 then you can have 878 00:21:17,400 --> 00:21:18,160 really big payloads 879 00:21:18,160 --> 00:21:18,620 and stuff like that 880 00:21:18,620 --> 00:21:20,040 and we have a lot 881 00:21:20,040 --> 00:21:20,740 of staging going on. 882 00:21:22,640 --> 00:21:23,000 So, 883 00:21:23,120 --> 00:21:24,200 because of how that works 884 00:21:24,200 --> 00:21:24,780 you can just write 885 00:21:24,780 --> 00:21:25,340 a stage 886 00:21:25,340 --> 00:21:26,300 which is really independent 887 00:21:26,300 --> 00:21:27,020 of the stager 888 00:21:27,020 --> 00:21:28,080 and then you can build 889 00:21:28,080 --> 00:21:29,080 stagers by just saying 890 00:21:29,080 --> 00:21:30,160 I want a stage 891 00:21:30,160 --> 00:21:31,440 and a reverse stager 892 00:21:31,440 --> 00:21:31,960 I want a stage 893 00:21:31,960 --> 00:21:32,620 and a bind stager 894 00:21:32,620 --> 00:21:33,180 I want a stage 895 00:21:33,180 --> 00:21:34,280 and a find sock stager. 896 00:21:34,380 --> 00:21:35,880 And you can sort of like, 897 00:21:35,920 --> 00:21:36,160 you know, 898 00:21:36,180 --> 00:21:37,300 build your payloads together 899 00:21:37,300 --> 00:21:39,300 and with a lot of code reuse 900 00:21:39,300 --> 00:21:40,760 and a lot of backing 901 00:21:40,760 --> 00:21:41,780 on stuff like that. 902 00:21:44,040 --> 00:21:44,400 So, 903 00:21:44,460 --> 00:21:44,840 a quick intro 904 00:21:46,080 --> 00:21:46,440 to MSF CLI. 905 00:21:46,440 --> 00:21:46,780 This is actually 906 00:21:46,780 --> 00:21:48,020 the same sort of interface 907 00:21:48,020 --> 00:21:48,520 that's been around 908 00:21:48,520 --> 00:21:49,480 since version 1.0. 909 00:21:50,720 --> 00:21:51,440 MSF CLI 910 00:21:51,440 --> 00:21:51,900 give it the, 911 00:21:52,280 --> 00:21:52,740 you know, 912 00:21:52,760 --> 00:21:53,160 some string 913 00:21:53,160 --> 00:21:53,760 that will match 914 00:21:53,760 --> 00:21:54,300 the type of, 915 00:21:54,380 --> 00:21:55,440 the name of the payload, 916 00:21:55,620 --> 00:21:56,120 excuse me, 917 00:21:56,120 --> 00:21:56,880 that's what you want to use. 918 00:21:57,040 --> 00:21:57,400 So, 919 00:21:57,420 --> 00:21:57,780 you want to explore 920 00:21:57,780 --> 00:21:58,360 with the LSASS 921 00:21:58,360 --> 00:21:58,860 you just do 922 00:21:58,860 --> 00:22:00,060 LSASS would match. 923 00:22:00,180 --> 00:22:00,680 You don't have to do 924 00:22:00,680 --> 00:22:01,500 the full module name. 925 00:22:02,740 --> 00:22:03,440 You can do, 926 00:22:03,580 --> 00:22:03,840 you know, 927 00:22:03,840 --> 00:22:04,320 dump a summary 928 00:22:04,320 --> 00:22:04,940 which dumps all kinds 929 00:22:04,940 --> 00:22:05,260 of information 930 00:22:05,260 --> 00:22:05,780 about the exploit. 931 00:22:06,100 --> 00:22:06,980 One of the biggest problems 932 00:22:06,980 --> 00:22:07,740 with public exploits 933 00:22:07,740 --> 00:22:08,460 is you don't really know 934 00:22:15,940 --> 00:22:16,500 what reference is actually 935 00:22:16,500 --> 00:22:17,080 the vulnerability 936 00:22:17,080 --> 00:22:17,720 that it affects. 937 00:22:18,080 --> 00:22:18,400 But, 938 00:22:18,440 --> 00:22:19,040 we put all the information 939 00:22:19,040 --> 00:22:19,560 directly in the 940 00:22:19,560 --> 00:22:20,220 exploit module itself. 941 00:22:20,600 --> 00:22:21,300 If you look at most 942 00:22:21,300 --> 00:22:21,900 of the exploit module, 943 00:22:22,080 --> 00:22:22,840 at least half the code 944 00:22:22,840 --> 00:22:23,800 is just meta information. 945 00:22:24,480 --> 00:22:24,800 It's, 946 00:22:24,800 --> 00:22:25,320 I mean, 947 00:22:25,340 --> 00:22:25,900 these things are only 948 00:22:25,900 --> 00:22:26,600 like four or five hundred 949 00:22:26,600 --> 00:22:27,520 lines long at the most 950 00:22:27,520 --> 00:22:28,280 with some being, 951 00:22:28,380 --> 00:22:28,500 you know, 952 00:22:28,560 --> 00:22:30,740 is only like 200 lines 953 00:22:30,740 --> 00:22:31,860 and about half of that 954 00:22:31,860 --> 00:22:32,220 is just like, 955 00:22:32,280 --> 00:22:32,400 you know, 956 00:22:32,420 --> 00:22:33,140 what the exploit is, 957 00:22:33,300 --> 00:22:34,100 what it affects, 958 00:22:34,300 --> 00:22:35,060 some references to it, 959 00:22:35,080 --> 00:22:35,440 some URLs, 960 00:22:35,820 --> 00:22:36,540 things like that 961 00:22:36,540 --> 00:22:37,200 and kind of give you 962 00:22:37,200 --> 00:22:37,560 some information 963 00:22:37,560 --> 00:22:38,780 about what the exploit 964 00:22:45,940 --> 00:22:46,180 is capable of. 965 00:22:46,280 --> 00:22:46,900 if there's an advanced, 966 00:22:47,040 --> 00:22:47,440 excuse me, 967 00:22:47,480 --> 00:22:48,380 if there's an option for, 968 00:22:48,400 --> 00:22:48,900 you know, 969 00:22:48,900 --> 00:22:49,680 the host you're going to attack 970 00:22:49,680 --> 00:22:51,140 or the port you want to attack 971 00:22:51,140 --> 00:22:52,180 or they enable SSL 972 00:22:52,180 --> 00:22:52,760 for a given attack, 973 00:22:52,940 --> 00:22:53,440 things like that. 974 00:22:53,680 --> 00:22:54,260 It's all done through 975 00:22:54,260 --> 00:22:54,620 the environment 976 00:22:54,620 --> 00:22:55,520 and you can look at those 977 00:22:55,520 --> 00:22:56,180 options through that. 978 00:22:56,520 --> 00:22:57,360 There's an advanced section, 979 00:22:57,460 --> 00:22:57,920 et cetera, et cetera. 980 00:22:58,080 --> 00:22:58,220 So, 981 00:22:58,280 --> 00:22:58,800 we'll probably cover these 982 00:22:58,800 --> 00:22:59,200 in more detail, 983 00:22:59,400 --> 00:22:59,600 but, 984 00:22:59,680 --> 00:23:00,460 if you have an idea, 985 00:23:00,500 --> 00:23:01,140 you can just put them all 986 00:23:01,140 --> 00:23:01,700 on the command line, 987 00:23:01,780 --> 00:23:02,280 you run up the console 988 00:23:02,280 --> 00:23:03,260 with a client interface 989 00:23:03,260 --> 00:23:04,200 and you can script 990 00:23:04,200 --> 00:23:04,680 this real easy. 991 00:23:05,940 --> 00:23:06,220 Yeah, 992 00:23:06,360 --> 00:23:07,340 an important thing to think 993 00:23:15,940 --> 00:23:16,320 when you take code 994 00:23:16,320 --> 00:23:16,780 in front of it, 995 00:23:16,840 --> 00:23:17,060 for example, 996 00:23:17,060 --> 00:23:17,640 the console interface, 997 00:23:17,880 --> 00:23:18,780 the majority of the code 998 00:23:18,780 --> 00:23:19,780 is handling nice stuff 999 00:23:19,780 --> 00:23:20,560 like tab completion, 1000 00:23:20,900 --> 00:23:21,600 a lot of other stuff. 1001 00:23:21,700 --> 00:23:22,540 All of the session logging 1002 00:23:22,540 --> 00:23:23,940 and the environments 1003 00:23:23,940 --> 00:23:24,660 are handled actually 1004 00:23:24,660 --> 00:23:25,120 on the backend 1005 00:23:25,120 --> 00:23:25,900 and are really 1006 00:23:25,900 --> 00:23:27,320 user interface independent. 1007 00:23:27,820 --> 00:23:28,200 So, 1008 00:23:29,100 --> 00:23:29,980 brief overview 1009 00:23:29,980 --> 00:23:30,880 of the console interface. 1010 00:23:32,920 --> 00:23:34,100 HD worked a lot 1011 00:23:34,100 --> 00:23:34,600 on getting really 1012 00:23:34,600 --> 00:23:35,720 rad tab completion. 1013 00:23:35,980 --> 00:23:36,320 So, 1014 00:23:36,340 --> 00:23:36,680 there's pretty much 1015 00:23:36,680 --> 00:23:37,080 tab completion 1016 00:23:37,080 --> 00:23:37,580 on everything. 1017 00:23:37,920 --> 00:23:38,820 They'll store a cache 1018 00:23:38,820 --> 00:23:39,920 of IP addresses 1019 00:23:39,920 --> 00:23:41,020 that you've used 1020 00:23:41,020 --> 00:23:41,740 and you can tab complete 1021 00:23:41,740 --> 00:23:42,700 IP addresses, commands, 1022 00:23:45,940 --> 00:23:46,060 logging, 1023 00:23:46,080 --> 00:23:46,940 which is really important 1024 00:23:46,940 --> 00:23:48,120 for people doing pen testing. 1025 00:23:48,980 --> 00:23:49,660 You can, 1026 00:23:49,680 --> 00:23:50,180 you know, 1027 00:23:50,220 --> 00:23:50,820 if you want to remember 1028 00:23:50,820 --> 00:23:52,080 what you set your 1029 00:23:52,080 --> 00:23:52,980 backdoor password to 1030 00:23:52,980 --> 00:23:54,020 a couple weeks later, 1031 00:23:54,140 --> 00:23:54,700 you can go through 1032 00:23:54,700 --> 00:23:55,700 and look through the logs 1033 00:23:55,700 --> 00:23:56,880 and it keeps a full time 1034 00:23:56,880 --> 00:23:57,840 stamped record 1035 00:23:57,840 --> 00:23:58,980 of not only 1036 00:23:58,980 --> 00:24:00,020 the exploit attempts 1037 00:24:00,020 --> 00:24:00,820 and whether those 1038 00:24:00,820 --> 00:24:01,900 are successful or not, 1039 00:24:02,040 --> 00:24:03,180 but also it will log 1040 00:24:03,180 --> 00:24:03,880 all of the data 1041 00:24:03,880 --> 00:24:04,420 sent through 1042 00:24:04,420 --> 00:24:05,760 our handler system. 1043 00:24:05,940 --> 00:24:06,040 So, 1044 00:24:06,040 --> 00:24:06,520 if you get a shell, 1045 00:24:06,720 --> 00:24:07,400 it will log 1046 00:24:07,400 --> 00:24:08,560 all of the shell activity. 1047 00:24:08,900 --> 00:24:09,700 This is off by default 1048 00:24:09,700 --> 00:24:10,100 by the way, 1049 00:24:10,140 --> 00:24:10,680 it's optional. 1050 00:24:11,260 --> 00:24:11,700 And, 1051 00:24:12,240 --> 00:24:12,680 well, 1052 00:24:15,940 --> 00:24:16,880 along with time stamps 1053 00:24:16,880 --> 00:24:17,880 and then we have a tool 1054 00:24:17,880 --> 00:24:18,920 MSF log dump 1055 00:24:18,920 --> 00:24:19,820 that can go through 1056 00:24:19,820 --> 00:24:20,260 and, you know, 1057 00:24:20,260 --> 00:24:21,320 gives you red and blue output 1058 00:24:21,320 --> 00:24:22,080 so you can go through 1059 00:24:22,080 --> 00:24:23,120 and after you can see 1060 00:24:23,120 --> 00:24:23,600 all the logs 1061 00:24:23,600 --> 00:24:24,720 and if you wanted to, 1062 00:24:24,780 --> 00:24:25,520 it's all time stamped 1063 00:24:25,520 --> 00:24:26,180 so you can go through 1064 00:24:26,180 --> 00:24:26,860 and replay it. 1065 00:24:27,000 --> 00:24:27,800 And this is really good 1066 00:24:27,800 --> 00:24:29,220 if you're pen testing 1067 00:24:29,220 --> 00:24:29,620 or something 1068 00:24:29,620 --> 00:24:30,320 and you have, 1069 00:24:30,340 --> 00:24:31,060 you know, 1070 00:24:31,080 --> 00:24:32,200 a customer that comes back 1071 00:24:32,200 --> 00:24:32,380 and says, 1072 00:24:32,500 --> 00:24:33,020 you know, 1073 00:24:33,060 --> 00:24:33,980 our system crashed 1074 00:24:33,980 --> 00:24:34,640 at five o'clock, 1075 00:24:34,740 --> 00:24:35,280 blah, blah, blah, blah, 1076 00:24:35,380 --> 00:24:36,080 you can come back 1077 00:24:36,080 --> 00:24:36,420 and be like, 1078 00:24:36,440 --> 00:24:36,520 well, 1079 00:24:36,540 --> 00:24:37,160 we owned it at four 1080 00:24:37,160 --> 00:24:38,220 we were out by 4.15 1081 00:24:38,220 --> 00:24:39,100 so it wasn't us. 1082 00:24:41,000 --> 00:24:41,440 So, 1083 00:24:41,600 --> 00:24:42,320 I mean, 1084 00:24:42,920 --> 00:24:43,700 this is something 1085 00:24:43,700 --> 00:24:44,660 that's definitely 1086 00:24:44,660 --> 00:24:45,320 very valuable. 1087 00:24:45,580 --> 00:24:46,980 It has history, 1088 00:24:47,180 --> 00:24:48,140 it's read line 1089 00:24:48,140 --> 00:24:49,420 so it's very familiar 1090 00:24:49,420 --> 00:24:50,020 if anybody's like 1091 00:24:50,020 --> 00:24:50,920 used to bash 1092 00:24:50,920 --> 00:24:51,680 it uses the same, 1093 00:24:51,700 --> 00:24:52,540 the same library 1094 00:24:52,540 --> 00:24:53,140 so you can know 1095 00:24:53,140 --> 00:24:53,700 you can do up 1096 00:24:53,700 --> 00:24:54,100 and down 1097 00:24:54,100 --> 00:24:54,640 for history, 1098 00:24:54,780 --> 00:24:55,780 you can do tab completion, 1099 00:24:56,540 --> 00:24:57,440 all sort of that. 1100 00:24:58,820 --> 00:24:59,680 Metasploit back end, 1101 00:24:59,800 --> 00:25:00,600 or the Metasploit interface 1102 00:25:00,600 --> 00:25:02,280 is very invent driven, 1103 00:25:02,500 --> 00:25:03,480 environment driven 1104 00:25:03,480 --> 00:25:05,320 so we have access 1105 00:25:05,320 --> 00:25:06,340 to the complete environment 1106 00:25:06,340 --> 00:25:06,680 and, 1107 00:25:06,960 --> 00:25:07,140 you know, 1108 00:25:07,140 --> 00:25:07,920 from Metaseth 1109 00:25:07,920 --> 00:25:08,840 and it's very much 1110 00:25:08,840 --> 00:25:09,420 like you'd use to 1111 00:25:09,420 --> 00:25:09,740 solve something, 1112 00:25:10,000 --> 00:25:10,500 stack commands, 1113 00:25:10,780 --> 00:25:11,700 you can see the environment, 1114 00:25:11,840 --> 00:25:13,140 unset environmental variables, 1115 00:25:13,580 --> 00:25:14,240 stuff like that. 1116 00:25:16,840 --> 00:25:17,520 The class interface 1117 00:25:17,520 --> 00:25:18,200 was kind of written 1118 00:25:18,200 --> 00:25:18,700 as a joke 1119 00:25:18,700 --> 00:25:19,260 but we thought 1120 00:25:19,260 --> 00:25:19,780 it was funny enough 1121 00:25:19,780 --> 00:25:20,380 to keep it in there. 1122 00:25:21,100 --> 00:25:21,420 Essentially, 1123 00:25:21,500 --> 00:25:21,960 it starts a little 1124 00:25:21,960 --> 00:25:22,720 built in web server 1125 00:25:22,720 --> 00:25:23,260 on the system 1126 00:25:23,580 --> 00:25:24,580 and you can just browse 1127 00:25:24,580 --> 00:25:25,160 to this web interface 1128 00:25:25,160 --> 00:25:25,860 and it gives you a list 1129 00:25:25,860 --> 00:25:26,160 of all these 1130 00:25:26,160 --> 00:25:26,740 open exploits. 1131 00:25:26,800 --> 00:25:27,480 You just kind of click along, 1132 00:25:27,760 --> 00:25:28,620 you click the exploit 1133 00:25:28,620 --> 00:25:29,300 and it gives you a list, 1134 00:25:29,380 --> 00:25:29,520 okay, 1135 00:25:29,560 --> 00:25:30,420 here's what the exploit does, 1136 00:25:30,620 --> 00:25:31,580 you can click the select payload, 1137 00:25:31,580 --> 00:25:32,620 pick whatever payload 1138 00:25:32,620 --> 00:25:33,260 you feel like using, 1139 00:25:33,500 --> 00:25:34,260 go to the next section 1140 00:25:34,260 --> 00:25:34,800 where it fills in 1141 00:25:34,800 --> 00:25:35,540 all the form values 1142 00:25:35,540 --> 00:25:36,180 for all the options 1143 00:25:36,180 --> 00:25:36,560 that are set 1144 00:25:36,560 --> 00:25:37,820 and finally you just hit exploit 1145 00:25:37,820 --> 00:25:39,280 and what actually happens is 1146 00:25:39,280 --> 00:25:39,920 it does everything 1147 00:25:39,920 --> 00:25:40,540 that the console, 1148 00:25:40,640 --> 00:25:41,820 the CLI would possibly do 1149 00:25:41,820 --> 00:25:42,660 in terms of actually, 1150 00:25:42,760 --> 00:25:43,080 you know, 1151 00:25:43,100 --> 00:25:44,180 breaking into the box, 1152 00:25:44,280 --> 00:25:44,840 connecting to whatever 1153 00:25:44,840 --> 00:25:46,140 the payload itself was. 1154 00:25:46,300 --> 00:25:47,040 There's a bind shell, 1155 00:25:47,120 --> 00:25:48,020 the web server then connecting 1156 00:25:48,020 --> 00:25:48,620 to the server, 1157 00:25:48,740 --> 00:25:50,020 to the port that the shell's on, 1158 00:25:50,080 --> 00:25:50,760 connecting to it, 1159 00:25:51,160 --> 00:25:52,080 there's a burst connect over 1160 00:25:52,080 --> 00:25:52,820 and listen for the connection, 1161 00:25:52,920 --> 00:25:53,160 et cetera, 1162 00:25:53,360 --> 00:25:54,040 bind sock, 1163 00:25:54,180 --> 00:25:54,420 you know, 1164 00:25:54,440 --> 00:25:55,280 all that same thing 1165 00:25:55,280 --> 00:25:56,260 and when it actually 1166 00:25:56,260 --> 00:25:56,820 has a connection, 1167 00:25:56,820 --> 00:25:58,000 it then starts a separate server 1168 00:25:58,000 --> 00:25:58,800 on the web server itself 1169 00:25:58,800 --> 00:26:00,000 and then redirects 1170 00:26:00,000 --> 00:26:00,660 the user's browser, 1171 00:26:00,800 --> 00:26:01,620 actually I think right now 1172 00:26:01,620 --> 00:26:02,500 it just gives you a link to it, 1173 00:26:02,540 --> 00:26:03,420 to a telnet URL 1174 00:26:03,420 --> 00:26:04,320 to the port itself. 1175 00:26:04,780 --> 00:26:05,840 So pretty much you just click 1176 00:26:05,840 --> 00:26:06,300 through the web interface 1177 00:26:06,300 --> 00:26:07,360 until it says got shell 1178 00:26:07,360 --> 00:26:08,120 and then you click that 1179 00:26:08,120 --> 00:26:08,740 and it pops up a little 1180 00:26:08,740 --> 00:26:09,460 X term with your shell 1181 00:26:09,880 --> 00:26:10,900 and it all goes through 1182 00:26:10,900 --> 00:26:11,540 the web server itself. 1183 00:26:11,780 --> 00:26:12,800 So you can have a single system 1184 00:26:12,800 --> 00:26:13,700 on whatever network 1185 00:26:13,700 --> 00:26:14,320 you're running on 1186 00:26:14,320 --> 00:26:15,800 that's running MSF web interface 1187 00:26:15,800 --> 00:26:17,000 and export every system 1188 00:26:17,000 --> 00:26:17,660 through that box. 1189 00:26:18,540 --> 00:26:19,440 So it's kind of nice, 1190 00:26:19,560 --> 00:26:20,660 it's kind of broke, 1191 00:26:20,820 --> 00:26:22,360 it could be written better, 1192 00:26:22,480 --> 00:26:23,360 it's probably a better way 1193 00:26:23,360 --> 00:26:23,660 to put it 1194 00:26:23,660 --> 00:26:25,080 but it's functional right now 1195 00:26:25,080 --> 00:26:26,060 and we don't recommend 1196 00:26:26,060 --> 00:26:26,520 people use it 1197 00:26:26,820 --> 00:26:27,300 in production environments 1198 00:26:27,300 --> 00:26:27,920 but it's a fun thing 1199 00:26:27,920 --> 00:26:28,340 to play with 1200 00:26:28,340 --> 00:26:29,240 and do demos for management 1201 00:26:29,240 --> 00:26:29,620 and what not. 1202 00:26:29,780 --> 00:26:30,540 And this is another 1203 00:26:30,540 --> 00:26:31,600 something you can attest 1204 00:26:31,600 --> 00:26:32,180 to the handler system. 1205 00:26:32,380 --> 00:26:34,100 I think writing MSF web 1206 00:26:34,100 --> 00:26:35,560 was the matter of changing 1207 00:26:35,560 --> 00:26:37,480 one backend method 1208 00:26:37,480 --> 00:26:38,160 to be able to do 1209 00:26:38,160 --> 00:26:39,120 the connection proxying 1210 00:26:39,120 --> 00:26:39,600 instead of actually 1211 00:26:39,600 --> 00:26:40,280 dropping into a shell. 1212 00:26:40,440 --> 00:26:42,160 So that's another cool thing 1213 00:26:42,160 --> 00:26:42,920 that the design. 1214 00:26:43,520 --> 00:26:46,060 The slide on the screen 1215 00:26:46,060 --> 00:26:46,440 right now 1216 00:26:46,440 --> 00:26:47,300 is actually showing 1217 00:26:47,300 --> 00:26:48,340 an XO encrypted shell 1218 00:26:48,340 --> 00:26:49,700 but the telnet connection 1219 00:26:49,700 --> 00:26:50,920 to the proxy server itself 1220 00:26:50,920 --> 00:26:51,940 is completely clear text. 1221 00:26:52,440 --> 00:26:53,220 So in other words 1222 00:26:53,220 --> 00:26:55,000 the MSF web server 1223 00:26:55,000 --> 00:26:56,620 handles the connection 1224 00:26:56,620 --> 00:26:56,800 between the web server 1225 00:26:56,820 --> 00:26:57,480 and whatever way it needs to 1226 00:26:57,480 --> 00:26:58,420 including actually encoding 1227 00:26:58,420 --> 00:26:59,320 the data as it goes back 1228 00:26:59,320 --> 00:27:00,080 and forth across the network 1229 00:27:00,080 --> 00:27:01,240 and the connection back 1230 00:27:01,240 --> 00:27:02,100 to the telnet server itself 1231 00:27:02,100 --> 00:27:02,960 is just like being a remote 1232 00:27:02,960 --> 00:27:03,760 console on the system. 1233 00:27:08,200 --> 00:27:09,320 So this is more of a 1234 00:27:09,320 --> 00:27:10,140 development tool. 1235 00:27:10,280 --> 00:27:10,940 I mean it's not more 1236 00:27:10,940 --> 00:27:11,440 of a development tool 1237 00:27:11,440 --> 00:27:12,160 it is a development tool. 1238 00:27:12,340 --> 00:27:13,360 So it's something that 1239 00:27:13,360 --> 00:27:14,240 just a user of Metasploit 1240 00:27:14,240 --> 00:27:15,320 probably isn't familiar with 1241 00:27:15,320 --> 00:27:15,920 and it's sort of 1242 00:27:15,920 --> 00:27:16,860 the one tool 1243 00:27:16,860 --> 00:27:17,980 that isn't really part 1244 00:27:17,980 --> 00:27:19,360 I mean it is part of the framework 1245 00:27:19,360 --> 00:27:20,620 but it isn't really part of 1246 00:27:20,620 --> 00:27:22,060 a normal user's 1247 00:27:22,060 --> 00:27:23,320 use of Metasploit. 1248 00:27:23,880 --> 00:27:24,660 What this is 1249 00:27:24,660 --> 00:27:25,600 is if anybody's ever 1250 00:27:25,600 --> 00:27:26,580 written exploits 1251 00:27:26,820 --> 00:27:26,940 in Windows 1252 00:27:26,940 --> 00:27:28,040 you know it's very important 1253 00:27:28,040 --> 00:27:28,800 to be able to find 1254 00:27:28,800 --> 00:27:30,100 code in DLLs 1255 00:27:30,100 --> 00:27:31,080 to return to 1256 00:27:31,080 --> 00:27:32,300 and then to return 1257 00:27:32,300 --> 00:27:32,980 into your code. 1258 00:27:33,240 --> 00:27:34,640 So this will scan 1259 00:27:34,640 --> 00:27:36,100 PE images offline 1260 00:27:36,100 --> 00:27:37,580 either DLL or executable 1261 00:27:37,580 --> 00:27:38,720 and it will find 1262 00:27:38,720 --> 00:27:40,220 arbitrary matches 1263 00:27:40,220 --> 00:27:41,460 you can do regular expressions 1264 00:27:41,460 --> 00:27:42,800 you can then take those 1265 00:27:42,800 --> 00:27:43,380 regular expressions 1266 00:27:43,380 --> 00:27:44,780 and pump them through 1267 00:27:44,780 --> 00:27:45,400 a disassembler 1268 00:27:45,400 --> 00:27:47,080 with one command line option 1269 00:27:47,080 --> 00:27:48,000 and then you can go through 1270 00:27:48,000 --> 00:27:49,420 and you know build things 1271 00:27:49,420 --> 00:27:50,140 looking for certain 1272 00:27:50,140 --> 00:27:51,620 instructions that you want 1273 00:27:51,620 --> 00:27:53,260 in the DLL space. 1274 00:27:53,660 --> 00:27:55,020 We use this a lot 1275 00:27:55,020 --> 00:27:56,040 and we find some very good 1276 00:27:56,040 --> 00:27:56,780 universal returns 1277 00:27:56,780 --> 00:27:56,800 in the DLL space 1278 00:27:56,820 --> 00:27:57,060 like return addresses 1279 00:27:57,060 --> 00:27:58,520 it's very easy to script 1280 00:27:58,520 --> 00:27:59,640 the output is pretty much 1281 00:27:59,640 --> 00:27:59,920 universal 1282 00:27:59,920 --> 00:28:01,000 it's very easy to parse 1283 00:28:01,700 --> 00:28:05,140 and one example of using it 1284 00:28:05,140 --> 00:28:06,940 this is for example 1285 00:28:06,940 --> 00:28:07,940 the server you exploit 1286 00:28:07,940 --> 00:28:09,180 there was something like 1287 00:28:09,180 --> 00:28:10,580 six different installers 1288 00:28:10,580 --> 00:28:11,420 from version like 1289 00:28:11,420 --> 00:28:12,660 three through five something 1290 00:28:13,280 --> 00:28:14,320 so we just took 1291 00:28:14,320 --> 00:28:15,140 all the installers 1292 00:28:15,140 --> 00:28:16,180 you can use cab extract 1293 00:28:16,180 --> 00:28:17,240 because the installers 1294 00:28:17,240 --> 00:28:18,100 are really just cab files 1295 00:28:18,100 --> 00:28:19,320 pull all the DLLs 1296 00:28:19,320 --> 00:28:19,660 out of them 1297 00:28:19,660 --> 00:28:20,980 ran an FPE scan 1298 00:28:20,980 --> 00:28:21,740 over all of them 1299 00:28:21,740 --> 00:28:22,740 got output for each one 1300 00:28:22,740 --> 00:28:23,740 then did correlation 1301 00:28:23,740 --> 00:28:25,180 and we had a universal 1302 00:28:25,180 --> 00:28:25,880 return address 1303 00:28:25,880 --> 00:28:26,800 in the DLL 1304 00:28:26,820 --> 00:28:27,460 in a matter of 1305 00:28:27,460 --> 00:28:28,080 a few minutes 1306 00:28:28,080 --> 00:28:29,360 and that actually ends up 1307 00:28:29,360 --> 00:28:30,180 working for every version 1308 00:28:30,180 --> 00:28:31,240 of server you 1309 00:28:31,240 --> 00:28:32,180 from NT 1310 00:28:32,180 --> 00:28:33,240 through to 2003 1311 00:28:33,720 --> 00:28:34,620 so you can see that 1312 00:28:34,620 --> 00:28:35,260 a tool like this 1313 00:28:35,260 --> 00:28:35,860 is very useful. 1314 00:28:36,540 --> 00:28:37,480 The nice thing about this 1315 00:28:37,480 --> 00:28:38,100 is that we never had to 1316 00:28:38,100 --> 00:28:38,980 boot Windows at all 1317 00:28:38,980 --> 00:28:40,040 in this process to do it 1318 00:28:40,040 --> 00:28:41,560 so something you'll notice 1319 00:28:41,560 --> 00:28:41,980 when you start using 1320 00:28:41,980 --> 00:28:42,380 the framework 1321 00:28:42,380 --> 00:28:43,300 is that none of the tools 1322 00:28:43,300 --> 00:28:43,960 that are included with it 1323 00:28:43,960 --> 00:28:44,740 really have to run Windows 1324 00:28:44,740 --> 00:28:45,320 in the first place 1325 00:28:45,320 --> 00:28:46,720 so we really don't really 1326 00:28:46,720 --> 00:28:47,500 want to have to run 1327 00:28:47,500 --> 00:28:48,220 Windows desktop 1328 00:28:48,220 --> 00:28:49,000 to do exploit dev 1329 00:28:49,000 --> 00:28:49,720 for Windows box 1330 00:28:49,720 --> 00:28:50,820 and that's really why 1331 00:28:50,820 --> 00:28:51,700 we've gone through 1332 00:28:51,700 --> 00:28:52,400 and written our own 1333 00:28:52,400 --> 00:28:53,040 SMB class 1334 00:28:56,820 --> 00:28:57,520 but got it. 1335 00:28:59,620 --> 00:29:00,420 So okay 1336 00:29:01,060 --> 00:29:01,880 and you know 1337 00:29:01,880 --> 00:29:02,340 things like our 1338 00:29:02,340 --> 00:29:02,840 decom exploit 1339 00:29:02,840 --> 00:29:03,960 where it's actually 1340 00:29:03,960 --> 00:29:04,540 one request 1341 00:29:04,540 --> 00:29:05,260 that exploits 1342 00:29:05,260 --> 00:29:05,580 three different 1343 00:29:05,580 --> 00:29:06,440 systems at once 1344 00:29:06,440 --> 00:29:07,000 are kind of nice 1345 00:29:07,000 --> 00:29:07,920 and we did that 1346 00:29:07,920 --> 00:29:08,280 with the help 1347 00:29:08,280 --> 00:29:08,940 of MSPEScan. 1348 00:29:11,140 --> 00:29:11,720 There's actually 1349 00:29:11,720 --> 00:29:12,140 a couple other 1350 00:29:12,140 --> 00:29:12,740 helpful utilities 1351 00:29:12,740 --> 00:29:13,120 that are included 1352 00:29:13,820 --> 00:29:15,060 besides just the user 1353 00:29:15,060 --> 00:29:15,360 interfaces 1354 00:29:15,360 --> 00:29:16,560 and MSPEScan 1355 00:29:16,560 --> 00:29:17,260 we included a couple 1356 00:29:17,260 --> 00:29:18,560 other nifty things 1357 00:29:18,560 --> 00:29:19,800 that we found useful 1358 00:29:19,800 --> 00:29:20,320 at one point 1359 00:29:20,320 --> 00:29:21,900 there's MSF DL debug 1360 00:29:21,900 --> 00:29:22,620 which is a tool 1361 00:29:22,620 --> 00:29:23,020 for downloading 1362 00:29:23,020 --> 00:29:23,740 debugging symbols 1363 00:29:23,740 --> 00:29:24,660 for any given file 1364 00:29:26,820 --> 00:29:27,180 from a system 1365 00:29:27,180 --> 00:29:27,920 you're trying to break into 1366 00:29:27,920 --> 00:29:28,940 and you're able to obtain 1367 00:29:28,940 --> 00:29:30,080 you know the DLL 1368 00:29:30,080 --> 00:29:31,020 from a similar system 1369 00:29:31,020 --> 00:29:31,460 or one running 1370 00:29:31,460 --> 00:29:32,520 whatever the service pack 1371 00:29:32,520 --> 00:29:33,140 or operating system 1372 00:29:33,140 --> 00:29:33,940 or version of that is 1373 00:29:33,940 --> 00:29:35,120 you can take that DLL 1374 00:29:35,120 --> 00:29:36,600 or an MSDL debug on it 1375 00:29:36,600 --> 00:29:37,120 and it'll actually download 1376 00:29:37,120 --> 00:29:38,440 the PDB files 1377 00:29:38,440 --> 00:29:39,320 directly from Microsoft 1378 00:29:39,320 --> 00:29:39,960 symbol server 1379 00:29:39,960 --> 00:29:40,860 and then you can just 1380 00:29:40,860 --> 00:29:41,580 do your own disassembly 1381 00:29:41,580 --> 00:29:42,520 and move the PDB files 1382 00:29:42,520 --> 00:29:42,800 themselves. 1383 00:29:43,300 --> 00:29:44,160 So it's a nice way 1384 00:29:44,160 --> 00:29:45,620 to be able to obtain 1385 00:29:45,620 --> 00:29:46,220 the symbol files 1386 00:29:46,220 --> 00:29:47,280 for any given executable 1387 00:29:47,280 --> 00:29:48,060 without having to load 1388 00:29:48,060 --> 00:29:48,560 a window bug 1389 00:29:48,560 --> 00:29:49,180 or anything like that 1390 00:29:49,180 --> 00:29:49,860 this is all done 1391 00:29:49,860 --> 00:29:50,680 in pure Perl 1392 00:29:50,680 --> 00:29:51,780 with a PD class parser 1393 00:29:51,780 --> 00:29:52,040 and whatnot. 1394 00:29:57,520 --> 00:29:58,200 You can actually 1395 00:29:58,200 --> 00:29:59,280 extract out of it 1396 00:29:59,280 --> 00:29:59,980 through MSF payload 1397 00:29:59,980 --> 00:30:01,420 so if you want to go back 1398 00:30:01,420 --> 00:30:02,000 to running an exploit 1399 00:30:02,000 --> 00:30:02,720 in C for whatever 1400 00:30:02,720 --> 00:30:03,180 odd reason 1401 00:30:03,180 --> 00:30:03,720 or you're running 1402 00:30:03,720 --> 00:30:04,260 something in Python 1403 00:30:04,260 --> 00:30:05,340 or you just don't like 1404 00:30:05,340 --> 00:30:05,940 the framework at all 1405 00:30:05,940 --> 00:30:06,500 and you think it's crap 1406 00:30:06,500 --> 00:30:07,640 you can actually use 1407 00:30:07,640 --> 00:30:08,220 MSF payload 1408 00:30:08,220 --> 00:30:09,120 to generate payloads 1409 00:30:09,120 --> 00:30:09,500 from it anyways. 1410 00:30:09,840 --> 00:30:10,700 So if you want to use 1411 00:30:10,700 --> 00:30:11,960 our Linux reverse connect shell 1412 00:30:11,960 --> 00:30:12,600 if you want to use 1413 00:30:12,600 --> 00:30:13,600 our 132 bind shell 1414 00:30:13,600 --> 00:30:14,380 you can just run 1415 00:30:14,380 --> 00:30:14,960 MSF payload 1416 00:30:14,960 --> 00:30:15,580 with the right options 1417 00:30:15,580 --> 00:30:16,140 it'll dump out 1418 00:30:16,140 --> 00:30:16,560 a nice pretty 1419 00:30:16,560 --> 00:30:17,520 you know C formatted 1420 00:30:17,520 --> 00:30:18,180 or Perl formatted 1421 00:30:18,180 --> 00:30:18,760 buffer for you. 1422 00:30:19,560 --> 00:30:20,680 If you want to do this 1423 00:30:20,680 --> 00:30:21,100 through the web 1424 00:30:26,820 --> 00:30:27,840 if you need to encode 1425 00:30:27,840 --> 00:30:28,160 the payload 1426 00:30:28,160 --> 00:30:29,060 to remove certain 1427 00:30:29,060 --> 00:30:29,660 character sets 1428 00:30:29,660 --> 00:30:30,360 like you can't have 1429 00:30:30,360 --> 00:30:31,060 a null in your payload 1430 00:30:31,060 --> 00:30:32,460 or you need to avoid 1431 00:30:32,460 --> 00:30:33,160 a certain you know 1432 00:30:33,160 --> 00:30:33,980 a slash character 1433 00:30:33,980 --> 00:30:35,200 to web exploit 1434 00:30:35,200 --> 00:30:35,600 or whatnot 1435 00:30:35,600 --> 00:30:36,560 you can run through 1436 00:30:36,560 --> 00:30:37,620 the MSF encoder system 1437 00:30:37,620 --> 00:30:38,540 which actually uses 1438 00:30:38,540 --> 00:30:39,400 all the different encoders 1439 00:30:39,400 --> 00:30:39,780 in the framework 1440 00:30:39,780 --> 00:30:40,300 to encode it 1441 00:30:40,300 --> 00:30:40,720 in whatever way 1442 00:30:40,720 --> 00:30:41,300 it'll possibly do. 1443 00:30:42,060 --> 00:30:42,900 You can specify 1444 00:30:42,900 --> 00:30:44,100 a specific encoder 1445 00:30:44,100 --> 00:30:44,600 if you want to 1446 00:30:44,600 --> 00:30:45,220 or it'll automatically 1447 00:30:45,220 --> 00:30:45,720 figure it out 1448 00:30:45,720 --> 00:30:46,640 based on the bad characters 1449 00:30:46,640 --> 00:30:47,180 and architecture 1450 00:30:47,180 --> 00:30:48,140 and OS you specify. 1451 00:30:48,980 --> 00:30:49,560 For instance 1452 00:30:49,560 --> 00:30:49,980 if you say 1453 00:30:49,980 --> 00:30:50,600 I want to avoid 1454 00:30:56,820 --> 00:30:57,020 in some way 1455 00:30:57,020 --> 00:30:57,880 to avoid that character 1456 00:30:57,880 --> 00:30:59,500 and as each one fails 1457 00:30:59,500 --> 00:31:00,200 it'll then fall through 1458 00:31:00,200 --> 00:31:00,740 to the next one 1459 00:31:00,740 --> 00:31:01,660 so it'll probably land 1460 00:31:01,660 --> 00:31:02,400 on alpha numeric 1461 00:31:02,400 --> 00:31:03,060 before it's finished 1462 00:31:03,060 --> 00:31:03,800 at which point 1463 00:31:03,800 --> 00:31:04,380 you'll have a payload 1464 00:31:04,380 --> 00:31:04,980 which is you know 1465 00:31:04,980 --> 00:31:05,580 twice the size 1466 00:31:05,580 --> 00:31:06,780 but it's all uppercase letters. 1467 00:31:08,380 --> 00:31:11,360 And the MSF payload 1468 00:31:11,360 --> 00:31:12,180 and MSF encode 1469 00:31:12,180 --> 00:31:12,480 actually 1470 00:31:12,480 --> 00:31:13,440 like MSF payload 1471 00:31:13,440 --> 00:31:14,140 won't actually do encoding 1472 00:31:14,140 --> 00:31:16,100 but msfpayload.cgi 1473 00:31:16,100 --> 00:31:16,880 is sort of a combination 1474 00:31:16,880 --> 00:31:17,940 of both MSF payload 1475 00:31:17,940 --> 00:31:18,780 and MSF encode 1476 00:31:18,780 --> 00:31:20,340 in a web version 1477 00:31:20,340 --> 00:31:21,020 so you can go in 1478 00:31:21,020 --> 00:31:21,860 and you can just pick 1479 00:31:21,860 --> 00:31:22,300 any payload 1480 00:31:22,300 --> 00:31:22,760 that we have 1481 00:31:22,760 --> 00:31:23,540 in Metasploit 1482 00:31:23,540 --> 00:31:24,140 it actually just works 1483 00:31:26,820 --> 00:31:28,200 like Linux find SOC code 1484 00:31:28,200 --> 00:31:29,440 or Linux bind 1485 00:31:29,440 --> 00:31:30,760 on port 4444 1486 00:31:30,760 --> 00:31:31,740 and it will build it 1487 00:31:31,740 --> 00:31:32,620 optionally encode it 1488 00:31:32,620 --> 00:31:33,240 you just put your 1489 00:31:33,240 --> 00:31:33,680 bad characters 1490 00:31:33,680 --> 00:31:33,960 right there 1491 00:31:33,960 --> 00:31:34,420 in the web interface 1492 00:31:34,420 --> 00:31:35,380 you get a nice little 1493 00:31:36,240 --> 00:31:37,760 blob ready to put in C code 1494 00:31:37,760 --> 00:31:38,960 a car shell code 1495 00:31:38,960 --> 00:31:40,140 so for some reason 1496 00:31:40,140 --> 00:31:40,920 you do have to be writing 1497 00:31:40,920 --> 00:31:41,380 exploits 1498 00:31:41,380 --> 00:31:41,980 not in Metasploit 1499 00:31:41,980 --> 00:31:42,700 for whatever reason 1500 00:31:42,700 --> 00:31:43,860 you can go through here 1501 00:31:43,860 --> 00:31:44,680 and still have advantage 1502 00:31:44,680 --> 00:31:45,940 of using some of the 1503 00:31:45,940 --> 00:31:46,380 payload work 1504 00:31:46,380 --> 00:31:46,860 that we have 1505 00:31:46,860 --> 00:31:48,340 unique to Metasploit. 1506 00:31:49,140 --> 00:31:49,820 Do you want to talk 1507 00:31:49,820 --> 00:31:50,380 about MSF updates? 1508 00:31:50,580 --> 00:31:50,820 Oh sure 1509 00:31:50,820 --> 00:31:52,020 as of version 2.2 1510 00:31:52,020 --> 00:31:52,380 you can actually 1511 00:31:52,380 --> 00:31:53,060 automatically update 1512 00:31:56,820 --> 00:31:57,220 your way to actually 1513 00:31:57,220 --> 00:31:58,280 getting the latest exploits 1514 00:31:58,280 --> 00:31:58,720 and what not too 1515 00:31:58,720 --> 00:32:00,240 so if you go through 1516 00:32:00,240 --> 00:32:00,940 you're welcome to go through 1517 00:32:00,940 --> 00:32:01,440 and look at the code 1518 00:32:01,440 --> 00:32:02,140 and verify things 1519 00:32:02,140 --> 00:32:02,880 before you install it 1520 00:32:02,880 --> 00:32:03,280 etc etc 1521 00:32:03,280 --> 00:32:04,300 but essentially 1522 00:32:04,300 --> 00:32:04,920 it will do it 1523 00:32:04,920 --> 00:32:05,700 you know md5 summon 1524 00:32:05,700 --> 00:32:06,160 all the files 1525 00:32:06,160 --> 00:32:06,640 to play against 1526 00:32:06,640 --> 00:32:07,300 your remote version 1527 00:32:07,300 --> 00:32:08,240 download any new files 1528 00:32:08,240 --> 00:32:08,600 that you want 1529 00:32:08,600 --> 00:32:10,040 and then it does it all 1530 00:32:10,040 --> 00:32:10,580 through you know 1531 00:32:10,580 --> 00:32:11,800 our own custom CA cert 1532 00:32:11,800 --> 00:32:12,840 we actually define 1533 00:32:12,840 --> 00:32:14,020 the OpenSL search directory 1534 00:32:14,020 --> 00:32:15,060 and do just about 1535 00:32:15,060 --> 00:32:15,980 everything we possibly can 1536 00:32:15,980 --> 00:32:16,620 and pull the verify 1537 00:32:16,620 --> 00:32:17,620 it's really the right system 1538 00:32:17,620 --> 00:32:18,160 through SSL 1539 00:32:18,520 --> 00:32:19,360 but you know 1540 00:32:20,120 --> 00:32:20,960 use it at your own risk 1541 00:32:20,960 --> 00:32:21,300 as always 1542 00:32:26,820 --> 00:32:26,940 so that 1543 00:32:27,640 --> 00:32:28,680 the Metasploit project 1544 00:32:28,680 --> 00:32:29,480 would be a 1545 00:32:29,480 --> 00:32:30,520 stable exploit development 1546 00:32:30,520 --> 00:32:31,000 platform 1547 00:32:31,900 --> 00:32:32,720 we've been working on it 1548 00:32:32,720 --> 00:32:33,060 for a year 1549 00:32:33,060 --> 00:32:34,360 and a lot of other people 1550 00:32:34,360 --> 00:32:36,340 in the end of our work 1551 00:32:36,340 --> 00:32:37,040 have been coming in 1552 00:32:37,040 --> 00:32:38,180 and we've been sort of 1553 00:32:38,180 --> 00:32:38,780 dragging people in 1554 00:32:38,780 --> 00:32:39,080 and being like 1555 00:32:39,080 --> 00:32:39,560 hey you know 1556 00:32:39,560 --> 00:32:39,980 try to write 1557 00:32:40,520 --> 00:32:41,240 your exploit 1558 00:32:41,240 --> 00:32:42,020 in Metasploit 1559 00:32:42,020 --> 00:32:42,480 and they'll come back 1560 00:32:42,480 --> 00:32:42,700 and be like 1561 00:32:42,700 --> 00:32:43,240 yeah it was great 1562 00:32:43,240 --> 00:32:43,540 you know what I mean 1563 00:32:43,540 --> 00:32:45,400 so we've had a lot of work 1564 00:32:45,400 --> 00:32:47,040 and it's now a very stable 1565 00:32:47,040 --> 00:32:48,020 exploit development platform 1566 00:32:48,420 --> 00:32:49,260 it's designed to use 1567 00:32:49,260 --> 00:32:49,920 with pen tests 1568 00:32:50,800 --> 00:32:51,720 admins can use it 1569 00:32:51,720 --> 00:32:52,480 to verify scan results 1570 00:32:53,020 --> 00:32:53,980 and another thing is 1571 00:32:53,980 --> 00:32:55,100 we're focused on technology 1572 00:32:56,820 --> 00:32:58,540 we don't have customers per se 1573 00:32:58,540 --> 00:32:59,700 so we're not worried about 1574 00:32:59,700 --> 00:33:00,080 you know 1575 00:33:00,080 --> 00:33:00,920 getting the latest 1576 00:33:00,920 --> 00:33:01,600 and greatest exploit 1577 00:33:01,600 --> 00:33:02,560 we're not worried about 1578 00:33:02,560 --> 00:33:03,140 you know 1579 00:33:03,140 --> 00:33:03,700 this and that 1580 00:33:03,700 --> 00:33:04,700 we're not worried about 1581 00:33:04,700 --> 00:33:05,000 you know 1582 00:33:05,000 --> 00:33:06,280 making a great GUI 1583 00:33:06,280 --> 00:33:07,060 that's not our main goal 1584 00:33:07,060 --> 00:33:07,860 right now we're working on 1585 00:33:07,860 --> 00:33:08,880 just building a really good foundation 1586 00:33:08,880 --> 00:33:09,900 a lot of really good 1587 00:33:09,900 --> 00:33:10,540 back end technology 1588 00:33:11,060 --> 00:33:11,740 and you know 1589 00:33:11,740 --> 00:33:12,780 if it means 1590 00:33:12,780 --> 00:33:13,920 working on something 1591 00:33:14,540 --> 00:33:15,620 that we think is more important 1592 00:33:15,620 --> 00:33:16,440 than working on the newest 1593 00:33:16,440 --> 00:33:17,420 greatest exploit 1594 00:33:17,420 --> 00:33:17,820 you know 1595 00:33:17,820 --> 00:33:18,440 that was just advised 1596 00:33:18,440 --> 00:33:19,900 there was just an advisory for 1597 00:33:19,900 --> 00:33:21,140 then we'll probably do that 1598 00:33:21,540 --> 00:33:22,480 and as of right now 1599 00:33:22,480 --> 00:33:23,480 we have 17 dollars 1600 00:33:23,480 --> 00:33:24,080 of donations 1601 00:33:26,820 --> 00:33:27,380 we're already happy with it 1602 00:33:27,380 --> 00:33:27,840 so you know 1603 00:33:27,840 --> 00:33:28,300 that's it 1604 00:33:29,860 --> 00:33:30,760 we have two dollars 1605 00:33:30,760 --> 00:33:31,580 of donations left 1606 00:33:31,580 --> 00:33:31,860 so 1607 00:33:33,060 --> 00:33:33,900 there's been a lot of people 1608 00:33:33,900 --> 00:33:34,360 working on this 1609 00:33:34,360 --> 00:33:35,500 for about a year 1610 00:33:35,500 --> 00:33:36,560 so if you 1611 00:33:36,560 --> 00:33:37,420 if you use it 1612 00:33:37,420 --> 00:33:38,240 or if your company uses it 1613 00:33:38,240 --> 00:33:39,220 feel free to donate 1614 00:33:39,220 --> 00:33:40,140 we have a link on our website 1615 00:33:40,140 --> 00:33:41,240 now it goes straight into 1616 00:33:41,240 --> 00:33:41,620 you know 1617 00:33:41,620 --> 00:33:42,560 buying another spark station 1618 00:33:42,560 --> 00:33:43,260 do solaris dev 1619 00:33:43,260 --> 00:33:44,460 or your platform of choice 1620 00:33:44,460 --> 00:33:45,160 if you specify it 1621 00:33:45,160 --> 00:33:45,480 in the email 1622 00:33:45,960 --> 00:33:46,320 so 1623 00:33:50,620 --> 00:33:50,980 alright 1624 00:33:50,980 --> 00:33:51,920 so the next section 1625 00:33:51,920 --> 00:33:52,760 is exploit technology 1626 00:33:52,760 --> 00:33:54,120 and we have a giant ninja on it 1627 00:33:54,120 --> 00:33:54,660 so 1628 00:33:54,660 --> 00:33:54,680 what's up 1629 00:33:54,680 --> 00:33:55,080 what's up 1630 00:33:56,740 --> 00:33:57,140 yeah 1631 00:33:57,140 --> 00:33:57,920 it's kind of squished 1632 00:33:57,920 --> 00:33:58,740 but it's supposed to be ninja 1633 00:33:59,600 --> 00:34:00,000 monkey ninja 1634 00:34:00,000 --> 00:34:00,200 monkey ninja 1635 00:34:00,200 --> 00:34:00,580 got it 1636 00:34:03,500 --> 00:34:04,300 so mostly 1637 00:34:04,300 --> 00:34:05,840 the interesting part of the framework 1638 00:34:05,840 --> 00:34:07,260 that I'm sure everyone's probably heard something about 1639 00:34:07,260 --> 00:34:08,480 is the remote DLL injection 1640 00:34:09,240 --> 00:34:10,500 this is nice and evil 1641 00:34:10,500 --> 00:34:12,180 because it drops the DLL 1642 00:34:12,180 --> 00:34:13,820 into the exploited process 1643 00:34:13,820 --> 00:34:14,720 as a new thread 1644 00:34:14,720 --> 00:34:16,280 it never touches the hard drive 1645 00:34:16,280 --> 00:34:17,480 and if you look at the process list 1646 00:34:17,480 --> 00:34:18,480 you're not going to see anything at all 1647 00:34:19,600 --> 00:34:20,820 antivirus people hate us for this 1648 00:34:20,820 --> 00:34:21,820 because they can't do 1649 00:34:21,820 --> 00:34:22,560 any scanning of it 1650 00:34:22,560 --> 00:34:22,980 because it's 1651 00:34:22,980 --> 00:34:23,940 they scan on access 1652 00:34:23,940 --> 00:34:25,060 and since there is no 1653 00:34:25,080 --> 00:34:27,220 no access to the file itself, they don't see anything at all. 1654 00:34:27,540 --> 00:34:29,080 And my phone is really annoying, sorry. 1655 00:34:31,120 --> 00:34:31,440 Oh. 1656 00:34:31,760 --> 00:34:32,080 Okay. 1657 00:34:33,840 --> 00:34:37,860 I guess that doesn't like FossilDisk, it was actually written by Jarko and Matt Miller, 1658 00:34:38,100 --> 00:34:41,140 and Matt Miller is probably similar to this crowd, so if you see him at the Anomaly table, 1659 00:34:41,300 --> 00:34:44,520 you know, say, you know, hey, your code rocks, because it really does. 1660 00:34:44,900 --> 00:34:45,220 There he is! 1661 00:34:45,220 --> 00:34:45,560 There he is! 1662 00:34:45,580 --> 00:34:46,060 Got him, okay. 1663 00:34:48,840 --> 00:34:51,840 The nice thing about running DLL payloads, you've got full access to the Windows API 1664 00:34:52,320 --> 00:34:53,460 inside the exploited process. 1665 00:34:53,460 --> 00:34:57,400 One of the big things that Dave Itell and some of the Core ST guys were talking about 1666 00:34:57,400 --> 00:35:01,420 with the Cisco Foxing Code is that when you exploit a process in the Windows, if you just 1667 00:35:01,420 --> 00:35:03,900 work a command shell, you're throwing away half your privileges. 1668 00:35:04,280 --> 00:35:07,840 A lot of times if you exploit something like a web server or an FTP server for another 1669 00:35:07,840 --> 00:35:11,300 process, that process actually has access to a lot more resources than you would have 1670 00:35:11,300 --> 00:35:12,880 if you just executed a command shell itself. 1671 00:35:13,240 --> 00:35:17,680 In other words, it probably has access to another, an impersonation thread, excuse me, 1672 00:35:17,700 --> 00:35:21,940 an impersonation token in one of its threads inside the primary token itself, inside the 1673 00:35:21,940 --> 00:35:23,360 primary token of the process itself. 1674 00:35:23,360 --> 00:35:27,680 And with that token, you could probably gain system access or access to one of the network 1675 00:35:27,680 --> 00:35:28,420 users in the system. 1676 00:35:28,780 --> 00:35:32,060 And if you just execute a command shell like everyone's doing in the exploits like DCOM 1677 00:35:32,060 --> 00:35:34,240 and whatnot, you're losing whatever privileges you have there. 1678 00:35:34,760 --> 00:35:38,480 So by running a DLL which takes advantage of those privileges by scanning all processes, 1679 00:35:38,620 --> 00:35:42,140 by iterating through all processes, trying to open them up and grab the primary tokens, 1680 00:35:42,360 --> 00:35:45,320 and then taking over those tokens, you can actually do a lot more evil things on the 1681 00:35:45,320 --> 00:35:47,480 Windows platform by using DLL injection instead. 1682 00:35:48,060 --> 00:35:51,520 And you can easily convert any code that's written in C or C++ to a payload. 1683 00:35:51,760 --> 00:35:53,340 We've actually done DLL development. 1684 00:35:53,360 --> 00:35:57,000 We've done DLL development from X-Ming W on a Linux box and then used those payloads 1685 00:35:57,000 --> 00:35:59,360 directly on a Windows server as the RDRL payloads. 1686 00:35:59,760 --> 00:36:02,400 And you can definitely read as existing code like the next slide's going to show you. 1687 00:36:03,140 --> 00:36:06,620 And one important thing about the full access to the Windows API is instead of having to 1688 00:36:06,620 --> 00:36:09,720 re-implement a lot of stuff in shellcode or just in shellcode generally when you're 1689 00:36:09,720 --> 00:36:14,780 trying to access the Windows API, it isn't necessarily the most nice thing to do. 1690 00:36:14,840 --> 00:36:15,880 It's sort of a pain to write. 1691 00:36:16,080 --> 00:36:17,900 So we have access to the full Windows API. 1692 00:36:18,100 --> 00:36:21,640 So for example, Crypto, we can just open one of the Windows Crypto libraries, download 1693 00:36:21,640 --> 00:36:22,680 a file from the web. 1694 00:36:23,360 --> 00:36:23,900 There's a library for that. 1695 00:36:24,400 --> 00:36:24,800 SSL. 1696 00:36:25,060 --> 00:36:26,600 I mean, Windows has libraries for a lot of things. 1697 00:36:26,740 --> 00:36:28,520 So by writing your code as a visual... 1698 00:36:29,460 --> 00:36:34,180 Writing your code as a DLL, you can literally write your code right in Visual Studio, compile 1699 00:36:34,180 --> 00:36:35,680 it down to a DLL and shove it across the network. 1700 00:36:35,760 --> 00:36:38,760 So you have access to anything you would as if you were writing applications on the Windows 1701 00:36:38,760 --> 00:36:40,160 platform just as an executable. 1702 00:36:43,520 --> 00:36:49,740 So one of the coolest things we've actually done using this DLL injection technology is 1703 00:36:49,740 --> 00:36:51,440 the Windows VNC server inject. 1704 00:36:52,220 --> 00:36:53,020 It injects... 1705 00:36:53,020 --> 00:36:54,620 The VNC server is a new thread. 1706 00:36:55,220 --> 00:36:56,760 It uses the existing payload connection. 1707 00:36:56,980 --> 00:36:58,420 It doesn't require a new connection. 1708 00:36:58,520 --> 00:36:59,220 It doesn't listen on a port. 1709 00:36:59,880 --> 00:37:01,500 It's based on the real VNC source code. 1710 00:37:01,600 --> 00:37:02,760 This was actually a really fast process. 1711 00:37:02,920 --> 00:37:05,800 They went out, grabbed the real VNC source code, hacked on it a little bit. 1712 00:37:05,920 --> 00:37:07,660 I mean, it was compiling down to a DLL very quickly. 1713 00:37:08,360 --> 00:37:11,940 It's a little slow right now because of the way the hooking has to be done since the DLL 1714 00:37:11,940 --> 00:37:12,540 isn't on disk. 1715 00:37:13,580 --> 00:37:15,960 But it's very functional, as you'll see in a few minutes. 1716 00:37:16,260 --> 00:37:17,480 And it was a pretty quick process. 1717 00:37:17,600 --> 00:37:18,320 They did some hacks. 1718 00:37:18,620 --> 00:37:23,000 For example, they hijacked locked workstations and hijacked workstations that weren't on 1719 00:37:23,000 --> 00:37:23,620 disk that aren't logged in. 1720 00:37:24,480 --> 00:37:26,600 This was adapted by Scape and HD. 1721 00:37:27,460 --> 00:37:29,100 As I said, it breaks locked desktops. 1722 00:37:29,340 --> 00:37:32,400 And I mean, it's pretty cool that you can just go out and grab an open source project 1723 00:37:32,400 --> 00:37:35,540 and, you know, back on all of this work and make a totally rad payload. 1724 00:37:35,800 --> 00:37:37,320 And we're not installing VNC. 1725 00:37:37,460 --> 00:37:37,720 You know what I mean? 1726 00:37:37,820 --> 00:37:38,060 We're not. 1727 00:37:38,120 --> 00:37:38,460 We're actually... 1728 00:37:38,460 --> 00:37:39,740 It's completely never touching disk. 1729 00:37:39,920 --> 00:37:40,740 It's never leaving memory. 1730 00:37:40,920 --> 00:37:42,720 And it's just in the process that we're exploiting. 1731 00:37:42,780 --> 00:37:44,420 Not creating any new process or anything. 1732 00:37:45,420 --> 00:37:46,100 Any questions? 1733 00:37:46,280 --> 00:37:46,540 Sorry. 1734 00:37:48,640 --> 00:37:49,020 . 1735 00:37:49,020 --> 00:37:49,700 . 1736 00:37:50,080 --> 00:37:50,460 . 1737 00:37:50,460 --> 00:37:50,580 . 1738 00:37:50,580 --> 00:37:50,840 . 1739 00:37:50,840 --> 00:37:50,900 . 1740 00:37:50,900 --> 00:37:51,100 . 1741 00:37:55,060 --> 00:37:55,460 . 1742 00:37:56,560 --> 00:37:56,960 . 1743 00:37:56,960 --> 00:37:57,740 Well, the thing that... 1744 00:37:57,740 --> 00:37:58,300 Say one development. 1745 00:37:58,440 --> 00:38:02,500 The thing is, we actually had some concerns when the people who wrote it originally wanted 1746 00:38:02,500 --> 00:38:06,820 to release it, especially because, from an antiviracy perspective, it's very hard without 1747 00:38:06,820 --> 00:38:09,300 actually being inside of the process which antiviruses aren't. 1748 00:38:09,440 --> 00:38:13,900 So because it's not doing a lot of the normal things and loading a library, it can actually 1749 00:38:13,900 --> 00:38:15,720 circumvent a lot antivirus techniques. 1750 00:38:16,100 --> 00:38:19,780 But the thing is, right now, it's integrated in MetaSplit and it's actually a 3 stage 1751 00:38:19,780 --> 00:38:20,080 process. 1752 00:38:20,280 --> 00:38:22,580 We have a stager, we have the VNC Loader, and we have the VNC DLL. 1753 00:38:23,000 --> 00:38:25,340 The VNC DOL is like, you know, 400K. 1754 00:38:25,620 --> 00:38:27,720 There's a lot of kludgy architecture that comes along with it. 1755 00:38:27,800 --> 00:38:32,160 And it's all written in Perl, and it's not really something that you're going to be able to take 1756 00:38:32,160 --> 00:38:34,580 and stick in a worm, really, at all. 1757 00:38:34,920 --> 00:38:36,080 We're not too worried about that. 1758 00:38:36,160 --> 00:38:38,020 We've thought a lot about it before we released the technology. 1759 00:38:40,140 --> 00:38:45,880 And, yeah, I mean, you could, I guess, in theory, but I don't expect to see it anytime soon. 1760 00:38:46,080 --> 00:38:49,660 And there's not really any point you don't need that much technology for a worm. 1761 00:38:49,680 --> 00:38:51,260 It's really just overhead. 1762 00:38:51,260 --> 00:38:56,540 I mean, they have usually a small, specific task that they can just write and do anyway. 1763 00:38:56,760 --> 00:39:00,640 If you look at things like the slammer worm and whatnot, I mean, it was like 400 bytes or so 1764 00:39:00,640 --> 00:39:04,180 that was just in memory, never charged to disk, and had the same issue, which is a lot smaller. 1765 00:39:04,800 --> 00:39:07,780 If someone who's a really, really bad virus writer wanted to write a worm 1766 00:39:07,780 --> 00:39:10,060 and they couldn't fit it into, you know, a couple thousand bytes, 1767 00:39:10,320 --> 00:39:12,300 they might do something like DOL injection to do it. 1768 00:39:12,380 --> 00:39:15,280 But it's really just a statement that they can't write the code small enough. 1769 00:39:16,580 --> 00:39:17,920 I'm sorry, did you have a question as well? 1770 00:39:19,780 --> 00:39:20,520 Okay, sorry. 1771 00:39:20,840 --> 00:39:21,200 Yeah. 1772 00:39:22,640 --> 00:39:24,760 I pretty much repeated the question by answering it. 1773 00:39:24,820 --> 00:39:30,660 He asked if we thought about using the DOL injection for worm development. 1774 00:39:32,680 --> 00:39:35,420 So, we'll go ahead and show a VNC demo. 1775 00:39:36,280 --> 00:39:39,860 Right now, on the screen, you see the Mac. 1776 00:39:40,300 --> 00:39:45,120 We're actually going to own Windows Box through the LSASS bug from the Mac. 1777 00:39:45,240 --> 00:39:49,080 It's going to own it, create a reverse connection. 1778 00:39:49,940 --> 00:39:51,240 On that connection, we're going to set up a worm. 1779 00:39:51,240 --> 00:39:54,100 We're going to send the VNC injection code, and then the DOL. 1780 00:39:55,100 --> 00:39:58,740 And then we're going to set up a local proxy on our side. 1781 00:39:58,900 --> 00:40:01,460 So, then we're just going to connect a local host for a VNC client, 1782 00:40:01,620 --> 00:40:04,580 and we'll have VNC access remotely to the machine that we just owned. 1783 00:40:04,700 --> 00:40:05,880 So, we'll go ahead and demo that now. 1784 00:40:06,640 --> 00:40:09,420 And watch the desktop that the VNC server gets installed on. 1785 00:40:09,480 --> 00:40:10,620 Notice no one's logged into it. 1786 00:40:10,720 --> 00:40:14,400 And it's really funny to see what happens to this desktop after you hit it with the VNC server. 1787 00:40:14,860 --> 00:40:18,020 Anyone walking up the console might be a little bit confused, but just wait. 1788 00:40:44,640 --> 00:40:51,220 So, we're just going to go ahead and start MSF console here, and set up, on there, navigate, well, or narrow it down. 1789 00:40:51,240 --> 00:40:52,480 Right, well, HD navigates. 1790 00:40:52,560 --> 00:40:58,160 So, you can just go ahead and restart MSF console, which is, again, what I was saying, the preferred interface. 1791 00:40:58,340 --> 00:41:03,760 You can see this is the Metasport running on this side, and that's the machine that's about to get owned on the left side. 1792 00:41:04,720 --> 00:41:07,020 So, we're spreading the console interface. 1793 00:41:08,060 --> 00:41:12,720 Then we'll just go ahead and use export when we use LSASS, for example. 1794 00:41:15,440 --> 00:41:19,260 So, enable Python's as well, but we have Python support enabled right now. 1795 00:41:19,280 --> 00:41:21,100 It's enabled by default, so it's a little bit slower. 1796 00:41:21,560 --> 00:41:23,020 So, I'm going to just do, like, a show options. 1797 00:41:23,540 --> 00:41:26,300 Show options will show the options. 1798 00:41:26,340 --> 00:41:30,560 Right now, everything is saved, and we had options already set up. 1799 00:41:31,460 --> 00:41:36,560 And because of the environment, you can save the environment to disk, and it'll automatically fill the options back in. 1800 00:41:36,660 --> 00:41:38,100 You can save from show options. 1801 00:41:40,120 --> 00:41:45,140 You'll see all the options that are available, both of the exploit, and then when you set a payload, the payload has its own set of options. 1802 00:41:45,480 --> 00:41:47,760 So, for example, on the top, you have the exploit options. 1803 00:41:47,920 --> 00:41:51,020 And on the bottom, you have the options, which are specific to the VNC. 1804 00:41:51,240 --> 00:41:52,240 And on the bottom, you have the injection code. 1805 00:42:05,560 --> 00:42:08,480 There's a bit of debugging set, so we're turning it off, so it's a little nicer output. 1806 00:42:11,260 --> 00:42:14,180 So, then you can see these are the options set up, ready to go. 1807 00:42:14,560 --> 00:42:18,080 We have remote host set up, remote port that we're attacking. 1808 00:42:18,400 --> 00:42:19,480 Those are the top options. 1809 00:42:19,600 --> 00:42:21,040 And then the bottom options we have. 1810 00:42:21,240 --> 00:42:29,420 The payload information, the IP address that they're going to connect back to, the port we're going to set up the VNC listener on our side on, 1811 00:42:30,280 --> 00:42:35,920 the reload port they're going to connect back on to the VNC connection, and then the location of the VNC DLL. 1812 00:42:37,280 --> 00:42:41,400 So, we're also going to show targets, and you can see that the target list, zero is automatic. 1813 00:42:41,440 --> 00:42:47,340 It will automatically detect the OS OSS and exploit based on the response from the SMB transaction. 1814 00:42:47,900 --> 00:42:50,700 Otherwise, you can manually go in and set Ether 2000 XP. 1815 00:42:51,240 --> 00:42:52,620 So, it should hopefully work automatically. 1816 00:42:53,180 --> 00:42:53,320 Thank you. 1817 00:42:54,860 --> 00:42:55,440 I will. 1818 00:43:01,320 --> 00:43:01,800 Yep. 1819 00:43:08,080 --> 00:43:08,560 Yep. 1820 00:43:12,240 --> 00:43:12,720 Okay. 1821 00:43:15,560 --> 00:43:20,800 So, we owned, we got the connection back, we sent the DLL, and we sent the DLL later. 1822 00:43:21,240 --> 00:43:23,680 We sent the DLL, everything worked. 1823 00:43:33,040 --> 00:43:33,920 New session here. 1824 00:43:34,920 --> 00:43:36,080 So, just local host. 1825 00:43:39,540 --> 00:43:40,080 Ta-da! 1826 00:43:44,220 --> 00:43:47,280 So, move the command around so we can see the log box behind it. 1827 00:43:48,320 --> 00:43:51,220 So, another cool thing is, it will actually hijack whoever's network. 1828 00:43:52,400 --> 00:43:57,040 So, if you have a non-privileged user log in, for example, Bob, but you own the box in 1829 00:43:57,040 --> 00:43:58,780 system, you don't want to lose your system privileges. 1830 00:43:59,040 --> 00:44:01,680 So, we open a command window at the top that runs in system. 1831 00:44:01,820 --> 00:44:04,760 So, even if you're hijacking Bob's desktop, you still have access to the system because 1832 00:44:04,760 --> 00:44:05,980 we pop up a system command box. 1833 00:44:06,320 --> 00:44:07,960 We just go ahead, open the Explorer. 1834 00:44:08,320 --> 00:44:12,740 We can configure the server if we want, but I think we'll skip that for demonstration purposes. 1835 00:44:13,540 --> 00:44:17,240 Of course, he's doing this from the Mac, as you can see here, and you can see the actual 1836 00:44:18,020 --> 00:44:18,840 VM over there. 1837 00:44:19,120 --> 00:44:20,960 So, that's it. 1838 00:44:20,960 --> 00:44:21,880 This is a demo of the VNC stuff. 1839 00:44:22,000 --> 00:44:22,880 This is all in memory. 1840 00:44:24,280 --> 00:44:25,600 Nothing got wrote to this. 1841 00:44:25,640 --> 00:44:28,600 The DLL is nowhere except inside of LSASS right now. 1842 00:44:28,860 --> 00:44:31,720 If you do a task list or anything, there's no new processes. 1843 00:44:31,920 --> 00:44:32,660 It's just LSASS. 1844 00:44:34,020 --> 00:44:38,640 And then, if you apply some other techniques with DLL stuff, like anti-debugging or anti-paging, 1845 00:44:38,840 --> 00:44:40,780 this is really a forensics nightmare. 1846 00:44:43,500 --> 00:44:46,980 Anyone walking to the console in the system is going to see a desktop on the box that's 1847 00:44:46,980 --> 00:44:47,540 not logged in. 1848 00:44:47,760 --> 00:44:50,500 In the case that they actually do hit Control-Alt-Delete, it still works. 1849 00:44:51,080 --> 00:44:54,320 They can actually log into the box, if they want to, and get their own desktop. 1850 00:44:54,520 --> 00:44:57,260 And then, when they switch back and log back off, they end up back on the desktop of the 1851 00:44:57,260 --> 00:44:57,700 system again. 1852 00:44:58,760 --> 00:45:03,580 So, the thing is, if you actually log off from this desktop, Windows doesn't like it 1853 00:45:03,580 --> 00:45:03,960 very much. 1854 00:45:04,360 --> 00:45:05,420 It doesn't really know what to do. 1855 00:45:05,540 --> 00:45:08,940 You've got a mouse and all kinds of random weird flickering windows, but it doesn't really 1856 00:45:08,940 --> 00:45:09,660 know what to do with them. 1857 00:45:09,800 --> 00:45:12,480 So, if you're ever bored, it's a fun thing to play with. 1858 00:45:13,120 --> 00:45:16,340 In the sense that we're doing DLL stuff, we have a lot of access to the Windows API. 1859 00:45:16,580 --> 00:45:19,700 We were thinking about some other techniques, for example, like disabling the video driver 1860 00:45:19,700 --> 00:45:20,780 when we're actually on the hardware. 1861 00:45:20,920 --> 00:45:25,040 So, you know, your screen sort of goes into power saving mode while we're out there VNC-ing 1862 00:45:25,040 --> 00:45:26,500 in, and then we can enable it as we leave. 1863 00:45:27,700 --> 00:45:30,480 Something that I found while I was talking about it is, if you take a screenshot of 1864 00:45:30,480 --> 00:45:35,940 the desktop before we install the shell on it, by using the VNC's display capture, then 1865 00:45:35,940 --> 00:45:39,280 forcing that to be the display of the system that we're attacking, while we're actually 1866 00:45:39,280 --> 00:45:40,000 doing our own thing. 1867 00:45:40,160 --> 00:45:43,100 So, they never notice the desktop's doing anything whatsoever, but we're still in the 1868 00:45:43,100 --> 00:45:45,600 process of trying to figure out what we need to actually implement that, and, you know, 1869 00:45:45,660 --> 00:45:46,900 it's Windows API, it's ugly, so. 1870 00:45:47,840 --> 00:45:49,680 And besides just flashy demos and stuff like that. 1871 00:45:49,700 --> 00:45:51,400 This is actually useful on a lot of different levels. 1872 00:45:51,640 --> 00:45:54,420 For example, hijacking the desktop can be very, very valuable. 1873 00:45:54,600 --> 00:45:58,020 For example, I mean, getting system isn't always what you want. 1874 00:45:58,140 --> 00:46:01,460 For example, if someone's logged in with domain credentials, owning system isn't going to 1875 00:46:01,460 --> 00:46:02,260 give you those domain credentials. 1876 00:46:02,420 --> 00:46:06,660 It could lead to that by, you know, doing some stuff and hijacking a login session or 1877 00:46:06,660 --> 00:46:06,780 something. 1878 00:46:06,880 --> 00:46:09,020 But with this, you can just actually get the user that was logged in. 1879 00:46:09,080 --> 00:46:12,540 For example, you know, a banking scenario where you have a client who may be logged 1880 00:46:12,540 --> 00:46:16,620 in to a domain, and they're sitting there with a thick app, you know, a custom written 1881 00:46:16,620 --> 00:46:17,880 app that they use for transactions. 1882 00:46:17,880 --> 00:46:20,900 You can just own it and get there, and now you have the software, you have everything, 1883 00:46:21,140 --> 00:46:24,420 and you can just VNC to re-own the mode and watch it for a couple days, you know, and 1884 00:46:24,420 --> 00:46:28,160 then see what they do, collect information, and you can come back and have access to a 1885 00:46:28,160 --> 00:46:30,440 lot of those things that getting a system prop just doesn't do. 1886 00:46:30,620 --> 00:46:34,740 So, I mean, besides just flashy demos, this has a ton of very, very practical, cool uses 1887 00:46:34,740 --> 00:46:38,640 for pen tests and, you know, that sort of purposes. 1888 00:46:40,140 --> 00:46:41,620 Anybody have any questions on this sort of stuff? 1889 00:46:42,660 --> 00:46:42,980 Yep? 1890 00:46:43,920 --> 00:46:44,240 . 1891 00:46:47,540 --> 00:46:47,860 . 1892 00:46:48,400 --> 00:46:52,920 Oh, yeah, what happens is that we get the initial connection back, which is a stager 1893 00:46:52,920 --> 00:46:59,100 like I was talking about before, and we send the stage, which is the VNC loader written 1894 00:46:59,100 --> 00:47:04,340 by Matt Miller, and what that does is it expects a DLL coming over the wire, so that 1895 00:47:04,340 --> 00:47:09,180 same connection, we then actually just send, read, and send the physical DLL 100% complete 1896 00:47:09,180 --> 00:47:16,580 to, we send a size first and then send the DLL to the VNC inject code that then is running 1897 00:47:16,580 --> 00:47:17,020 on the server. 1898 00:47:17,020 --> 00:47:18,700 And, or on the machine. 1899 00:47:19,000 --> 00:47:22,720 And then it actually goes through and will take that raw DLL and map it into memory and 1900 00:47:22,720 --> 00:47:23,200 everything like that. 1901 00:47:23,340 --> 00:47:24,520 So that's what the VNC loader does. 1902 00:47:26,940 --> 00:47:27,340 . 1903 00:47:29,440 --> 00:47:29,840 . 1904 00:47:29,840 --> 00:47:29,880 . 1905 00:47:30,460 --> 00:47:30,860 . 1906 00:47:31,520 --> 00:47:31,920 . 1907 00:47:31,920 --> 00:47:31,980 . 1908 00:47:31,980 --> 00:47:32,000 . 1909 00:47:32,000 --> 00:47:32,120 . 1910 00:47:32,120 --> 00:47:32,180 . 1911 00:47:32,180 --> 00:47:32,200 . 1912 00:47:32,200 --> 00:47:32,280 . 1913 00:47:32,280 --> 00:47:32,320 . 1914 00:47:32,320 --> 00:47:32,380 . 1915 00:47:32,860 --> 00:47:33,260 . 1916 00:47:33,260 --> 00:47:33,600 . 1917 00:47:33,600 --> 00:47:33,700 . 1918 00:47:47,300 --> 00:47:47,340 . 1919 00:47:54,580 --> 00:47:54,620 . 1920 00:48:01,920 --> 00:48:01,960 . 1921 00:48:02,260 --> 00:48:02,300 . 1922 00:48:02,560 --> 00:48:02,600 . 1923 00:48:02,740 --> 00:48:02,780 . 1924 00:48:02,960 --> 00:48:03,000 . 1925 00:48:03,700 --> 00:48:03,740 . 1926 00:48:03,960 --> 00:48:04,000 . 1927 00:48:04,000 --> 00:48:04,020 . 1928 00:48:04,020 --> 00:48:04,040 . 1929 00:48:04,040 --> 00:48:04,060 . 1930 00:48:04,060 --> 00:48:04,080 . 1931 00:48:04,080 --> 00:48:04,100 . 1932 00:48:04,100 --> 00:48:04,120 . 1933 00:48:04,120 --> 00:48:04,140 . 1934 00:48:04,140 --> 00:48:04,160 . 1935 00:48:04,160 --> 00:48:04,180 . 1936 00:48:04,180 --> 00:48:04,200 . 1937 00:48:04,200 --> 00:48:04,220 . 1938 00:48:04,220 --> 00:48:04,240 . 1939 00:48:04,240 --> 00:48:04,260 . 1940 00:48:04,260 --> 00:48:04,280 . 1941 00:48:04,640 --> 00:48:04,680 . 1942 00:48:07,540 --> 00:48:07,580 . 1943 00:48:07,580 --> 00:48:11,240 a new thread. So right now, you know, LSASS may normally have, like, five threads and 1944 00:48:11,240 --> 00:48:14,620 now it has six. So we're just starting a new thread inside of LSASS. We're completely inside 1945 00:48:14,620 --> 00:48:18,980 of LSASS right now, which is used for a lot of other techniques. Say, if you had some 1946 00:48:18,980 --> 00:48:24,180 DLL code that could maybe, you know, get secrets out of LSASS, because that's what LSA does. 1947 00:48:24,460 --> 00:48:28,980 So, you know, maybe you have VNC that actually could use whatever you're exploiting for some 1948 00:48:28,980 --> 00:48:32,200 reason. So we're actually staying completely in the original process. We're not destroying 1949 00:48:32,200 --> 00:48:36,740 it. It's intact for the most part, depending on the exploit, and it's still running. It's 1950 00:48:36,740 --> 00:48:38,400 still LSASS. 1951 00:48:39,080 --> 00:48:42,440 One of the other DLLs we're using for testing right now, we'll actually list all available 1952 00:48:42,440 --> 00:48:46,880 processes, tell you the primary token owner of that process, like the user that each process 1953 00:48:46,880 --> 00:48:50,800 is associated with, and give you the ability to launch a process as that user. So if we 1954 00:48:50,800 --> 00:48:55,240 inject a thread inside LSASS, since LSASS has access to everything, including the LSASS 1955 00:48:55,240 --> 00:48:58,880 secrets itself and memory, we can actually whip those memory secrets out and dump them 1956 00:48:58,880 --> 00:49:02,400 out to the remote attacker, or we can just hijack any other process that that process 1957 00:49:02,400 --> 00:49:04,620 can access. So none of that? Oh, Toby? 1958 00:49:16,440 --> 00:49:21,160 The question was whether by exploiting LSASS we can actually hijack and listen to all 1959 00:49:21,160 --> 00:49:26,040 the logon requests in the system. And actually, yeah, because LSASS uses the GINA DLL to actually 1960 00:49:26,040 --> 00:49:30,220 do the password authentication, we can just bypass that by patching LSASS directly in 1961 00:49:30,220 --> 00:49:33,920 memory or hijacking the actual NT port it uses on the underlying system to actually 1962 00:49:33,920 --> 00:49:36,340 sniff LSASS requests or sniff logon requests. 1963 00:49:37,780 --> 00:49:42,820 And also, because this is a real DLL and it's being loaded correctly, you have access 1964 00:49:42,820 --> 00:49:46,920 to a lot of things. You can import other DLLs. You can access a lot of the things that are 1965 00:49:46,920 --> 00:49:51,340 set up correctly inside of the process. For you, as a DLL, you will do a lot of things 1966 00:49:51,340 --> 00:49:54,360 inside the process. This, of course, would be custom things. We don't have anything. 1967 00:49:54,620 --> 00:49:57,200 I mean, every expert's going to be running a different process, and everything's going 1968 00:49:57,200 --> 00:50:00,820 to be different based on the process. But you have the ability to do a lot of really 1969 00:50:00,820 --> 00:50:05,540 cool stuff, and you're running your stuff in a DLL, and that's pretty much it. 1970 00:50:13,200 --> 00:50:15,960 Well, yeah, of course, but you can just own it again, so. 1971 00:50:19,660 --> 00:50:23,780 Yeah, of course, it's not, you know, we're not setting it in startup scripts. We're not 1972 00:50:23,780 --> 00:50:27,060 auto-starting or anything like that. You could, of course, do it if your goal was 1973 00:50:27,060 --> 00:50:31,440 to have some sort of long-term rootkit, but that isn't what this is. This is, you know, 1974 00:50:31,440 --> 00:50:33,040 a temporary, you know, shell. 1975 00:50:33,320 --> 00:50:36,660 One of the things about pentesting is if you're installing a VNC server under a client, 1976 00:50:36,740 --> 00:50:40,200 system during a pentest, it's really annoying to have to go through and remove those files 1977 00:50:40,200 --> 00:50:43,140 after you're done with it. A lot of times, because if you start the VNC server, so you 1978 00:50:43,140 --> 00:50:46,420 can't delete the files, so you stop the service again, the files are in use, and there's 1979 00:50:46,420 --> 00:50:48,680 like a billion different things that really annoy you when you're trying to install remote 1980 00:50:48,680 --> 00:50:52,180 administration services in a compromised system. With using it in shell code like this, 1981 00:50:52,260 --> 00:50:55,740 after you're done, after you've exited your shell, that's it. There's no memory trace. 1982 00:50:55,800 --> 00:50:58,460 There's nothing left in the box to show that you've ever been there. The nice thing about 1983 00:50:58,460 --> 00:51:04,760 the VNC DLL payload itself is that if you don't have system access, and it tries pretty 1984 00:51:04,760 --> 00:51:06,480 hard to get system access. Like, we're adding some more. 1985 00:51:06,740 --> 00:51:09,980 For the installation techniques into the near future, it'll actually revert to read-only 1986 00:51:09,980 --> 00:51:14,740 mode. So if you're exploiting an IIS bug, an IIS as well as an iUser account, which 1987 00:51:14,740 --> 00:51:18,480 has been impersonated from an iWAM account, it'll revert itself to get iWAM user, and 1988 00:51:18,480 --> 00:51:24,160 then from there it can actually have read access to the desktop. You can't actually 1989 00:51:24,160 --> 00:51:26,960 read the keys of the desktop if you're not system yet, but we're working on different 1990 00:51:26,960 --> 00:51:31,280 ways to manipulate the API to get further into the system, even if we're not in a system. 1991 00:51:31,620 --> 00:51:34,280 So we'll see how things go. Hopefully in the next few months we can have some really nice 1992 00:51:34,280 --> 00:51:36,720 ways to either immediately get system access, or we can get system access. 1993 00:51:38,780 --> 00:51:42,100 We're working on another system called Vinterpreter, which we'll talk about a little bit later, 1994 00:51:42,180 --> 00:51:45,940 but that's more of a complete payload solution. This is just our flashy demo of VNC stuff. 1995 00:51:46,200 --> 00:51:50,280 It was actually put together very quickly, which goes to attest the very cool technology 1996 00:51:50,280 --> 00:51:50,780 that it is. 1997 00:51:51,300 --> 00:51:52,540 Is there any way to do this on Vintec? 1998 00:51:54,820 --> 00:51:56,720 We're going to go to a... 1999 00:51:58,720 --> 00:52:00,500 The user could not pop up a show. 2000 00:52:00,840 --> 00:52:04,060 Well, we actually, the first thing we wanted to look at was actually creating a hidden 2001 00:52:04,060 --> 00:52:06,720 background desktop in the system, and then actually providing VNC to the user. 2002 00:52:07,840 --> 00:52:11,300 What we ran into, though, and what actually Matt found out when he started investigating 2003 00:52:11,300 --> 00:52:15,060 this stuff, was that there's a limitation of the Windows system itself. You cannot read 2004 00:52:15,060 --> 00:52:18,420 the screen of the non-interactive desktop. So the only desktop you can actually read 2005 00:52:18,420 --> 00:52:21,280 the display of is the interactive desktop, and there's only one of those in the system, 2006 00:52:21,360 --> 00:52:25,140 and that's what the physical mouse and keyboard are hooked into. The exception to that is 2007 00:52:25,140 --> 00:52:29,080 terminal services. But the thing is, Microsoft designed the API on purpose that way, so you 2008 00:52:29,080 --> 00:52:32,260 can't write your own custom terminal services services and compete against someone licensing. 2009 00:52:32,760 --> 00:52:36,680 So it was a direct... I mean, the capabilities are there to have multiple desktops and a 2010 00:52:36,740 --> 00:52:39,400 desktop, and most services create their own Windows station and desktop, but you can't 2011 00:52:39,400 --> 00:52:43,520 interact with that desktop if it's not the current input desktop. So it drove us freaking 2012 00:52:43,520 --> 00:52:46,440 nuts for like three days trying to figure out why we couldn't have access to this backend 2013 00:52:46,440 --> 00:52:50,720 desktop, and Matt actually wrote his own custom VNC implementation on the backend, where he 2014 00:52:50,720 --> 00:52:53,800 put bitmaps into different desktops, tried to bring them back out, and we tried pretty 2015 00:52:53,800 --> 00:52:57,400 hard, and we couldn't find a way to create our own custom hidden desktop and still interact 2016 00:52:57,400 --> 00:52:57,800 with it. 2017 00:52:58,340 --> 00:53:03,580 And owning the actual real desktop is very useful, and something like the interpreter 2018 00:53:03,580 --> 00:53:06,700 stuff we talked about, you could, for example, have a module that, you know, you can see 2019 00:53:06,700 --> 00:53:10,200 if there's any mouse movement or keystrokes or something, you know, and say 20 minutes, 2020 00:53:10,320 --> 00:53:13,440 right? So you can say it's probably clear it owns with mouse. You can go in and wait 2021 00:53:13,440 --> 00:53:17,740 and then launch VNC. So you don't need to do it as the first stage, and that's what 2022 00:53:17,740 --> 00:53:22,060 the more involved systems that we'll show later are kind of designed to address. 2023 00:53:25,680 --> 00:53:28,720 The next one we're going to talk about is interchangeable payloads. We mentioned this 2024 00:53:28,720 --> 00:53:32,000 earlier, but essentially any exploit inside the framework, you can put any payload you 2025 00:53:32,000 --> 00:53:36,540 feel like putting into it. In other words, if for some reason you've got a custom 2026 00:53:36,700 --> 00:53:40,040 payload that works around the Aquino system, the Cisco security agent, or whatever it 2027 00:53:40,040 --> 00:53:42,880 happens to be, or you've got a payload that does something, you know, predefined, you 2028 00:53:42,880 --> 00:53:45,960 really need to just do this one thing, like delete this file from the system, and you 2029 00:53:45,960 --> 00:53:47,960 don't want to do anything else. You don't want to try to execute a command shell, you 2030 00:53:47,960 --> 00:53:51,640 don't want to do anything nifty, you just want to do one specific task, you can drop 2031 00:53:51,640 --> 00:53:55,720 in a payload that does just that. Additionally, if you have a payload which bypasses 2032 00:53:55,720 --> 00:53:58,920 the IDS, or, you know, whatever it happens to be, or you're just, you know, writing 2033 00:53:58,920 --> 00:54:01,740 a new shellcode and you want to make sure it works correctly, you can take your shellcode, 2034 00:54:01,800 --> 00:54:06,320 drop it into Ngo. This approach has given us an advantage over commercial products, which 2035 00:54:06,700 --> 00:54:10,240 is more impact and Unity Canvas, because they really only support their own payload. 2036 00:54:10,540 --> 00:54:14,980 What we really try to do is provide a way to do research and do testing of third-party 2037 00:54:14,980 --> 00:54:18,240 payloads and help with the development process in a way that you can actually, you know, 2038 00:54:18,240 --> 00:54:21,800 verify that what you're writing works. Because of that, we actually have a lot of redundant 2039 00:54:21,800 --> 00:54:24,840 payloads, and those are actually on purpose. We've got payloads that do a reverse connect 2040 00:54:24,840 --> 00:54:28,480 one way, we've got payloads that do a reverse connect in a stage system, we've got ones 2041 00:54:28,480 --> 00:54:30,280 that are actually the same payloads as written different ways. 2042 00:54:32,140 --> 00:54:35,580 I was just going to say, we have an hour left, so I know some people are leaving, but 2043 00:54:35,580 --> 00:54:36,680 just to make sure that people are listening. 2044 00:54:36,700 --> 00:54:40,200 We do a lot of other stuff. We showed some of the flashy stuff first, but we'll go in 2045 00:54:40,200 --> 00:54:43,980 depth, and we have some other demos. For example, owning LSX, which we're the first 2046 00:54:43,980 --> 00:54:45,740 public exploits for, and some other things. 2047 00:54:45,960 --> 00:54:46,760 So, we're going to go ahead and... 2048 00:54:46,760 --> 00:54:49,060 They didn't work right, so we'll go into that in a little bit. 2049 00:54:50,120 --> 00:54:53,800 Additionally, we've got, you know, we include the reverse bind, find exec, you know, exec 2050 00:54:54,500 --> 00:54:58,560 payloads, the encrypted XOR command gels. We actually took the inline egg sample provided 2051 00:54:58,560 --> 00:55:02,880 by Core C for the inline egg Python system, and took it out, dropped it straight into 2052 00:55:02,880 --> 00:55:06,420 Metasport, and it works. You have to do minimal modifications to get an inline egg, 2053 00:55:07,100 --> 00:55:10,400 payload, written in Python, working at the Metasport framework in Perl, because of our 2054 00:55:10,400 --> 00:55:13,940 support for external payloads. You can take any program that generates shellcode output 2055 00:55:13,940 --> 00:55:17,240 and integrate it in as a payload into the Metasport framework. So, if you've got a really 2056 00:55:17,240 --> 00:55:20,120 nifty tool that you're working on, and you don't want to write it in Perl, that's cool. 2057 00:55:20,200 --> 00:55:20,660 You can still use it. 2058 00:55:21,180 --> 00:55:25,160 So, for example, we get back on inline egg. It's very similar to David Tell's most def. 2059 00:55:25,280 --> 00:55:28,460 For example, if you had some sort of most def payload that you wanted to write, or, 2060 00:55:28,520 --> 00:55:32,060 you know, your own payload system, or for some reason you want to do some sort of other 2061 00:55:32,640 --> 00:55:36,680 complication dynamic generation of shellcode, and it isn't written in Perl, you can do 2062 00:55:36,700 --> 00:55:40,140 Perl, and you can't or don't want to integrate it directly into Metasport. You can just have 2063 00:55:40,140 --> 00:55:43,800 it as an external program, and we actually have a class called external payload that 2064 00:55:43,800 --> 00:55:47,320 makes it very easy to do exactly the sort of stuff that we do with inline egg. 2065 00:55:51,720 --> 00:55:54,560 Oh, sorry. One thing that we've actually come up with with Unique is, you know, sort 2066 00:55:54,560 --> 00:55:57,880 of unique and somewhat interesting. There's a lot of exports out there that allow you 2067 00:55:57,880 --> 00:56:01,360 to execute a command shell. And, you know, okay, great, you can run a command, whatever 2068 00:56:01,360 --> 00:56:03,900 it happens to be. A lot of times you can't see the output, and people are a little bit 2069 00:56:03,900 --> 00:56:06,220 bored of doing things like, you know, an extern dash. 2070 00:56:06,700 --> 00:56:11,000 Extern dash display to get their shell back, or doing a, you know, a telnet pipe to bin 2071 00:56:11,000 --> 00:56:14,200 shell, pipe to telnet again. And those are all great, but they require a lot of work 2072 00:56:14,200 --> 00:56:17,080 in the user's part to set up, and, you know, it's just, it's really annoying to do in 2073 00:56:17,080 --> 00:56:20,300 the first part. What we've ended up doing is all the command exec payloads that we've 2074 00:56:20,300 --> 00:56:25,240 included with the, excuse me, all the command execution payloads, where you're actually 2075 00:56:25,240 --> 00:56:28,960 just injecting a command and not a shellcode. We've actually created a set of command underscore 2076 00:56:29,440 --> 00:56:32,300 payloads, and that's just the name of them, so we're using the terminology for it, that 2077 00:56:32,300 --> 00:56:35,980 do things like a reverse connect, or a bind shell, or an exec V, or a lot of other little 2078 00:56:36,700 --> 00:56:41,500 things. And they actually implement, like, telnet pipe, shell, pipe, telnet, to be able 2079 00:56:41,500 --> 00:56:45,040 to do a reverse, you know, a reverse connect style console, but all with a single unified 2080 00:56:45,040 --> 00:56:49,620 console. For instance, use the Solaris SADMD export, including the framework. It'll actually 2081 00:56:49,620 --> 00:56:54,100 cause Solaris, you know, with the Unix reverse generic payload, what it'll do is it does 2082 00:56:54,100 --> 00:56:59,080 tel, it executes telnet to the system exploiting it on the IP address in the port, pipe, and 2083 00:56:59,080 --> 00:57:02,440 then it kind of calls, you know, bin shell again, then pipe, telnet back to the host 2084 00:57:02,440 --> 00:57:06,680 on the same port again. And when the MSF console sees that, it then, you know, it'll 2085 00:57:06,700 --> 00:57:09,020 then says, okay, I've got two connections coming in, I'm going to write some data to 2086 00:57:09,020 --> 00:57:11,900 one of them, see which end it comes out. And it sees that data coming out, one of them 2087 00:57:11,900 --> 00:57:15,120 says, okay, I know where my inputs and outputs are, and it glues those two handles together 2088 00:57:15,120 --> 00:57:18,140 into a single unified console in front of you. So in other words, if you're exploiting 2089 00:57:18,140 --> 00:57:20,780 a system that's an IIS server, and you pop over the reverse shell, and you've got a 2090 00:57:20,780 --> 00:57:24,520 nice console, then you do an SADMD exploit, you won't notice a difference at all in the 2091 00:57:24,520 --> 00:57:27,520 console, they'll work exactly the same, because of the way the console's been abstracted 2092 00:57:27,520 --> 00:57:30,640 and used. So if you've got a nice way to get any command shell back to yourself, or 2093 00:57:30,640 --> 00:57:33,860 you want to do, like, you know, instead of telnet pipe, shell, telnet, you want to do 2094 00:57:33,860 --> 00:57:39,100 a telnet pipe, shell, you know, you know, run it through the TR command, a lot 13 year 2095 00:57:39,100 --> 00:57:42,560 output of it, you can do that, you know, trivially, just by adding a filter to the handler side 2096 00:57:42,560 --> 00:57:45,820 of the payload. So it's really easy to add, you know, custom command payloads, do things 2097 00:57:45,820 --> 00:57:49,640 like PHP exploits, SQL injection exploits, things like that, in a way that actually 2098 00:57:49,640 --> 00:57:52,780 gives the user the ability to pick different types of payloads, and still integrate them 2099 00:57:52,780 --> 00:57:54,540 with weird command injection exploits. 2100 00:57:55,080 --> 00:57:59,640 Okay, so, yeah, this is for those bugs, we're not actually executing arbitrary code, but 2101 00:57:59,640 --> 00:58:03,780 you can somehow inject a command, for example, a lot of web bugs and stuff like this. And 2102 00:58:03,780 --> 00:58:07,660 it, not just the coolness of the integration in Metasport, but it's actually just a good 2103 00:58:07,660 --> 00:58:11,920 resource. There wasn't a lot of public, you know, I sat down and figured out that these 2104 00:58:11,920 --> 00:58:14,600 are, like, you know, the great commands to run and stuff. So I actually sat down and 2105 00:58:14,600 --> 00:58:18,300 thought a lot about how to do, you know, a good generic Unix reverse shell, you know, 2106 00:58:18,320 --> 00:58:22,000 with pipes and common program, or with, you know, telnet and pipes, and other common 2107 00:58:22,000 --> 00:58:26,500 utilities. It's just a good collection. A lot of times, you know, when people have an 2108 00:58:26,500 --> 00:58:30,220 arbitrary, you know, command execution, they just need, like, you know, wget semicolon 2109 00:58:30,220 --> 00:58:33,680 gcc or something. And we don't have that. 2110 00:58:33,780 --> 00:58:39,780 So even if you found a bug, you know, in, say you found a bug in an ASP page or something 2111 00:58:39,780 --> 00:58:42,940 where you could execute a command, you can just drop it into Metasport very easily. And 2112 00:58:42,940 --> 00:58:46,380 then the command, you can just, you know, instead of, the command payload just returns 2113 00:58:46,380 --> 00:58:49,380 the actual command as a payload. So then when you're putting in your payload, you actually 2114 00:58:49,380 --> 00:58:54,120 just have this command. So it's really, really cool, actually, to be able to just take any 2115 00:58:54,120 --> 00:58:58,280 sort of arbitrary bug and get shells back with really no work at all. 2116 00:58:58,500 --> 00:59:01,300 One of the other annoying things you might find with command injection payloads is limited 2117 00:59:01,300 --> 00:59:03,760 characters. For instance, you can't have a space inside your command. You can't have 2118 00:59:03,780 --> 00:59:07,580 your command injection payload. And, you know, not having a space in your wget command kind 2119 00:59:07,580 --> 00:59:11,160 of limits what you can wget. In other words, it'll just be one long command. You can use 2120 00:59:11,160 --> 00:59:15,820 tricks like the IFS sequence part, the IFS separator dash command environment option 2121 00:59:15,820 --> 00:59:19,320 to actually represent a space. There's a lot of tricks you can use to actually encode 2122 00:59:19,320 --> 00:59:22,860 your command in a way that it still is actually a valid shell command but bypasses where the 2123 00:59:22,860 --> 00:59:25,960 restrictions are. And this does it all for you, too. We've actually got a payload designed 2124 00:59:25,960 --> 00:59:29,540 explicitly for getting around spaces and slash requirements when you're exploiting bugs 2125 00:59:29,540 --> 00:59:32,720 like the n-disclosed one in a big old Unix OS we're going to release in about a month. 2126 00:59:33,860 --> 00:59:36,860 Sorry. But, you know, it's a low-end advisory process. 2127 00:59:38,520 --> 00:59:43,320 You didn't hear it here. Okay, so I guess we can just go ahead and do some payloads 2128 00:59:43,320 --> 00:59:49,440 demos. We'll do some XOR shells. Go ahead and, like, throw up ethereal or something 2129 00:59:49,440 --> 00:59:54,860 so you guys can actually see that it is indeed XORed. We'll do some inline egg stuff, some 2130 00:59:54,860 --> 00:59:58,880 reverse and fine sock, and just go ahead and show you some of what that actually looks 2131 00:59:58,880 --> 01:00:01,520 like on the wire and, you know, why that's good. 2132 01:00:05,280 --> 01:00:05,780 Okay. 2133 01:00:22,300 --> 01:00:25,740 Can everybody see the output of this okay? I'm not sure. 2134 01:00:26,840 --> 01:00:27,340 Yeah. 2135 01:01:16,780 --> 01:01:20,000 I'm trying to find a font that will actually work so you can see it that's big enough and 2136 01:01:20,000 --> 01:01:23,700 also still allow us to be able to type and manage all things scrolling off all funny, 2137 01:01:23,800 --> 01:01:25,120 so one second. 2138 01:01:25,640 --> 01:01:27,300 Okay, so is that pretty decent? 2139 01:01:27,760 --> 01:01:30,180 I'm not sure how good the protectors are and stuff. 2140 01:01:30,180 --> 01:01:37,820 So we're going to, for example, use the Samba Trends 2 open bug and you can see in the prompt 2141 01:01:37,820 --> 01:01:41,440 we have in parentheses the payload that's currently selected, you can change the payload 2142 01:01:41,440 --> 01:01:42,200 and that prompt will change. 2143 01:01:42,640 --> 01:01:46,260 So then there's top options with the options specific for the exploit, for example, the 2144 01:01:46,260 --> 01:01:52,780 remote host in this case 192.168.50.12, the remote port, the port we're connecting back 2145 01:01:52,780 --> 01:01:56,980 to, the XOR key in this case because we're going to do an XOR reverse which is actually 2146 01:01:56,980 --> 01:01:59,700 an inline egg payload, and then the port to connect back to. 2147 01:02:04,020 --> 01:02:05,820 All right, so we'll go ahead and exploit this. 2148 01:02:12,800 --> 01:02:18,800 So you can see now it's brute forcing and hopefully we will be successful in a minute. 2149 01:02:19,080 --> 01:02:21,880 Okay, so hit it a couple times. 2150 01:02:22,140 --> 01:02:23,880 Yeah, so we got the shell back. 2151 01:02:24,100 --> 01:02:26,700 We usually, in an inline egg payload, we do an interactive bash. 2152 01:02:26,800 --> 01:02:28,860 We actually have a nice bash prompt as root. 2153 01:02:30,820 --> 01:02:32,060 So that is all done for you. 2154 01:02:32,200 --> 01:02:37,120 You actually see on the network wire this is what the data is looking like. 2155 01:02:37,220 --> 01:02:39,120 I don't know if you're going to have a follow TCP session or something. 2156 01:02:40,700 --> 01:02:43,060 So we'll do, you know, PSA UX output. 2157 01:02:43,180 --> 01:02:44,720 You see it's obviously fine for us. 2158 01:02:45,860 --> 01:02:46,500 And, yeah. 2159 01:02:51,680 --> 01:02:53,700 So this is what the TCP stream actually looks like. 2160 01:02:54,040 --> 01:02:58,260 You can see that, you know, it's obviously isn't great security. 2161 01:02:58,360 --> 01:02:58,840 But just for you to see. 2162 01:03:00,540 --> 01:03:05,020 So we're going to show you some of our SNORC evasion stuff later. 2163 01:03:05,440 --> 01:03:10,020 A lot of things, for example, ID output and stuff like that, they will not be triggered by this. 2164 01:03:17,880 --> 01:03:19,740 The XOR is done specific to the payload. 2165 01:03:19,860 --> 01:03:20,940 So we're using an XOR payload. 2166 01:03:21,260 --> 01:03:23,760 So, yeah, if we wanted to use a non-XOR payload, it wouldn't be doing XORing. 2167 01:03:24,040 --> 01:03:27,960 And then we also, the key was one of the options if you looked in the payload options. 2168 01:03:28,020 --> 01:03:28,840 So you could set a different XOR payload. 2169 01:03:28,840 --> 01:03:32,380 You could set it to zero if you wanted to avoid XORing. 2170 01:03:36,860 --> 01:03:39,760 Okay, so does anybody have any sort of questions about that? 2171 01:03:40,460 --> 01:03:42,760 You talked before about injecting, you know, 2172 01:03:42,760 --> 01:03:44,020 when the incident was out. 2173 01:03:44,140 --> 01:03:46,240 And instead of having the expansion come back to you, 2174 01:03:46,260 --> 01:03:50,780 were you injecting open SH servers so that you send back an encrypted? 2175 01:03:51,440 --> 01:03:51,900 Right. 2176 01:03:51,980 --> 01:03:55,980 Well, we are working on some library injection technology for Linux. 2177 01:03:56,140 --> 01:03:58,180 Obviously, the DLR injection is specific to Windows. 2178 01:03:58,180 --> 01:04:01,640 And we'll be working on things like Linux that will come in the future. 2179 01:04:04,240 --> 01:04:05,620 So, really, that's something you can do. 2180 01:04:06,140 --> 01:04:07,440 You can do a lot of things. 2181 01:04:07,480 --> 01:04:09,360 We're actually working on more complicated payload systems. 2182 01:04:09,500 --> 01:04:14,460 You can do stuff like Diffie-Hellman and then do some sort of, you know, asymmetric and non-symmetric crypto. 2183 01:04:14,840 --> 01:04:19,860 The tricky part about it is finding an API that we can use on the client side and the server side that's, you know, easy to use in Perl. 2184 01:04:20,060 --> 01:04:24,300 Like, we don't want to have to, you know, install some random C library on the Perl side to be able to handle the encryption. 2185 01:04:24,500 --> 01:04:28,040 And most of the Microsoft C API stuff doesn't work quite the same as open SSLs. 2186 01:04:28,040 --> 01:04:29,580 So, we're still trying to find a better way to do it. 2187 01:04:30,780 --> 01:04:31,100 Yeah. 2188 01:04:31,180 --> 01:04:31,560 You had a question? 2189 01:04:35,020 --> 01:04:37,420 Transports is in the payloads? 2190 01:04:38,420 --> 01:04:39,600 Transports is in the payloads? 2191 01:04:44,020 --> 01:04:46,080 No, they're not actually using Talmud throughout. 2192 01:04:49,120 --> 01:04:49,680 No, no, no. 2193 01:04:49,780 --> 01:04:51,160 They're not passing Talmud options. 2194 01:04:51,240 --> 01:04:52,200 These are all just raw connections. 2195 01:04:52,540 --> 01:04:55,580 For example, using Netcat or just raw TCP socket options. 2196 01:04:55,700 --> 01:04:56,140 Or, you know. 2197 01:04:56,200 --> 01:04:56,480 So. 2198 01:04:58,040 --> 01:05:00,700 But you could use Talmud as a client. 2199 01:05:00,960 --> 01:05:03,520 But no, these aren't like Talmud supported payloads. 2200 01:05:03,520 --> 01:05:04,320 Not a Talmud server. 2201 01:05:07,440 --> 01:05:07,800 Okay. 2202 01:05:07,820 --> 01:05:11,960 So, we'll move on and do an example of a Finesock over Samba. 2203 01:05:12,100 --> 01:05:13,920 Since we already have Thera open. 2204 01:05:14,140 --> 01:05:18,400 And you can see that the node right now, you can see that this connection was on port 4321. 2205 01:05:18,660 --> 01:05:21,160 So, it actually opened a new connection for that payload. 2206 01:05:21,240 --> 01:05:22,700 So, now let's do it over the original connection. 2207 01:05:22,940 --> 01:05:25,500 So, now we'll see that our shell will be over port 139. 2208 01:05:26,140 --> 01:05:26,500 Yeah. 2209 01:05:26,500 --> 01:05:27,680 So, when we hit import, it's the Finesock that's going to be saved. 2210 01:05:27,680 --> 01:05:27,900 Next. 2211 01:05:28,540 --> 01:05:29,140 Okay. 2212 01:05:29,180 --> 01:05:29,920 So, here it is. 2213 01:05:29,920 --> 01:05:30,300 Okay. 2214 01:05:31,580 --> 01:05:32,500 It'll show up. 2215 01:05:32,740 --> 01:05:36,700 So, we're going to unbox it. 2216 01:05:36,780 --> 01:05:37,240 And we're going to. 2217 01:05:37,600 --> 01:05:38,760 So, we're going to see if it's something that we can do over a Filesock. 2218 01:05:39,100 --> 01:05:39,700 Yeah? 2219 01:05:39,960 --> 01:05:40,560 Okay. 2220 01:05:41,100 --> 01:05:41,940 So, if we can. 2221 01:05:42,100 --> 01:05:43,720 So, if we can command this Filesock to open. 2222 01:05:44,960 --> 01:05:45,920 We're going to have them open. 2223 01:05:46,160 --> 01:05:46,760 Oh. 2224 01:06:05,620 --> 01:06:10,800 So this exploits the sound-blast trans-to-open bug and affects everything like 228A, or excuse 2225 01:06:10,800 --> 01:06:12,940 me, 228 and below, and is patched by 228. 2226 01:06:17,540 --> 01:06:21,460 And usually it goes a lot faster, but because we have, we've enabled the Python payloads 2227 01:06:21,460 --> 01:06:24,380 on the Mac OS, it doesn't really cache right and it kind of takes forever to load up all 2228 01:06:24,380 --> 01:06:25,020 the payloads and stuff. 2229 01:06:25,600 --> 01:06:28,440 Usually we're just able to do that default so it goes a lot quicker when you're using 2230 01:06:28,440 --> 01:06:28,820 it for real. 2231 01:06:30,000 --> 01:06:35,000 And as you can see, now in the payload options we don't actually have a connect back IP address 2232 01:06:35,000 --> 01:06:36,220 because we're not actually connecting back. 2233 01:06:36,280 --> 01:06:40,060 We're reusing the existing connection, and another thing that would be important to explain