1 00:00:00,600 --> 00:00:07,400 So a little bit about Josh here. Hi guys, I'm Josh. I work with Dave. I'm a security analyst there. 2 00:00:08,540 --> 00:00:12,900 I do just about anything technical, including watching Dave modify my slides. 3 00:00:14,320 --> 00:00:21,780 Because Dave is a big Perl fan. He loves Perl. And he programs solely in Perl. I do Python, so I mean, I'm not as good as him. 4 00:00:21,880 --> 00:00:26,920 He's being sarcastic. So the people giving me thumbs up, it's sarcasm. I do not like Perl. 5 00:00:27,300 --> 00:00:29,720 Dude, you should see all the things he's got out there in CPAM. 6 00:00:29,720 --> 00:00:30,240 So next slide. 7 00:00:35,520 --> 00:00:39,620 So I have heavy experience in penetration testing and all that good stuff. 8 00:00:40,340 --> 00:00:41,520 Wrote the social engineer toolkit. 9 00:00:44,960 --> 00:00:46,660 So really, how many people use it? 10 00:00:48,080 --> 00:00:50,160 We've got two people. We've got two. It's good. That's all I wanted. 11 00:00:50,960 --> 00:00:55,580 So I've got a heavy military background. Deployed to Iraq a couple times and yada yada. 12 00:00:56,400 --> 00:00:59,520 Before we start, I want to say a special thanks to Iron Geek and Kathy Peters. 13 00:00:59,720 --> 00:01:00,180 Kathy, are you in here? 14 00:01:01,520 --> 00:01:02,300 I guess not. 15 00:01:03,020 --> 00:01:03,560 Thank you. 16 00:01:05,520 --> 00:01:07,620 So let's do a little brief intro into PowerShell. 17 00:01:07,700 --> 00:01:08,780 Is anybody here familiar with PowerShell? 18 00:01:08,820 --> 00:01:10,940 Know what PowerShell is? Use PowerShell on a regular basis. That's great. 19 00:01:11,960 --> 00:01:12,360 So... 20 00:01:12,360 --> 00:01:13,920 Wow, that was a lot of people. 21 00:01:14,220 --> 00:01:14,980 It was a lot of people. 22 00:01:16,040 --> 00:01:19,380 So it's installed by default on Windows 7 and Server 2008. 23 00:01:19,760 --> 00:01:21,320 On Windows 7, you cannot uninstall. 24 00:01:22,300 --> 00:01:25,020 So it's basically embedded into the OS at this point. 25 00:01:25,940 --> 00:01:28,200 PowerShell basically is a fully flexible... 26 00:01:28,780 --> 00:01:29,700 You know, you don't have to worry about it. 27 00:01:29,720 --> 00:01:32,860 Unix, Linux type programming environment or bash environment. 28 00:01:33,340 --> 00:01:36,560 And it actually integrates completely into the .NET programming language. 29 00:01:36,800 --> 00:01:38,200 Which we'll be seeing a lot of that today. 30 00:01:40,880 --> 00:01:43,920 So if you haven't seen it, it's really exciting. That's what it looks like. 31 00:01:44,660 --> 00:01:46,000 Can you guys tell that's blue? 32 00:01:47,060 --> 00:01:48,180 Just so you know, that's blue. 33 00:01:48,440 --> 00:01:52,240 It's 2010 and we're still using the same command prompt from Windows 98. 34 00:01:53,000 --> 00:01:54,520 They upgraded. They put a PS in front of it. 35 00:01:54,520 --> 00:01:56,160 It says PS in front of it. So yeah, that is better. 36 00:01:56,320 --> 00:01:58,120 And it's blue. The blue is kind of nice. 37 00:01:58,120 --> 00:01:59,500 You can make it transparent, too. 38 00:01:59,880 --> 00:02:02,380 Hey, when you maximize, though, it still goes... 39 00:02:02,820 --> 00:02:03,420 Doesn't expand. 40 00:02:04,020 --> 00:02:04,420 Yeah. 41 00:02:05,680 --> 00:02:07,220 I think they would fix that by now. 42 00:02:07,860 --> 00:02:10,780 So PowerShell for hackers... 43 00:02:11,480 --> 00:02:12,700 You need to learn how to spell. 44 00:02:13,360 --> 00:02:14,860 Yeah. So we'll be getting... 45 00:02:16,060 --> 00:02:21,220 We'll be the first ones to admit that PowerShell is absolutely a benefit to the IT. 46 00:02:21,540 --> 00:02:23,700 As well as us as security professionals, right? 47 00:02:24,080 --> 00:02:26,400 You'll see a lot of demos here as proof of concept codes. 48 00:02:26,500 --> 00:02:27,040 As well as... 49 00:02:27,040 --> 00:02:30,140 If you go to my site at the end of this talk, secmaniac.com, 50 00:02:30,320 --> 00:02:33,000 you can download all the proof of concept codes and new Metasploit modules 51 00:02:33,000 --> 00:02:34,020 and all that other good stuff. 52 00:02:35,360 --> 00:02:37,480 But I'll say is for us from a security standpoint, 53 00:02:37,620 --> 00:02:40,660 we generally didn't have this type of programming language at the command line. 54 00:02:41,200 --> 00:02:43,820 The ability to completely interface with the .NET framework 55 00:02:44,220 --> 00:02:47,500 and do whatever we want from an automation perspective is really sexy to us. 56 00:02:47,900 --> 00:02:51,180 And you'll be seeing a little bit of a couple demonstrations as we go with that. 57 00:02:51,220 --> 00:02:55,020 Yeah, before we had to rely on like VBS scripts and batch files and stuff like that. 58 00:02:55,220 --> 00:02:55,580 CSE. 59 00:02:55,580 --> 00:02:57,780 Yeah, not a lot of power in those. 60 00:02:57,880 --> 00:02:59,520 But this definitely takes the cake. 61 00:03:01,500 --> 00:03:01,940 So... 62 00:03:03,460 --> 00:03:04,140 Execution policies. 63 00:03:04,600 --> 00:03:05,400 Want to talk a little about that? 64 00:03:05,960 --> 00:03:07,800 Yeah, the execution policies are there. 65 00:03:07,880 --> 00:03:10,560 It's kind of a security benefit, kind of. 66 00:03:10,560 --> 00:03:11,000 Not really. 67 00:03:11,220 --> 00:03:14,240 Microsoft will even admit now that it's not really there for security. 68 00:03:14,520 --> 00:03:19,600 But you have restricted, which pretty much restricts all execution of PowerShell scripts on the system. 69 00:03:19,820 --> 00:03:22,880 You can still execute PowerShell and run your commands within the environment. 70 00:03:23,160 --> 00:03:25,520 But you can't execute the actual PS1. 71 00:03:25,580 --> 00:03:26,480 So you have... 72 00:03:27,220 --> 00:03:31,040 All sign requires all scripts to be signed before they can be executed. 73 00:03:31,940 --> 00:03:33,500 The other one's remote sign. 74 00:03:33,640 --> 00:03:38,180 So anything you download from the internet, it creates an alternative data stream. 75 00:03:38,320 --> 00:03:41,800 And it will let PowerShell know that it's been downloaded from the internet. 76 00:03:41,940 --> 00:03:44,300 And if it's not been signed, it will not execute. 77 00:03:44,440 --> 00:03:46,860 But you can still execute your own scripts that you've written. 78 00:03:47,160 --> 00:03:49,820 And then unrestricted is unrestricted. 79 00:03:49,820 --> 00:03:51,700 You can execute any PowerShell script that you want. 80 00:03:52,640 --> 00:03:53,660 So it's unrestricted? 81 00:03:54,480 --> 00:03:55,440 That's what I heard. 82 00:03:55,580 --> 00:03:55,740 Okay. 83 00:03:56,820 --> 00:03:57,640 Sorry, I was confused. 84 00:03:58,000 --> 00:03:59,360 I couldn't tell. 85 00:03:59,780 --> 00:04:01,420 So release of Metasploit Module 1. 86 00:04:01,540 --> 00:04:07,100 I don't know if you guys remember, but in FastTrack, what we used with doing SQL injection, 87 00:04:07,400 --> 00:04:11,260 or through specifically MS SQL, or you find like a weak SA account or something like that, 88 00:04:11,380 --> 00:04:14,980 what we're doing is we're taking a binary, converting it to hexadecimal, 89 00:04:15,140 --> 00:04:21,240 and then using the XPCommandShellStore procedure to write that hexadecimal representation of the binary to the underlying operating system. 90 00:04:21,540 --> 00:04:22,900 Try saying that three times fast. 91 00:04:22,900 --> 00:04:25,180 Did anyone here actually use FastTrack and use that part? 92 00:04:26,160 --> 00:04:26,660 Oh, wow. 93 00:04:26,800 --> 00:04:27,320 Okay, that's good. 94 00:04:27,380 --> 00:04:28,160 Okay, this is so new. 95 00:04:28,240 --> 00:04:29,140 This is all new to you guys. 96 00:04:29,200 --> 00:04:29,520 Awesome. 97 00:04:29,580 --> 00:04:29,900 Great. 98 00:04:30,200 --> 00:04:31,380 So we just did this. 99 00:04:31,740 --> 00:04:32,860 That stuff never existed. 100 00:04:33,200 --> 00:04:33,520 Yeah. 101 00:04:33,620 --> 00:04:34,200 This is all new. 102 00:04:34,340 --> 00:04:34,580 Right. 103 00:04:36,520 --> 00:04:37,040 Thanks, buddy. 104 00:04:37,180 --> 00:04:38,360 I spent like four months on that. 105 00:04:39,260 --> 00:04:39,580 Anyways. 106 00:04:40,520 --> 00:04:41,340 Not with me, then. 107 00:04:41,460 --> 00:04:45,820 So when it gets set to the underlying operating system as hex, we used to call Windows Debug 108 00:04:45,820 --> 00:04:47,280 to convert it back to a binary for us. 109 00:04:47,460 --> 00:04:48,680 Now, there's a slight little problem. 110 00:04:48,840 --> 00:04:51,080 You had the 64K restrictions that Windows Debug has. 111 00:04:51,480 --> 00:04:52,560 So if you're a binary. 112 00:04:52,560 --> 00:04:55,440 If your binary was larger than 64K, Debug would kink out and wouldn't allow you to 113 00:04:55,440 --> 00:04:55,740 do it. 114 00:04:55,940 --> 00:05:00,700 So what we ended up doing, or the team that I was with at the time, basically wrote a 115 00:05:00,700 --> 00:05:03,360 small stager that just reads in hex and spits out binary. 116 00:05:03,600 --> 00:05:07,900 So we basically got around the Debug 64K restriction. 117 00:05:08,360 --> 00:05:13,000 Now the problem is, shortly after that talk, they removed Debug from all 64-bit systems. 118 00:05:13,580 --> 00:05:16,840 So the traditional method for payload delivery was no longer existent. 119 00:05:18,140 --> 00:05:21,440 So we're releasing a new Metasploit module called the PowerShell Debug. 120 00:05:21,440 --> 00:05:24,360 It allows you to do the exact same thing all through PowerShell. 121 00:05:24,800 --> 00:05:27,800 And one thing I'd like to say with this, and we'll talk a little bit more about this 122 00:05:27,800 --> 00:05:32,940 in a few minutes, but these type of attacks, the PowerShell attacks, like Metasploit modules 123 00:05:32,940 --> 00:05:37,880 that we'll be showing, the bypass, the reverse and bind shell, or none of these are getting 124 00:05:37,880 --> 00:05:39,040 hit by AV or hips. 125 00:05:39,380 --> 00:05:42,540 So it's a completely new attack vector that no one's really looking at. 126 00:05:42,920 --> 00:05:45,620 And you can basically get anything you want through the system, which is kind of nice. 127 00:05:45,860 --> 00:05:46,260 Oops. 128 00:05:47,900 --> 00:05:48,660 So quick demo. 129 00:05:58,700 --> 00:06:00,660 You guys probably can't see that, huh? 130 00:06:06,100 --> 00:06:08,600 So I'll do a little narrative here for a second. 131 00:06:08,880 --> 00:06:10,740 We're just doing a quick scan of a host. 132 00:06:11,120 --> 00:06:11,960 Nothing spectacular. 133 00:06:13,740 --> 00:06:15,480 We find that 1433 is open. 134 00:06:16,080 --> 00:06:18,640 . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 00:06:18,640 --> 00:06:48,580 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 00:06:48,580 --> 00:06:55,140 blank. So now we're going to load up our new MS SQL payload that will be put into the Metasploit 137 00:06:55,780 --> 00:07:00,180 repositories here virtually. I talked to HD working on it. And basically we're going to 138 00:07:00,180 --> 00:07:03,380 go ahead and attack. Now what we're going to do next is there's new options added to this 139 00:07:03,380 --> 00:07:07,100 specific payload. So instead of using the debug version, it will allow you to use the 140 00:07:07,100 --> 00:07:14,200 PowerShell version. So you just use PowerShell, set it to true. You turn off the old one and 141 00:07:14,200 --> 00:07:19,180 hit exploit. Now this is all going to take an executable, convert it to hex, put it on the 142 00:07:19,180 --> 00:07:22,540 learning operating system, bypass execution restriction policies, which we'll talk about in a 143 00:07:22,540 --> 00:07:28,240 second. And then we'll actually execute the payload on the system and we get an interpreter shell. 144 00:07:30,540 --> 00:07:42,220 That looked easy. So just a real quick recap. Binary is converted to hex and placed into the 145 00:07:42,220 --> 00:07:44,180 file system. Convert script is created to take the hex and place it into the file system. 146 00:07:44,180 --> 00:07:49,320 Hexadecimal and rewrite back as a byte array is binary. Payload is now on the system for 147 00:07:49,320 --> 00:07:58,040 execution. So execution restriction policies, you know, they're not, they shouldn't be relied 148 00:07:58,040 --> 00:08:02,320 upon for any type of protection whatsoever. They're really not designed for that. If you look 149 00:08:02,320 --> 00:08:06,180 at the sites and people talking about it, a lot of people do talk about it as a preventative 150 00:08:06,180 --> 00:08:10,780 measure for, you know, not allowing scripts to execute or not allowing to get specific code on 151 00:08:10,780 --> 00:08:14,160 the system itself. It's really not designed for that and it's very easy to bypass. So we're 152 00:08:14,180 --> 00:08:17,480 going to talk about that. Execution restriction policies really do not help from a post 153 00:08:17,480 --> 00:08:27,800 exploitation perspective. Period. So the create command release will be releasing the tool. 154 00:08:27,880 --> 00:08:31,900 It's also on secmaniac.com. Basically the contents of the file are concatenated, 155 00:08:31,980 --> 00:08:37,300 compressed and converted to a base 64 string. The bootstrap created when we use specific 156 00:08:37,300 --> 00:08:43,160 calls, encoded command and command to basically invoke expressions for, use the invoke 157 00:08:43,160 --> 00:08:44,160 expression for execution restrictions. So we're going to talk a little bit more about that. 158 00:08:44,180 --> 00:08:48,680 But this is a demo demo demo of executing our payload on the system. So basically what this 159 00:08:48,680 --> 00:08:53,300 essentially allows you to do is take any PowerShell script you want to, execute it, bypass 160 00:08:53,300 --> 00:08:57,080 all of the execution restriction policies, and allow you to run whatever you want to on the 161 00:08:57,080 --> 00:09:02,780 system itself. So with the most restrictive policy set on PowerShell, we can still execute 162 00:09:02,780 --> 00:09:06,860 whatever we want. Again, this really is not a security prevention method. No need to disable 163 00:09:06,860 --> 00:09:11,440 execution restriction policies like registry interaction, reboots, etc., etc. We can just do it 164 00:09:11,440 --> 00:09:13,420 on the fly. So here's a quick demo. 165 00:09:15,920 --> 00:09:20,560 In this scenario, I'm actually going to be on the local system itself just to show you 166 00:09:20,560 --> 00:09:21,080 as a representation. 167 00:09:21,720 --> 00:09:26,280 So here we just created a macro to basically set the execution restriction policy to unrestricted. 168 00:09:26,520 --> 00:09:28,240 And we're going to create a file. 169 00:09:28,420 --> 00:09:33,180 So we'll show you in the next slide, we wrote a tool called PowerDump. 170 00:09:34,740 --> 00:09:37,760 And basically it will dump the SAM database purely through PowerShell. 171 00:09:38,380 --> 00:09:42,160 So in this example, we're going to actually use the PowerDump to get around the execution 172 00:09:42,160 --> 00:09:44,380 restriction policy through our new command, create command. 173 00:09:46,480 --> 00:09:49,080 And so what it does is it actually sets out a bat file for you. 174 00:09:49,140 --> 00:09:50,200 A nice little bat file. 175 00:09:50,280 --> 00:09:53,080 You just double click the bat file, loads everything into PowerShell for you and you 176 00:09:53,080 --> 00:09:53,740 just call your function. 177 00:09:55,220 --> 00:09:59,340 So we're creating a service right here as a system so we can dump the SAM database. 178 00:10:02,900 --> 00:10:04,080 We're running a system right here. 179 00:10:04,560 --> 00:10:06,980 And we're going to go ahead and execute that specific bat file. 180 00:10:08,360 --> 00:10:08,720 Okay. 181 00:10:12,680 --> 00:10:15,960 It loads everything into PowerShell for us and all I have to do is type dump hashes 182 00:10:15,960 --> 00:10:21,060 and we have the hash values bypassing execution restriction policies. 183 00:10:27,380 --> 00:10:28,380 So what's really nice. 184 00:10:28,580 --> 00:10:29,160 Go ahead. 185 00:10:30,220 --> 00:10:30,800 All right. 186 00:10:30,820 --> 00:10:34,560 So what's really nice since we have full access to PowerShell and .NET libraries, we 187 00:10:34,560 --> 00:10:35,820 can do pretty much anything we want. 188 00:10:37,220 --> 00:10:41,660 Releasing today is a proof of concept of a reverse bind and a regular bind. 189 00:10:41,660 --> 00:10:46,580 Of a command shell just as a proof of concept to see if we could really utilize the .NET 190 00:10:46,580 --> 00:10:50,300 libraries to do some post exploitation stuff. 191 00:10:50,560 --> 00:10:52,620 One thing about that is it's purely coded in PowerShell. 192 00:10:52,760 --> 00:10:55,660 So I mean it's a bind and reverse completely coded in PowerShell. 193 00:10:55,720 --> 00:11:00,060 We're actually looking at adding that to the MSF payload libraries as well as a few others 194 00:11:00,060 --> 00:11:02,420 doing an interpreter through PowerShell, a lot of other great things. 195 00:11:02,640 --> 00:11:04,960 And this was also written in PowerShell version one. 196 00:11:05,080 --> 00:11:09,440 So this is compatible with both version one and version two that you see on all the newer 197 00:11:09,440 --> 00:11:10,120 operating systems. 198 00:11:10,340 --> 00:11:10,500 Okay. 199 00:11:12,420 --> 00:11:15,960 So a real quick demo of the new Metasploit module, PowerDump. 200 00:11:20,320 --> 00:11:23,800 We have to give a big shout out to Kathy Peters on this one because she's the one that coded 201 00:11:23,800 --> 00:11:24,360 most of this. 202 00:11:25,140 --> 00:11:29,080 I did a lot of research, but she was the one that actually was able to get it done 203 00:11:29,080 --> 00:11:29,920 in time. 204 00:11:31,000 --> 00:11:34,680 So if you look here, we're running a fully patched server 2008 R2 64-bit platform. 205 00:11:36,060 --> 00:11:39,400 All you do is specifically call the PowerDump executable. 206 00:11:39,480 --> 00:11:39,940 Or the. 207 00:11:40,760 --> 00:11:41,480 Add on. 208 00:11:42,640 --> 00:11:45,240 And it will go ahead and dump the hash values for us. 209 00:11:47,660 --> 00:11:48,060 Done. 210 00:11:49,680 --> 00:11:50,480 All in PowerShell. 211 00:11:50,580 --> 00:11:52,020 Who thought you could do that with PowerShell? 212 00:12:00,100 --> 00:12:00,740 So yeah. 213 00:12:01,680 --> 00:12:04,340 Interpreter based module will dump the SAM database purely through PowerShell. 214 00:12:04,420 --> 00:12:06,680 Again you can download it from our site if you want it immediately. 215 00:12:07,480 --> 00:12:09,160 And it's broken up into two parts. 216 00:12:09,160 --> 00:12:12,420 So you have the Metasploit module, zip file, and then you have the PowerShell based examples. 217 00:12:13,360 --> 00:12:19,180 So all the proof of concept code for PowerDump without having it in, Interpreter is also 218 00:12:19,180 --> 00:12:19,580 there as well. 219 00:12:19,740 --> 00:12:22,920 So anything that you want to go through and modify or add, go for it. 220 00:12:24,320 --> 00:12:29,060 So PowerDump is an Interpreter based module, will dump the SAM database through PowerShell. 221 00:12:29,140 --> 00:12:30,520 It works on all operating systems. 222 00:12:31,320 --> 00:12:33,480 Both x86 and 64-bit. 223 00:12:33,760 --> 00:12:35,940 Obviously anything that has PowerShell installed on it. 224 00:12:36,280 --> 00:12:38,340 Which in Service Pack 3 it's an optional update. 225 00:12:38,340 --> 00:12:40,640 In Windows Vista it's an optional update. 226 00:12:40,820 --> 00:12:45,960 But Windows 7 and Server 2008 it's 100% installed by default. 227 00:12:46,280 --> 00:12:51,480 Another interesting component with PowerShell is there already is full integration into 228 00:12:51,480 --> 00:12:55,240 Exchange 2010 as well as any new Microsoft product that comes out. 229 00:12:55,560 --> 00:12:59,360 So PowerShell will be 100% integrated into pretty much every aspect of the Microsoft 230 00:12:59,360 --> 00:12:59,960 product line. 231 00:13:00,060 --> 00:13:03,500 Which will definitely be beneficial for us as we're going through and performing penetration 232 00:13:03,500 --> 00:13:05,420 tests and doing different things. 233 00:13:05,540 --> 00:13:08,320 I mean you're talking about a whole new vector of data. 234 00:13:08,340 --> 00:13:11,900 You're talking about a whole new set of tools and different ways of attacking systems that 235 00:13:11,900 --> 00:13:13,420 we generally didn't have before. 236 00:13:16,500 --> 00:13:20,760 So one of the tools I write is the Social Engineer Toolkit and it's very applicable 237 00:13:20,760 --> 00:13:23,460 to what we're going to do here because I have here a Tensy device. 238 00:13:23,880 --> 00:13:25,280 And we'll talk about that in a second. 239 00:13:25,720 --> 00:13:31,420 For those of you that don't know the Social Engineer Toolkit, it's a tool for social engineering. 240 00:13:36,100 --> 00:13:36,920 That's about it. 241 00:13:37,840 --> 00:13:38,320 So it's a tool for engineering. 242 00:13:38,340 --> 00:13:39,080 No creative name there. 243 00:13:39,320 --> 00:13:39,520 Yeah. 244 00:13:40,100 --> 00:13:40,960 It's also called Set. 245 00:13:41,560 --> 00:13:44,960 For some reason I had this fascination with Arnold Palmer for the past like six months. 246 00:13:45,180 --> 00:13:47,340 Every time my wife goes to the store, she buys the whole store out. 247 00:13:47,400 --> 00:13:49,320 So I have like gallons and gallons and gallons of Arnold Palmer. 248 00:13:49,860 --> 00:13:53,040 And I tell you, every time I drink Arnold Palmer, I crank out like 10,000 lines of code. 249 00:13:53,700 --> 00:13:58,220 So I really recommend if you're a hacker and you code, Arnold Palmer will basically make 250 00:13:58,220 --> 00:14:00,700 you, will let you present at DEF CON. 251 00:14:00,880 --> 00:14:03,520 Yeah, trade out your Mountain Dew, trade out your Dr. Pepper, get Arnold Palmer. 252 00:14:03,520 --> 00:14:04,560 Are you tired of getting rejected? 253 00:14:04,940 --> 00:14:06,380 You know, are you tired of getting your submissions rejected? 254 00:14:06,640 --> 00:14:08,160 Drink Arnold Palmer and you'll be speaking at DEF CON. 255 00:14:09,080 --> 00:14:09,760 Look at me. 256 00:14:09,800 --> 00:14:10,120 I'm here. 257 00:14:10,740 --> 00:14:11,660 You don't drink Arnold Palmer. 258 00:14:12,020 --> 00:14:12,520 I know. 259 00:14:15,520 --> 00:14:16,180 Tastes nasty. 260 00:14:16,600 --> 00:14:17,020 Oh, dude. 261 00:14:19,860 --> 00:14:20,560 Get off stage. 262 00:14:20,780 --> 00:14:21,300 Get off. 263 00:14:21,440 --> 00:14:21,780 Let's go. 264 00:14:21,900 --> 00:14:24,360 Dude, I almost broke my hand trying to get into your trunk because the Arnold Palmer 265 00:14:24,360 --> 00:14:25,500 was falling onto me. 266 00:14:26,320 --> 00:14:26,680 Yeah. 267 00:14:26,720 --> 00:14:29,480 So Walgreens around the corner is actually sold out of Arnold Palmer. 268 00:14:29,640 --> 00:14:32,800 I was coming back with like three bags, you know, my arms are like extremely sore right 269 00:14:32,800 --> 00:14:32,980 now. 270 00:14:33,060 --> 00:14:33,600 It's going good. 271 00:14:33,800 --> 00:14:34,820 But they're all gone. 272 00:14:35,980 --> 00:14:37,420 So the basics are set. 273 00:14:37,420 --> 00:14:37,920 It's open source. 274 00:14:38,160 --> 00:14:39,640 It's purely programmed in Python. 275 00:14:41,300 --> 00:14:41,780 Python. 276 00:14:42,900 --> 00:14:44,700 I'm working on a Pearl version of it. 277 00:14:46,480 --> 00:14:49,460 What is that, the archaic 1970s programming language toolkit? 278 00:14:50,700 --> 00:14:51,680 Sorry, Pearl guys. 279 00:14:51,780 --> 00:14:52,380 I really apologize. 280 00:14:52,500 --> 00:14:53,020 That was harsh. 281 00:14:53,480 --> 00:14:54,320 I think Jabra. 282 00:14:54,360 --> 00:14:54,840 Hey to you now. 283 00:14:55,260 --> 00:14:55,740 Yeah. 284 00:14:55,760 --> 00:14:56,400 Most likely. 285 00:14:56,920 --> 00:15:00,980 So it has integration of Metasploit for both the exploit repository, client side attacks, 286 00:15:01,200 --> 00:15:02,080 and the payloads. 287 00:15:02,320 --> 00:15:05,380 Multiple attack vectors specifically designed for Solstice engineering. 288 00:15:06,920 --> 00:15:08,020 For good, not bad. 289 00:15:08,120 --> 00:15:08,140 It's got a lot of stuff. 290 00:15:11,120 --> 00:15:13,200 And you can see the 291 00:15:13,200 --> 00:15:17,700 demo here that are specifically rated to PowerShell, actually one that's not. 292 00:15:17,940 --> 00:15:23,000 But that will definitely help you as you're doing penetration tests or you're trying to 293 00:15:23,000 --> 00:15:25,340 hack your mom's computer or whatever you guys do in your spare time. 294 00:15:26,020 --> 00:15:28,240 It's up to you legally. 295 00:15:28,840 --> 00:15:31,740 So the USB hit attack vector, really cool. 296 00:15:32,180 --> 00:15:33,400 Have you guys seen the Tenzi devices? 297 00:15:34,040 --> 00:15:35,220 The Adreno Tenzi devices? 298 00:15:35,220 --> 00:15:42,300 Did anyone see Adrian's talk yesterday? Did a phenomenal job. 299 00:15:43,280 --> 00:15:45,500 We've been working with Adrian and he's got some really cool 300 00:15:45,500 --> 00:15:48,640 stuff he's doing. So what we decided to do was take one of 301 00:15:48,640 --> 00:15:52,420 these Tenzi devices and do a power shell based payload on it 302 00:15:52,420 --> 00:15:57,360 that will compromise the system. So basically you insert this 303 00:15:58,220 --> 00:16:01,740 USB device into any computer you want to and you can actually 304 00:16:01,740 --> 00:16:03,400 make a multi-platform so it doesn't have to be power shell 305 00:16:03,400 --> 00:16:07,000 it can be Linux OS X or Windows or whatever or the Hannah 306 00:16:07,000 --> 00:16:10,940 Montana Linux distribution. Any of those will work. And that's 307 00:16:10,940 --> 00:16:15,480 my primary operating system. It's for my wife. I'm just kidding 308 00:16:15,480 --> 00:16:18,780 guys. It's awesome. It is awesome. The music plays and 309 00:16:18,780 --> 00:16:23,800 it's great. But basically when you plug it in, it gets 310 00:16:23,800 --> 00:16:26,940 recognized as a keyboard. So that means all that good stuff is 311 00:16:26,940 --> 00:16:29,300 pretty much out the window, right? It emulates exactly what 312 00:16:29,300 --> 00:16:31,140 you're going to do from a keyboard perspective. So as soon 313 00:16:31,140 --> 00:16:33,380 as you plug it in, I simulate keystrokes so it doesn't have 314 00:16:33,400 --> 00:16:35,840 like 140 to 280 characters per second. It's actually more than 315 00:16:35,840 --> 00:16:38,440 that, isn't it? Yeah, it's a lot more than that. Yeah. Sorry. 316 00:16:38,600 --> 00:16:42,500 Thanks. And basically it will execute a payload on the system. 317 00:16:42,800 --> 00:16:45,600 Basically we're only restricted by how fast the buffer is on 318 00:16:45,600 --> 00:16:50,420 the program. Did they code that in Perl? No. They didn't code 319 00:16:50,420 --> 00:16:52,480 that in Perl. I was just checking. At least on a Windows 320 00:16:52,480 --> 00:16:55,940 system. I was just checking. I mean, you never know. So you can 321 00:16:55,940 --> 00:16:58,040 drop a payload on a system either through power shell or W 322 00:16:58,040 --> 00:17:00,720 script are the two main methods. Automatic creation of the 323 00:17:00,720 --> 00:17:03,380 attack factor through sets. That's the big thing. That's what 324 00:17:03,400 --> 00:17:06,960 I wanted to show set today. It will actually create the attack 325 00:17:06,960 --> 00:17:10,120 factor for you, create the PDE device which you can load into 326 00:17:10,120 --> 00:17:12,840 Adreno and copy it over and you'll see an example of that. 327 00:17:13,180 --> 00:17:15,780 And it will compromise the computer for you. So how easy does 328 00:17:15,780 --> 00:17:20,680 it get? We're going to load up backtrack 4, right? Everybody 329 00:17:20,680 --> 00:17:25,540 uses backtrack 4? Yep. Come on. Wow, that's not a lot of 330 00:17:25,540 --> 00:17:32,120 people. It's Sunday. I'm not. Hannah Montana party was 331 00:17:32,120 --> 00:17:33,380 yesterday. I'm not sure. I'm not sure. I'm not sure. I'm not 332 00:17:33,400 --> 00:17:38,500 sure. So we're going to go ahead and load up set. You know, 333 00:17:38,540 --> 00:17:42,520 again, codename Arnold Palmer. I already got the version 0.7 334 00:17:42,520 --> 00:17:45,720 which is going to be awesome. Pretty funny. I try to come up 335 00:17:45,720 --> 00:17:47,940 with different ones every time. What we're going to do is we're 336 00:17:47,940 --> 00:17:50,660 going to do number 6, which is the 10Z USB hit attack factor. 337 00:17:51,600 --> 00:17:53,620 As soon as you select that, it's going to say what attack 338 00:17:53,620 --> 00:17:55,500 factor do you want to use. Do you want to use a purely power 339 00:17:55,500 --> 00:17:58,620 shell based reverse shell? Do you want to do a W script HTB 340 00:17:59,140 --> 00:18:02,520 MSF payload? Or do you want to do a power shell HTB get MSF 341 00:18:02,520 --> 00:18:03,380 payload? In this example, we're going to do a W script HTB get 342 00:18:03,400 --> 00:18:06,700 MSF payload. In this example, I'll use power shell. Second, I 343 00:18:06,700 --> 00:18:08,580 want to show you the W script one because it has more of a 344 00:18:09,900 --> 00:18:14,900 presentation experience. Looks better. So it's going to ask 345 00:18:14,900 --> 00:18:18,080 if you want to create a payload. Yep, absolutely. Type in my IP 346 00:18:18,080 --> 00:18:23,840 address. And then here we get options to use metasploit. So 347 00:18:23,840 --> 00:18:25,980 we're going to hit the default, which is the interpreter. And 348 00:18:25,980 --> 00:18:28,300 then we're going to backdoor the executable. So with an MSF 349 00:18:28,300 --> 00:18:31,620 encode and MSF payload, you can take a legitimate executable and 350 00:18:31,620 --> 00:18:33,380 shove the interpreter on the bottom of it so it has been 351 00:18:33,400 --> 00:18:35,200 executed. So you can get better AV detection. What I found was 352 00:18:35,200 --> 00:18:39,340 when you're actually executing payloads on the client side, if it 353 00:18:39,340 --> 00:18:42,800 has any type of command interface to it, it's going to pop up a 354 00:18:42,800 --> 00:18:45,220 black window to the user. So obviously you don't want that 355 00:18:45,220 --> 00:18:46,740 when you're doing a social engineering attack. And it's 356 00:18:46,740 --> 00:18:49,820 probably going to be kind of suspicious. Well, at least if 357 00:18:49,820 --> 00:18:53,900 you're using Hanna Montana OS, it's probably not. But basically 358 00:18:53,900 --> 00:18:55,740 what ends up happening, what I ended up doing was I took a 359 00:18:55,740 --> 00:18:58,100 version of calc and I just modified it so it was basically 360 00:18:58,100 --> 00:19:00,680 broken. But the execution flow within assembly still works 361 00:19:00,680 --> 00:19:03,180 perfectly and everything like that. But nothing pops up. So I 362 00:19:03,180 --> 00:19:03,380 had that in mind. So I took a version of calc and I just 363 00:19:03,400 --> 00:19:05,900 modified that built into set. And what ends up happening is 364 00:19:05,900 --> 00:19:07,740 when you back throw the executable, puts the interpreter 365 00:19:07,740 --> 00:19:10,560 stuff on the bottom of it, when the payload executes, the user is 366 00:19:10,560 --> 00:19:14,720 not presented with anything at all, which is great. We use the 367 00:19:14,720 --> 00:19:23,860 default port 443. And we're going to start up our little 368 00:19:23,860 --> 00:19:26,960 listener here. And if you look, it says it was able to create 369 00:19:28,000 --> 00:19:31,960 the PDE file under report slash tenzi.PDE. So what we're going 370 00:19:31,960 --> 00:19:33,380 to do is we're going to copy that to our OSX machine. So 371 00:19:34,560 --> 00:19:40,040 we're going to go to our OSX machine. 372 00:19:45,260 --> 00:19:53,200 All right. Oops. All right. So we have our tenzi.PDE device 373 00:19:53,200 --> 00:19:56,400 here. Now, there's two things to take special note of. There's 374 00:19:56,400 --> 00:20:00,360 the Adreno based application, which is basically the developer 375 00:20:00,360 --> 00:20:03,100 ID for programming and Adreno based devices. So the small 376 00:20:03,400 --> 00:20:06,600 chip, the microprocessor type devices. That's what you do all 377 00:20:06,600 --> 00:20:09,340 your programming in. On the left hand side, this is the tenzi 378 00:20:09,340 --> 00:20:14,000 loader. So this is what actually uploads your bad stuff to this 379 00:20:14,000 --> 00:20:16,720 device here. So all we're going to do is just simply drag this 380 00:20:16,720 --> 00:20:21,640 over. And we have all of our code automatically generated for 381 00:20:21,640 --> 00:20:24,160 us with our IP address. That sets up the web server for you, 382 00:20:24,180 --> 00:20:27,000 the listener, everything else for you. And then you insert your 383 00:20:27,000 --> 00:20:30,660 USB device and you upload it. And you can see it's been 384 00:20:36,660 --> 00:20:49,640 reboots and we're all set. Now we have our malicious USB fuck device. There you go. So 385 00:20:49,640 --> 00:21:00,640 we're going to take this and run a server 2008 fully patch all the good stuff, right? We're 386 00:21:00,640 --> 00:21:07,640 all set. 387 00:21:17,300 --> 00:21:18,000 Droid. 388 00:21:21,000 --> 00:21:22,400 And? 389 00:21:30,640 --> 00:21:53,680 demo gods. There it goes. We have interpreter. So let's just 390 00:21:53,680 --> 00:21:57,040 back this up real quick and do the exact same attack factor all 391 00:21:57,040 --> 00:22:02,280 through PowerShell. It's not as cool looking but a lot more 392 00:22:02,280 --> 00:22:04,300 efficient. If you're going after a system and what's cool about 393 00:22:04,300 --> 00:22:07,200 these, you look and you can see it's kind of hard to tell but 394 00:22:07,200 --> 00:22:09,860 there's dip switches on here. Thanks again, Adrian. The dip 395 00:22:09,860 --> 00:22:12,020 switches allow you to program different payloads per dip 396 00:22:12,020 --> 00:22:14,160 switch that's flipped. So if you want to do, you know, you're 397 00:22:14,160 --> 00:22:17,080 coming up to a server 2008 machine, you insert it, hit dip 398 00:22:17,080 --> 00:22:20,240 switch 2, targets PowerShell based systems. Hit dip switch 3, 399 00:22:20,320 --> 00:22:23,880 targets OSX. Hit dip switch 4, pops up a message box saying 400 00:22:23,880 --> 00:22:26,360 ha ha, you know, whatever you got. You know, so basically 401 00:22:27,040 --> 00:22:29,000 you can program it to do whatever you want to, use any 402 00:22:29,000 --> 00:22:31,460 dip switch you want to, have multiple payloads. It's all 403 00:22:31,460 --> 00:22:35,340 great. So we're a little upset again. We'll go to the 10Z USB 404 00:22:35,340 --> 00:22:37,480 hit attack factor, the PowerShell. We're going to 405 00:22:37,480 --> 00:22:42,280 create a payload. We're going to type in our IP address. We're 406 00:22:42,280 --> 00:22:50,740 going to do all the defaults. And it's under reports 10Z slash 407 00:22:50,740 --> 00:22:54,000 PDE. So we're going to go ahead and copy this over again. Easy. 408 00:23:07,360 --> 00:23:17,760 Sometimes it doesn't take. Hang on one second. Sorry about 409 00:23:17,760 --> 00:23:27,020 that. All right. So I'm just copying the file. I'm going to 410 00:23:27,020 --> 00:23:29,560 file back over again. It didn't overwrite the other one for some 411 00:23:29,560 --> 00:23:39,840 reason. All right. Good. We got our PowerShell payload. We're 412 00:23:39,840 --> 00:23:46,520 going to go ahead and upload this cat. And these PDE files are 413 00:23:46,520 --> 00:23:50,500 completely customizable. You know, there's actually on the 414 00:23:50,500 --> 00:23:55,520 website, there's multiple different types of. One second 415 00:23:56,720 --> 00:23:59,220 here. There's actually multiple different types of attacks you 416 00:23:59,220 --> 00:24:00,620 can use with this. This is just an example. 417 00:24:00,620 --> 00:24:29,360 example. All right. So it will go ahead and reboot. All right. We're good. 418 00:24:31,400 --> 00:24:38,360 So again, in PowerShell, my hands are off. Actually, I can't type that fast anyway. 419 00:24:40,120 --> 00:24:43,100 I don't know. You can move pretty fast. There it goes. That is all you needed. 420 00:24:43,300 --> 00:24:49,800 So it actually executed the PowerShell script and it's executing our payload. Next, we've 421 00:24:49,800 --> 00:24:52,320 got Meterpreter. . 422 00:25:01,820 --> 00:25:05,640 That was cool. That was pretty cool. I was impressed it worked. 423 00:25:05,780 --> 00:25:13,640 Glad these demos are working. So integrating into existing hardware. Josh, why don't you 424 00:25:13,640 --> 00:25:17,460 talk about this a little bit? All right. So we did this as a practical 425 00:25:17,460 --> 00:25:22,120 joke to one of the guys in the office. He went away for a week and was getting a new 426 00:25:22,120 --> 00:25:26,140 computer, so we wanted to mess with him really good. What I did was took part of the back 427 00:25:26,140 --> 00:25:30,600 of the keyboard, soldered just this little bit of a USB cable to the keyboard, and then 428 00:25:30,620 --> 00:25:34,880 plugged it into the back of it. It's a Dell keyboard. It's got USB hub built into it. 429 00:25:34,940 --> 00:25:38,140 And then plugged the Tensy right into it. Screwed it all back together. No one could 430 00:25:38,140 --> 00:25:43,140 tell any difference about it. So plugged it into his docking station. He came back 431 00:25:43,140 --> 00:25:48,340 to work the next day. And all of a sudden, his mouse started moving on him. Now, I had 432 00:25:48,340 --> 00:25:53,760 programmed the Tensy to just move the mouse a little bit and click. So every 30 seconds. 433 00:25:55,620 --> 00:26:00,400 So it gets better. It gets much better. Yeah, yeah. So okay. So day one goes by. 434 00:26:00,400 --> 00:26:03,920 He's sitting there typing Word documents, constantly messing them up, getting frustrated. 435 00:26:04,380 --> 00:26:08,740 It's just, he's having a horrible day. And I had to go out of the office. So as this 436 00:26:08,740 --> 00:26:11,140 is going, you know, I know what's going on because I'm sitting there cracking up. As 437 00:26:11,140 --> 00:26:14,500 he started putting this back together, I'm sitting there like laughing my butt off. Yeah, 438 00:26:14,500 --> 00:26:18,780 we were, this was a test run to see if we could do this to someone else higher up in 439 00:26:18,780 --> 00:26:22,580 the office. Right, yeah. So we're not doing that. We didn't do that, though. Oh, this, 440 00:26:22,660 --> 00:26:26,640 we found out this was way too damaging. This is not, yeah. Not good. So anyways, before 441 00:26:26,640 --> 00:26:30,380 you get into that. So I leave the office for like three days. Yeah, yeah, yeah. So I leave 442 00:26:30,380 --> 00:26:33,680 the office. So figuring if it got out of hand, they'd probably stop doing it, right? 443 00:26:35,440 --> 00:26:40,800 Yeah. So, all right. So we know he's getting a new computer. So he gets his new computer. 444 00:26:40,860 --> 00:26:45,260 He thinks all the problems are going to go away with this. And lo and behold, he keeps 445 00:26:45,260 --> 00:26:48,420 the same docking station, same keyboard, same mouse. And boom, the problems start up 446 00:26:48,420 --> 00:26:51,660 again. He's like, what the hell is going on? This is a Windows 7 box. It should be 447 00:26:51,660 --> 00:26:56,280 working perfectly. You know, he's doing all sorts of stuff. And he's just getting so frustrated. 448 00:26:56,400 --> 00:27:00,100 He's just, so he's like, okay, fine. It's got to be the mouse. Changes out his mouse. 449 00:27:00,380 --> 00:27:05,300 Comes back, plugs it in. Boom, starts up again. He's like, he's frustrated. So it's, 450 00:27:05,320 --> 00:27:09,920 okay, so logical troubleshooting. It's got to be the docking station. Changes out the 451 00:27:09,920 --> 00:27:15,900 docking station. Does it again. He's getting so frustrated that he's got a new keyboard 452 00:27:15,900 --> 00:27:20,760 on the way. He's also started to put in a request for a new computer. So I get at the 453 00:27:20,760 --> 00:27:24,200 office and this guy is literally, you know, pulling his hair out. And he's like, I just 454 00:27:24,200 --> 00:27:29,660 ordered another computer. I can't figure out. I'm like, all right, wait a minute. Thankfully, 455 00:27:29,660 --> 00:27:34,560 Dave pulls him into the office before he starts to switch out his keyboard. And I'm able to grab 456 00:27:34,560 --> 00:27:38,100 my keyboard that has a 10C device in it so he doesn't throw that away. Because I don't want to 457 00:27:38,100 --> 00:27:42,360 lose that. Yeah, so we actually didn't tell him because he was really upset. So, you know, 458 00:27:43,540 --> 00:27:46,880 so I pulled the, hey, man, I got to talk to you about that stuff you're doing over there. 459 00:27:47,220 --> 00:27:49,780 Why don't you come over to my office for a little bit? And, you know, did the whole swap the 460 00:27:49,780 --> 00:27:53,060 keyboard. And, you know, you're sitting there and you're like, man, I really only wish this was 461 00:27:53,060 --> 00:27:57,320 like a 10-second conversation. But then it goes on for like 30 minutes. But it worked and he 462 00:27:57,320 --> 00:27:59,640 never knew the difference. So magically it started fixing it. Yeah. So, you know, he's like, 463 00:27:59,640 --> 00:28:04,220 yeah, so magically it started fixing it. Wait, these aren't recorded, are they? I didn't say 464 00:28:04,220 --> 00:28:11,760 any names. Well, I mean, he's going to know exactly what happened when, you know. Yeah, 465 00:28:11,860 --> 00:28:16,880 that keyboard's sitting on my desk still. Oh, crap. Well, the funny part about it was one of 466 00:28:16,880 --> 00:28:21,360 the other guys that's in the audience right now was listening in and he knew what was going on. 467 00:28:21,800 --> 00:28:26,940 And he had to listen to this other guy who we were playing joke on complain about it. And he 468 00:28:26,940 --> 00:28:29,620 didn't even have the heart to tell him either. So. Well, you know, I figured I was going to 469 00:28:29,640 --> 00:28:32,820 figure, you know, as this dude's sitting there spending like half his day trying to fix his 470 00:28:32,820 --> 00:28:35,760 keyboard and stuff, you know. And he goes over to Ryan. He's right there. Why don't you raise 471 00:28:35,760 --> 00:28:39,060 your hand, Ryan. You can stand up. Actually, why don't you stand up. I wasn't going to call 472 00:28:39,060 --> 00:28:45,480 him out. Stand up. Yeah, Ryan. Ryan Elkins. Anybody want to give him a clap? Way to keep 473 00:28:45,480 --> 00:28:50,760 the joke going. Way to keep the joke going. So he, you know, the guy comes over and he's like, 474 00:28:50,840 --> 00:28:54,400 dude, my computer's so messed up, man. I'm so upset. He's like, can you not figure it out? I'm 475 00:28:54,400 --> 00:28:59,620 so frustrated. And Ryan's like, dude, that sucks. That sucks. And Ryan's like, dude, that sucks. 476 00:28:59,640 --> 00:29:03,280 That sucks, man. Have you tried changing out the mouse yet? Yeah, he's like, dude, the mouse. 477 00:29:03,380 --> 00:29:08,860 It's got to be the mouse. Like, come on, man. It's three days. He's swapping out his laptop. 478 00:29:09,240 --> 00:29:13,620 Oh, well. Hey, it's all good and fun and games, right? Yeah. Dave told him. Dave told him 479 00:29:13,620 --> 00:29:24,100 about a week later. He hasn't talked to me since. Or me. I'm his boss. Not good. So this is 480 00:29:24,100 --> 00:29:28,360 what the keyboard looks like put back together. Does it look like a keyboard to you guys? Yeah. 481 00:29:28,720 --> 00:29:29,620 Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. 482 00:29:29,640 --> 00:29:32,960 It's a keyboard. Now, if you were in Iron Geek's talk yesterday, you can also see that 483 00:29:32,960 --> 00:29:35,760 you can embed this into pretty much anything you want to. This is just, it's a little bit 484 00:29:35,760 --> 00:29:41,880 bigger than you might see, but the chipset is only that big. So, I mean, you can fit 485 00:29:41,880 --> 00:29:45,960 it into, like, anything you want to. Yeah, Iron Geek was actually able to fit a hub, 486 00:29:46,200 --> 00:29:52,460 an SD card, a 10C, and all of that into just a normal mouse. And some LEDs, too, to make 487 00:29:52,460 --> 00:29:58,380 it look really cool. That is cool. I want one. Me, too. 488 00:29:59,640 --> 00:30:05,100 So, kind of off-topic here, but I just want to show you the powerful stuff with set. There's 489 00:30:05,100 --> 00:30:10,820 the Java Apple attack factor within this. Pretty much the meat and potatoes of the social 490 00:30:10,820 --> 00:30:15,620 engineer toolkit. If you guys want to do 100% success rate on your pen test, I recommend 491 00:30:15,620 --> 00:30:20,960 this right here. 100% success rate. If it doesn't work, I'm not going to pay you anything 492 00:30:20,960 --> 00:30:25,860 for that comment, but, I mean, it will work. So let's just do a real quick demo here. 493 00:30:27,780 --> 00:30:31,000 Let me just prep my config. You're doing this one live, too. 494 00:30:31,460 --> 00:30:37,820 Dude, I know. Last minute is going to be awesome. All right. So we're going to load set. 495 00:30:38,240 --> 00:30:42,560 And it has the website attack factor. We're going to select the Java Apple attack method. 496 00:30:43,100 --> 00:30:47,780 Now, here's what we can do if I actually wanted to use DEF CON's wireless. I could do a 497 00:30:47,780 --> 00:30:55,840 cyclone using DEF CON's wireless on stage. Yeah, if that was a Windows box, it would be 498 00:30:55,860 --> 00:31:00,480 good. So what we're going to do instead is we're going to use the web templates. What we can 499 00:31:00,480 --> 00:31:03,400 do is you can actually clone an entire site. So it automatically, we say you're going after 500 00:31:03,400 --> 00:31:07,980 company X. Hopefully there's not a company X out there. It's company X, and it will actually 501 00:31:07,980 --> 00:31:12,720 go and rip their site off completely, set up a web server with it, with all the malicious Java 502 00:31:12,720 --> 00:31:17,020 applet code in it, and basically when they go and browse the site, it looks identical in 503 00:31:17,020 --> 00:31:20,580 every way, shape, and form to whatever company you have cloned. In this example, we're just 504 00:31:20,580 --> 00:31:24,200 going to use the web templates. We're going to set our interface IP address since I'm not 505 00:31:24,200 --> 00:31:29,900 connected to the Internet. And then we're going to sign our Java applet. So in this instance, 506 00:31:30,000 --> 00:31:35,640 we'll be pretending we're Google because we love all Google. Google does no evil, right? 507 00:31:36,540 --> 00:31:41,800 I like Google. Google's goofy. So we're going to hit 3 for the Google. These are just 508 00:31:41,800 --> 00:31:45,680 different templates that are built in, but you can, you know, definitely clone any site you 509 00:31:45,680 --> 00:31:52,100 want to. And we're going to select the defaults. Look familiar. Interpreter. Backdoor 510 00:31:52,100 --> 00:31:54,180 executable. 4443. And we're going to select the defaults. Look familiar. Interpreter. Backdoor 511 00:31:54,200 --> 00:32:03,580 executable. 4443. Look good. And what's interesting enough about this payload is it 512 00:32:03,580 --> 00:32:05,840 works for Linux, OSX, and Windows. 513 00:32:08,180 --> 00:32:08,540 . 514 00:32:10,720 --> 00:32:12,680 Yeah, Java makes everything nice, doesn't it? 515 00:32:12,880 --> 00:32:20,220 So we'll go ahead and just do an example of OSX. So it sets up the listener for us, the 516 00:32:20,220 --> 00:32:22,980 web server, all that good stuff, right? Now we're going to go ahead and go to the site. 517 00:32:27,520 --> 00:32:29,480 I hope you prayed to the demo gods last night 518 00:32:29,940 --> 00:32:31,080 I did they're going to be fine 519 00:32:31,080 --> 00:32:33,600 And we get this warning saying 520 00:32:34,260 --> 00:32:35,420 Google the publisher 521 00:32:35,420 --> 00:32:37,320 Wants you to run this Java app 522 00:32:37,320 --> 00:32:38,360 Do you want to continue 523 00:32:40,320 --> 00:32:41,360 Dude it's Google 524 00:32:42,220 --> 00:32:43,500 I'm not saying no to Google 525 00:32:45,220 --> 00:32:46,580 I know better than that 526 00:32:46,580 --> 00:32:48,480 If I say cancel my computer is crashing 527 00:32:49,680 --> 00:32:50,860 I can't search the internet 528 00:32:50,860 --> 00:32:51,720 Nothing works 529 00:32:52,180 --> 00:32:53,620 There's no other search engines out there 530 00:32:54,420 --> 00:32:54,880 What's up 531 00:32:56,480 --> 00:32:56,940 What's that 532 00:33:00,640 --> 00:33:01,280 Sounds cool 533 00:33:02,700 --> 00:33:03,740 So we go ahead and hit run 534 00:33:04,840 --> 00:33:06,420 Now if I was actually connected 535 00:33:06,420 --> 00:33:07,020 To the internet 536 00:33:07,780 --> 00:33:09,760 You would actually see the logo there 537 00:33:09,760 --> 00:33:10,820 And everything else looking pretty 538 00:33:10,820 --> 00:33:11,620 Since we don't have internet 539 00:33:11,620 --> 00:33:13,480 But interesting enough 540 00:33:13,480 --> 00:33:14,880 As soon as the payload executes 541 00:33:17,240 --> 00:33:19,740 It redirects you back to the legitimate Google site 542 00:33:20,380 --> 00:33:21,360 So you never even knew 543 00:33:21,360 --> 00:33:21,700 That you were on the internet 544 00:33:21,720 --> 00:33:22,420 You're at a malicious site 545 00:33:22,420 --> 00:33:23,640 And while we're there 546 00:33:23,640 --> 00:33:24,420 On the back end 547 00:33:24,420 --> 00:33:25,140 We have interpreter shells 548 00:33:32,580 --> 00:33:34,560 Yes the demo gods smiled upon you today 549 00:33:34,560 --> 00:33:35,620 Dude I had no worries 550 00:33:35,620 --> 00:33:37,380 I sacrificed five lambs 551 00:33:39,460 --> 00:33:40,180 No worries 552 00:33:42,500 --> 00:33:44,020 So I got to give a shout out 553 00:33:44,020 --> 00:33:45,100 To Thomas Worth 554 00:33:45,100 --> 00:33:46,060 Who helped me write the 555 00:33:46,060 --> 00:33:48,760 The Java Apple attack vector 556 00:33:48,760 --> 00:33:49,760 It was closed source 557 00:33:50,300 --> 00:33:51,520 We initially released this 558 00:33:51,520 --> 00:33:51,700 But it was closed source 559 00:33:52,160 --> 00:33:53,460 And heavily obfuscated 560 00:33:54,180 --> 00:33:55,720 But we did open source it 561 00:33:55,720 --> 00:33:56,500 With version 0.6 562 00:33:56,500 --> 00:33:58,000 Which was released at B-Sides 563 00:33:58,000 --> 00:33:58,440 On Wednesday 564 00:33:59,020 --> 00:34:00,540 So you can actually manipulate 565 00:34:00,540 --> 00:34:01,860 The source code for this 566 00:34:01,860 --> 00:34:03,340 Use anything you want to with it 567 00:34:03,340 --> 00:34:04,040 Do what you want to 568 00:34:04,040 --> 00:34:05,080 It's all open source 569 00:34:06,720 --> 00:34:08,720 So again special thanks to Thomas Worth for that 570 00:34:09,340 --> 00:34:10,560 So basically the user hits run 571 00:34:10,560 --> 00:34:11,440 The payload is executed 572 00:34:11,440 --> 00:34:12,440 On the victim's machine 573 00:34:12,860 --> 00:34:14,200 Redirects the user back to the original site 574 00:34:14,200 --> 00:34:15,960 And makes the attack less conspicuous 575 00:34:17,060 --> 00:34:18,560 Would anybody not fall for that 576 00:34:20,080 --> 00:34:20,880 Oh yeah 577 00:34:20,880 --> 00:34:21,040 Yeah 578 00:34:21,040 --> 00:34:21,240 Yeah 579 00:34:21,720 --> 00:34:22,140 I'm talking about 580 00:34:24,000 --> 00:34:26,160 So getting back on to the PowerShell kick 581 00:34:26,160 --> 00:34:28,160 What does this really mean 582 00:34:28,700 --> 00:34:29,600 Well for one 583 00:34:30,140 --> 00:34:32,440 Antivirus and host based intrusion prevention systems 584 00:34:32,440 --> 00:34:34,020 Are doing a squad for this right now 585 00:34:35,040 --> 00:34:36,420 Yeah I think there's only one 586 00:34:36,420 --> 00:34:38,380 PowerShell script that they actually catch 587 00:34:38,380 --> 00:34:40,780 And it's an old Trojan that was written 588 00:34:40,780 --> 00:34:42,220 Back when PowerShell was 589 00:34:42,220 --> 00:34:43,280 Code named Monad 590 00:34:43,820 --> 00:34:45,520 That used Kazaa to do 591 00:34:46,020 --> 00:34:48,060 Just to move around from system to system 592 00:34:48,060 --> 00:34:49,600 And just really did nothing 593 00:34:49,600 --> 00:34:51,120 It was more of a proof of concept 594 00:34:51,120 --> 00:34:51,700 That's the only way to do it 595 00:34:51,700 --> 00:34:53,800 It's the only one that I've seen in the AV databases 596 00:34:55,840 --> 00:34:57,000 And it's actually a problem 597 00:34:57,000 --> 00:34:57,420 I mean we've been 598 00:34:57,420 --> 00:34:58,600 Before this presentation 599 00:34:58,600 --> 00:34:59,840 Before the black hat presentation 600 00:35:00,380 --> 00:35:02,460 I do have to give a special shout out 601 00:35:02,460 --> 00:35:03,220 And kudos to Microsoft 602 00:35:03,220 --> 00:35:04,480 Because they're very responsive 603 00:35:05,020 --> 00:35:07,300 We basically sent them all of our proof of concept code 604 00:35:07,300 --> 00:35:08,540 Our slides everything else 605 00:35:09,160 --> 00:35:11,580 And they definitely did a good job 606 00:35:11,580 --> 00:35:13,280 At basically looking at what we're doing 607 00:35:13,280 --> 00:35:15,240 You know seeing what ideas we had 608 00:35:15,240 --> 00:35:16,840 So definitely a shout out to them 609 00:35:16,840 --> 00:35:18,840 For the responsiveness that they had 610 00:35:18,840 --> 00:35:20,380 They even cleaned up some of our code 611 00:35:20,380 --> 00:35:20,780 It was nice 612 00:35:20,780 --> 00:35:21,600 Yeah they did actually 613 00:35:21,600 --> 00:35:22,380 Thank you 614 00:35:23,480 --> 00:35:25,060 I mean we're sloppy coders man 615 00:35:25,060 --> 00:35:25,620 I mean you're trying to 616 00:35:25,620 --> 00:35:26,620 Bing this out for dev kind of like 617 00:35:26,620 --> 00:35:28,660 Dude I mean he codes in Perl all day 618 00:35:28,660 --> 00:35:29,960 I mean what do you expect 619 00:35:29,960 --> 00:35:30,280 Dude 620 00:35:31,120 --> 00:35:32,600 Dude you insult me one more time 621 00:35:34,580 --> 00:35:35,880 Does anybody here have a knife 622 00:35:35,880 --> 00:35:36,920 Actually don't answer that 623 00:35:36,920 --> 00:35:37,760 Don't answer that 624 00:35:38,800 --> 00:35:39,440 Yeah please 625 00:35:39,440 --> 00:35:40,680 Please don't answer that 626 00:35:40,680 --> 00:35:41,820 My wife wants to see me 627 00:35:43,200 --> 00:35:43,560 Don't 628 00:35:43,560 --> 00:35:44,640 No I'm worried about the goons 629 00:35:44,640 --> 00:35:45,540 Coming and kicking their ass 630 00:35:45,540 --> 00:35:46,780 Oh good point 631 00:35:49,380 --> 00:35:50,320 Those guys are rough 632 00:35:50,320 --> 00:35:50,760 So we're going to 633 00:35:50,780 --> 00:35:51,220 Where was I I'm sorry 634 00:35:51,780 --> 00:35:53,120 Hibs AV stuff like that 635 00:35:53,120 --> 00:35:53,540 Right 636 00:35:54,080 --> 00:35:54,520 Microsoft 637 00:35:54,520 --> 00:35:56,820 The usefulness of PowerShell 638 00:35:56,820 --> 00:35:58,440 Really does enable us to 639 00:35:58,440 --> 00:36:00,080 Be able to perform these type of 640 00:36:00,080 --> 00:36:01,640 Advanced attack vectors with PowerShell 641 00:36:01,640 --> 00:36:02,040 I mean it's 642 00:36:02,460 --> 00:36:02,900 You guys 643 00:36:02,900 --> 00:36:05,880 I really recommend just picking up a book on this 644 00:36:05,880 --> 00:36:07,160 And if you already know .NET 645 00:36:07,160 --> 00:36:08,480 This is going to be absolutely trivial 646 00:36:08,480 --> 00:36:09,140 For you to pick up 647 00:36:09,140 --> 00:36:13,020 You have full range to use the .NET libraries 648 00:36:13,020 --> 00:36:14,640 In PowerShell 649 00:36:14,640 --> 00:36:15,780 Completely call them from there 650 00:36:15,780 --> 00:36:17,380 So you can write complete tools 651 00:36:17,380 --> 00:36:18,260 You can write GUIs 652 00:36:18,260 --> 00:36:19,580 I mean you can write whatever you want to 653 00:36:19,580 --> 00:36:20,700 Through the PowerShell command line 654 00:36:20,780 --> 00:36:21,060 Interface 655 00:36:21,060 --> 00:36:21,880 Which means for us 656 00:36:21,880 --> 00:36:23,480 We can do a lot of cool things 657 00:36:23,480 --> 00:36:24,640 Yeah one of the IDEs 658 00:36:24,640 --> 00:36:25,840 That's out there for PowerShell 659 00:36:25,840 --> 00:36:26,860 Power GUI 660 00:36:26,860 --> 00:36:28,620 Is actually written all in PowerShell 661 00:36:28,620 --> 00:36:29,920 So I mean it's 662 00:36:29,920 --> 00:36:30,900 It's pretty impressive 663 00:36:30,900 --> 00:36:31,860 What you can do with it 664 00:36:33,520 --> 00:36:34,620 So some future plans 665 00:36:35,080 --> 00:36:36,360 Process injection and code 666 00:36:36,900 --> 00:36:38,540 Injection capabilities within PowerShell 667 00:36:38,540 --> 00:36:39,780 So the ability to inject 668 00:36:39,780 --> 00:36:40,980 Into already existing processes 669 00:36:40,980 --> 00:36:42,020 And migrate to others 670 00:36:42,020 --> 00:36:43,660 Is something that we're working on right now 671 00:36:43,660 --> 00:36:44,660 So if you think about it 672 00:36:44,660 --> 00:36:46,840 You know PowerShell based interpreter 673 00:36:46,840 --> 00:36:47,840 Would be pretty sweet to have 674 00:36:47,840 --> 00:36:48,880 And do that all through PowerShell 675 00:36:49,300 --> 00:36:49,880 Pretty cool 676 00:36:50,780 --> 00:36:52,860 The ability to deploy security baselines 677 00:36:52,860 --> 00:36:53,600 For multiple systems 678 00:36:53,600 --> 00:36:54,380 And ensure enforcement 679 00:36:54,380 --> 00:36:54,800 I mean there's like 680 00:36:54,800 --> 00:36:55,680 Just as an example 681 00:36:55,680 --> 00:36:56,500 There's just so much automation 682 00:36:56,500 --> 00:36:57,060 You can do 683 00:36:57,060 --> 00:36:57,900 So many different checks 684 00:36:57,900 --> 00:36:58,480 And things like that 685 00:36:58,480 --> 00:36:58,960 That you can do 686 00:37:00,120 --> 00:37:02,060 Working on the PowerShell 687 00:37:02,060 --> 00:37:02,940 Exploitation framework 688 00:37:03,720 --> 00:37:04,040 PEF 689 00:37:05,360 --> 00:37:06,120 I mean I don't know 690 00:37:06,120 --> 00:37:06,680 Where I came up with that 691 00:37:06,680 --> 00:37:07,380 Sounds cool 692 00:37:08,420 --> 00:37:09,360 Integrated into MSF 693 00:37:09,360 --> 00:37:10,780 So trying to work on the 694 00:37:10,780 --> 00:37:11,960 PowerShell exploitation framework 695 00:37:11,960 --> 00:37:12,960 So that you can build 696 00:37:12,960 --> 00:37:14,420 Specific tools and attack vectors 697 00:37:14,420 --> 00:37:15,160 All through PowerShell 698 00:37:15,160 --> 00:37:15,820 Would be pretty sweet 699 00:37:17,860 --> 00:37:18,600 Definitely a shout out 700 00:37:18,600 --> 00:37:19,080 We're going to be doing 701 00:37:19,080 --> 00:37:20,260 A conference in 702 00:37:21,380 --> 00:37:22,220 September 30th 703 00:37:22,220 --> 00:37:23,180 October 2nd, 2011 704 00:37:23,180 --> 00:37:24,180 So keep your eyes out 705 00:37:24,180 --> 00:37:24,720 For DerbyCon 706 00:37:24,720 --> 00:37:26,300 We already have a lot of 707 00:37:26,300 --> 00:37:27,240 Good speakers out there 708 00:37:27,240 --> 00:37:28,300 So keep your eye out 709 00:37:28,300 --> 00:37:28,940 DerbyCon.com 710 00:37:30,180 --> 00:37:31,220 And my boys 711 00:37:31,220 --> 00:37:33,140 At social-engineer.org 712 00:37:33,140 --> 00:37:33,920 Did anybody participate 713 00:37:33,920 --> 00:37:34,860 In the capture flag 714 00:37:34,860 --> 00:37:35,460 Or see it 715 00:37:35,460 --> 00:37:37,200 The social engineer capture flag 716 00:37:37,200 --> 00:37:38,440 A lot of people 717 00:37:38,440 --> 00:37:39,160 A lot of good results 718 00:37:39,160 --> 00:37:41,320 Making a lot of media out there 719 00:37:41,900 --> 00:37:42,720 Definitely check out 720 00:37:42,720 --> 00:37:43,960 Social-engineer.org 721 00:37:43,960 --> 00:37:44,880 They are phenomenal 722 00:37:44,880 --> 00:37:46,060 The podcast we actually 723 00:37:46,060 --> 00:37:46,720 Just got done 724 00:37:48,100 --> 00:37:48,540 Finishing 725 00:37:48,540 --> 00:37:49,860 You actually had to bail out 726 00:37:49,860 --> 00:37:50,080 Earlier 727 00:37:50,080 --> 00:37:50,640 I had to bail out 728 00:37:50,640 --> 00:37:50,760 Earlier 729 00:37:50,780 --> 00:37:51,400 For this talk 730 00:37:51,400 --> 00:37:51,700 I mean 731 00:37:51,700 --> 00:37:52,300 You know 732 00:37:52,300 --> 00:37:53,360 But 733 00:37:54,840 --> 00:37:55,880 And really 734 00:37:55,880 --> 00:37:57,140 Special thanks to 735 00:37:57,140 --> 00:37:57,720 Kathy Peters 736 00:37:57,720 --> 00:37:58,980 Be sure to check out 737 00:37:58,980 --> 00:38:01,520 www.secmaniac.com 738 00:38:01,520 --> 00:38:02,680 That's S-E-C 739 00:38:02,680 --> 00:38:03,800 Not S-A-C 740 00:38:05,020 --> 00:38:06,140 Secmaniac.com 741 00:38:07,540 --> 00:38:08,100 Secman 742 00:38:08,100 --> 00:38:08,880 And you can always 743 00:38:08,880 --> 00:38:09,820 Follow me and Josh 744 00:38:09,820 --> 00:38:10,340 On Twitter 745 00:38:10,340 --> 00:38:11,120 I'm Dave 746 00:38:11,120 --> 00:38:11,660 Underscore 747 00:38:11,660 --> 00:38:12,320 R-E-L 748 00:38:12,320 --> 00:38:13,140 1K 749 00:38:13,140 --> 00:38:13,920 So Dave 750 00:38:13,920 --> 00:38:14,260 Underscore 751 00:38:14,260 --> 00:38:14,620 Relic 752 00:38:14,620 --> 00:38:15,980 And WinFang98 753 00:38:15,980 --> 00:38:17,500 Now does anybody 754 00:38:17,500 --> 00:38:18,380 Have any questions 755 00:38:21,100 --> 00:38:21,980 No questions 756 00:38:21,980 --> 00:38:22,260 Does that mean 757 00:38:22,260 --> 00:38:22,860 I did a good job 758 00:38:24,440 --> 00:38:24,880 Hey 759 00:38:25,680 --> 00:38:26,380 Thanks guys 760 00:38:26,380 --> 00:38:27,280 Appreciate it 761 00:38:27,280 --> 00:38:28,320 Guys rock 762 00:38:28,320 --> 00:38:28,720 That's gone